:root{
  --c-primary:#1C2027;
  --c-primary-2:#2C323D;
  --c-accent:#4CAF50;
  --c-accent-dark:#3d8c40;
  --c-bg:#F2F4F3;
  --c-surface:#FFFFFF;
  --c-text:#1C2027;
  --c-muted:#525C68;
  --c-border:#B8C0C7;
  --c-danger:#D64545;
  --c-warn:#E0A030;
  --radius:12px;
  --radius-sm:8px;
  --shadow:0 1px 3px rgba(16,20,24,.08), 0 1px 2px rgba(16,20,24,.06);
}
*{box-sizing:border-box;}
html{transition:filter .2s;background:var(--c-primary);min-height:100%;}
@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}
html[data-theme="light"]{color-scheme:light;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--c-bg);
  color:var(--c-text);
  -webkit-font-smoothing:antialiased;
  padding-bottom:96px;
  min-height:100vh;
}
@media (min-width:600px){
  .view{padding:20px 24px 28px;}
  .card{padding:20px 22px;}
  input[type=text],input[type=number],input[type=date],input[type=time],input[type=password],input[type=email],select,textarea,.csel-display{
    padding:12px 13px;
  }
  .bottomnav button{padding:13px 4px 11px;}
  .login-card{max-width:440px !important;}
  .admin-hub-grid{grid-template-columns:repeat(3,1fr) !important;gap:22px 16px !important;max-width:460px !important;margin-left:auto !important;margin-right:auto !important;}
}
@media (max-width:380px){
  .admin-hub-grid{grid-template-columns:repeat(2,1fr) !important;}
}
.app-shell{max-width:920px;margin:0 auto;}
/* ---- Desktop / large tablet (>=900px): frame the app like a card, more breathing room ---- */
@media (min-width:900px){
  body{background:linear-gradient(180deg,#e9eef0 0%,#e4e9ec 100%);}
  .app-shell{
    max-width:960px;
    min-height:100vh;
    background:var(--c-surface);
    box-shadow:0 8px 32px rgba(16,20,24,.14);
    border-left:1px solid var(--c-border);
    border-right:1px solid var(--c-border);
  }
  .view{padding:26px 40px 36px;}
  .card{padding:22px 28px;}
  .grid-3{grid-template-columns:repeat(3,minmax(0,1fr));}
  .admin-hub-grid{grid-template-columns:repeat(4,1fr) !important;max-width:640px !important;gap:24px 18px !important;}
  .bottomnav{max-width:960px;border-left:1px solid var(--c-border);border-right:1px solid var(--c-border);}
  .fiche-item{padding:14px 16px;}
  .photo-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));}
}
/* ---- Large desktop (>=1200px): a bit more room, cap line length for readability ---- */
@media (min-width:1200px){
  .app-shell{max-width:1080px;}
  .bottomnav{max-width:1080px;}
  .view{padding:30px 56px 40px;}
}
/* ---- Header ---- */
.topbar{
  background:var(--c-primary);
  color:#fff;
  padding:calc(14px + env(safe-area-inset-top)) 16px 14px;
  display:flex;
  align-items:center;
  gap:18px;
  position:sticky;
  top:0;
  z-index:20;
}
.topbar .brandtext{
  display:flex;
  align-items:center;
  min-width:0;
  flex:1;
  line-height:1.22;
}
.topbar .brandtext b{
  font-size:clamp(10px,2.35vw,15px);
  letter-spacing:.12px;
  font-weight:700;
  white-space:normal;
  color:#fff;
}
.topbar .brandtext .brand-name{
  font-size:clamp(15px,3.6vw,19px);
  font-weight:900;
  letter-spacing:.2px;
}
.topbar .ticket-tab{
  margin-left:auto;
  font-family:"SFMono-Regular",Consolas,Menlo,monospace;
  font-size:11px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.24);
  padding:5px 9px;
  border-radius:7px;
  color:#e9ebee;
}
/* ---- Tabs content ---- */
.view{padding:14px 14px 24px;}
.card{
  background:var(--c-surface);
  border:1.5px solid var(--c-border);
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:14px;
  box-shadow:var(--shadow);
}
.card h2{
  margin:0 0 12px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.8px;
  color:var(--c-muted);
  display:flex;
  align-items:center;
  gap:8px;
}
.card h2::before{
  content:"";
  width:4px;height:14px;background:var(--c-accent);border-radius:2px;display:inline-block;
}
.grid{display:grid;gap:10px;min-width:0;}
.grid>*{min-width:0;max-width:100%;}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr));}
/* Deux colonnes sur tablette, trois seulement lorsque l'espace est suffisant. */
.grid-3{grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:520px){
  .grid-2,.grid-3{grid-template-columns:minmax(0,1fr);}
}
@media (min-width:900px){
  .grid-3{grid-template-columns:repeat(3,minmax(0,1fr));}
}
label{display:block;font-size:12px;color:var(--c-muted);margin-bottom:4px;font-weight:600;}
input[type=text],input[type=number],input[type=date],input[type=time],input[type=password],input[type=email],select,textarea{
  width:100%;
  min-width:0;
  max-width:100%;
  padding:10px 11px;
  border:1.5px solid #a8d1af;
  border-radius:var(--radius-sm);
  font-size:14px;
  background:#f4faf5;
  color:var(--c-text);
  font-family:inherit;
}
/* Safari iOS zoome les champs dont le texte fait moins de 16 px. Pour les
   heures, ce zoom et un nouveau rendu de la page pendant la fermeture de la
   roue native pouvaient rendre le choix instable ou tronquer sa valeur. */
input[type=time]{min-width:0;max-width:100%;}
/* Sur iPadOS, les contrôles natifs date/heure peuvent peindre quelques pixels
   au-delà de leur largeur CSS. Le cadre porte donc la bordure et coupe
   uniquement ce débordement visuel, sans désactiver le sélecteur Apple. */
.native-date-time{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  contain:none; /* v0.0.0.10 Android timepicker fix */
  border:1.5px solid #a8d1af;
  border-radius:var(--radius-sm);
  background:#f4faf5;
}
.native-date-time input[type=date],
.native-date-time input[type=time]{
  display:block;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0;
  border:0 !important;
  border-radius:0;
  background:transparent;
  box-shadow:none !important;
}
.native-date-time:focus-within{
  outline:2px solid var(--c-accent);
  outline-offset:1px;
  border-color:var(--c-accent);
}
.native-date-time input:focus{outline:none;}
.field.field-error .native-date-time{border-color:#D64545;box-shadow:0 0 0 1px #D64545;}
@media (max-width:599px){
  input[type=time]{
    min-height:44px;
    min-width:0;
    font-size:16px;
  }
  input[type=time]::-webkit-date-and-time-value{
    min-width:0;
    text-align:left;
  }
}
select,input[type=text]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}
textarea{resize:vertical;min-height:70px;}
input:focus,select:focus,textarea:focus{outline:2px solid var(--c-accent);outline-offset:1px;border-color:var(--c-accent);}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--c-text) !important;
  caret-color:var(--c-text);
  transition:background-color 9999s ease-in-out 0s;
  box-shadow:0 0 0px 1000px #f4faf5 inset !important;
}
.csel-wrap{position:relative;min-width:0;max-width:100%;}
.csel-native{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
.csel-display{width:100%;min-width:0;max-width:100%;padding:10px 11px;border:1.5px solid #a8d1af;border-radius:var(--radius-sm);font-size:14px;background:#f4faf5;color:var(--c-text);display:flex;align-items:center;justify-content:space-between;cursor:pointer;gap:6px;}
.csel-display .csel-clear{display:none;align-items:center;justify-content:center;width:15px;height:15px;flex:none;border-radius:50%;background:var(--c-border);color:var(--c-muted);font-size:11px;flex-shrink:0;}
.csel-clear:hover{background:var(--c-danger);color:#fff;}
.csel-display span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;}
.csel-display::after{content:'';border:5px solid transparent;border-top-color:var(--c-muted);margin-top:3px;flex-shrink:0;}
.csel-panel{position:absolute;top:calc(100% + 4px);left:0;right:0;max-height:230px;overflow-y:auto;background:var(--c-surface);border:1px solid var(--c-border);border-radius:var(--radius-sm);box-shadow:var(--shadow);z-index:60;display:none;}
.csel-panel.open{display:block;}
.csel-opt{padding:10px 12px;font-size:14px;cursor:pointer;}
.csel-group-label{padding:9px 12px 4px;font-size:14px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;color:var(--c-primary);background:var(--c-bg);border-top:2px solid var(--c-border);margin-top:4px;}
.csel-group-label:first-child{border-top:none;margin-top:0;}
.pwd-wrap{position:relative;}
.pwd-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:none;border:none;padding:6px;cursor:pointer;color:var(--c-muted);display:flex;align-items:center;justify-content:center;}
.csel-opt:hover,.csel-opt.active{background:var(--c-bg);}
@keyframes loginFadeUp{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:translateY(0);}}
@keyframes loginGlowPulse{0%,100%{opacity:.55;transform:scale(1);}50%{opacity:.9;transform:scale(1.06);}}
.field{margin-bottom:2px;min-width:0;max-width:100%;overflow-wrap:anywhere;}
.field.field-error input,.field.field-error select,.field.field-error textarea{border-color:#D64545;box-shadow:0 0 0 1px #D64545;}
.field.field-error .signature-box{border-color:#D64545!important;box-shadow:0 0 0 1px #D64545;}
.field .req-mark{color:#D64545;font-weight:700;margin-left:2px;}
.row-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;min-width:0;}
.row-actions>button{min-width:0;max-width:100%;white-space:normal;}
.month-picker{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:8px;min-width:0;}
.month-picker .field{margin:0;min-width:0;}
.month-picker>button{min-width:44px;min-height:42px;padding:8px 10px;justify-content:center;font-size:18px;}
button{
  font-family:inherit;
  cursor:pointer;
  border:none;
  border-radius:var(--radius-sm);
  padding:10px 14px;
  font-size:13.5px;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.btn-primary{background:var(--c-accent);color:#fff;}
.btn-primary:hover{background:var(--c-accent-dark);}
.btn-dark{background:var(--c-primary);color:#fff;}
.btn-outline{background:#fff;color:var(--c-text);border:1px solid var(--c-border);}
.btn-outline:hover{background:#f5f6f7;}
.btn-danger{background:#fdeceb;color:var(--c-danger);}
.btn-sm{padding:6px 10px;font-size:12px;}
.btn-icon{padding:8px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;}
button:disabled{opacity:.45;cursor:not-allowed;}
button:focus-visible,
[role="button"]:focus-visible,
.csel-display:focus-visible{
  outline:3px solid var(--c-accent);
  outline-offset:2px;
}
.csel-display[aria-disabled="true"]{opacity:.55;cursor:not-allowed;}
.csel-opt:focus-visible{outline:2px solid var(--c-accent);outline-offset:-2px;}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto !important;animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;}
}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  background:#eef2ee;color:var(--c-accent-dark);
  padding:4px 10px;border-radius:20px;font-size:11.5px;font-weight:700;
  text-transform:uppercase;letter-spacing:.4px;
}
.chip.warn{background:#fdf3e3;color:#9a6b12;}
.chip.danger{background:#fdeceb;color:var(--c-danger);}
hr.sep{border:none;border-top:1px dashed var(--c-border);margin:14px 0;}
.status-track{display:flex;align-items:center;gap:0;margin:10px 0 4px;}
.status-step{display:flex;flex-direction:column;align-items:center;gap:5px;flex-shrink:0;}
.status-dot{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;}
.status-dot.done{background:#22C55E;color:#fff;}
.status-dot.current{background:#E8871E;color:#fff;box-shadow:0 0 0 4px #fdf3e3;}
.status-line{flex:1;height:2px;background:var(--c-border);margin:0 4px;margin-bottom:19px;}
.status-line.done{background:#22C55E;}
.status-label{font-size:10px;color:var(--c-muted);font-weight:600;white-space:nowrap;}
.status-label.active{color:var(--c-primary);}
.icon-row-btn{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 4px;border-radius:11px;border:1px solid var(--c-border);background:#fff;font-size:10px;font-weight:600;color:var(--c-text);flex:1;cursor:pointer;}
.icon-row-btn:active{transform:scale(.96);}
.link-danger-btn{width:100%;background:none;border:none;color:#b8433f;font-size:12px;font-weight:600;padding:8px 6px;display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;}
.diag-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--c-border);gap:10px;}
.diag-row:last-of-type{border-bottom:none;}
.diag-label{font-size:12.5px;color:var(--c-muted);}
.diag-value{font-size:13px;font-weight:700;display:flex;align-items:center;text-align:right;}
.diag-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px;flex-shrink:0;}
.send-chip{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:10px;font-size:12.5px;font-weight:700;}
.success-anim-overlay{position:fixed;inset:0;z-index:999998;display:flex;align-items:center;justify-content:center;pointer-events:none;background:rgba(15,23,42,0);transition:background .25s ease;}
.success-anim-overlay.show{pointer-events:auto;}
.success-anim-card{position:relative;}
.success-anim-close{position:absolute;top:-10px;right:-10px;width:26px;height:26px;border-radius:50%;background:#fff;border:1px solid var(--c-border);box-shadow:0 2px 8px rgba(0,0,0,.15);display:flex;align-items:center;justify-content:center;color:#5b6470;cursor:pointer;}
.success-anim-ok{margin-top:6px;padding:8px 28px;}
.success-anim-overlay.show{background:rgba(15,23,42,.28);}
.success-anim-card{background:#fff;border-radius:22px;padding:28px 34px;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 20px 50px rgba(0,0,0,.25);transform:scale(.7);opacity:0;transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .25s ease;}
.success-anim-overlay.show .success-anim-card{transform:scale(1);opacity:1;}
.success-anim-circle{width:64px;height:64px;border-radius:50%;background:#22C55E;display:flex;align-items:center;justify-content:center;}
.success-anim-circle svg{stroke-dasharray:24;stroke-dashoffset:24;animation:successCheckDraw .4s ease .15s forwards;}
@keyframes successCheckDraw{to{stroke-dashoffset:0;}}
.success-anim-text{font-size:13.5px;font-weight:700;color:#1C2027;text-align:center;}
.weather-detect-btn{display:inline-flex;align-items:center;gap:4px;background:#E6F1FB;color:#0C6FBF;border:none;border-radius:20px;padding:3px 9px;font-size:10.5px;font-weight:700;cursor:pointer;vertical-align:middle;}
.weather-detect-link{display:inline-flex;align-items:center;gap:4px;background:none;border:none;color:#0C6FBF;font-size:11.5px;font-weight:700;cursor:pointer;padding:0;margin-left:auto;white-space:nowrap;flex-shrink:0;}
.weather-bulletin{display:flex;gap:12px;align-items:stretch;background:#F5FAFF;border:1px solid #DCEAF7;border-radius:12px;padding:12px 14px;margin:4px 0 2px;}
.wb-icon{font-size:30px;line-height:1;display:flex;align-items:center;flex-shrink:0;padding-right:12px;border-right:1px solid #DCEAF7;}
.wb-left{display:flex;flex-direction:column;gap:3px;justify-content:center;flex:1.15;min-width:0;}
.wb-cond{font-weight:800;font-size:13.5px;color:#132A42;}
.wb-line{font-size:12px;color:#4C5A73;}
.wb-right{display:flex;flex-direction:column;gap:3px;justify-content:center;flex:.9;padding-left:12px;border-left:1px solid #DCEAF7;min-width:0;}
.wb-row{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;}
.wb-row span{color:#6B7A8C;}
.wb-row b{color:#132A42;font-weight:700;text-align:right;}
@media (max-width:480px){
  .weather-bulletin{flex-direction:column;gap:8px;}
  .wb-icon{border-right:none;border-bottom:1px solid #DCEAF7;padding-right:0;padding-bottom:8px;}
  .wb-right{border-left:none;border-top:1px solid #DCEAF7;padding-left:0;padding-top:8px;}
}
.night-date-range{font-size:11.5px;color:#4C5A73;background:#EEF2FA;border-radius:8px;padding:5px 9px;margin-top:6px;display:inline-block;font-weight:600;}
.empty-note-lively{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 20px;gap:8px;}
.empty-note-icon{width:56px;height:56px;border-radius:50%;background:var(--c-bg);display:flex;align-items:center;justify-content:center;color:var(--c-accent);margin-bottom:4px;}
.empty-note-title{font-size:13.5px;font-weight:700;color:var(--c-primary);}
.empty-note-subtitle{font-size:12px;color:var(--c-muted);max-width:260px;line-height:1.4;}
/* subtable rows */
.subrow{
  border:1px solid var(--c-border);
  border-radius:var(--radius-sm);
  padding:38px 10px 10px;
  margin-bottom:8px;
  background:#fafbfb;
  position:relative;
}
.subrow .rm{position:absolute;top:6px;right:6px;width:28px;height:28px;padding:0;}
.check-line{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--c-text);margin-top:6px;}
.check-line input{width:auto;}
.empty-note{
  text-align:center;color:var(--c-muted);font-size:13px;padding:18px 10px;border:1px dashed var(--c-border);border-radius:var(--radius-sm);
}
/* ---- Photos ---- */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-top:20px;}
.photo-thumb .annotate{position:absolute;top:3px;left:3px;background:rgba(20,20,20,.65);color:#fff;border:none;border-radius:6px;width:22px;height:22px;font-size:13px;line-height:1;padding:0;display:flex;align-items:center;justify-content:center;}
.photo-annotator-overlay{position:fixed;inset:0;z-index:999997;background:#000;display:flex;flex-direction:column;}
.photo-annotator-canvas-wrap{flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;position:relative;}
.photo-annotator-canvas-wrap canvas{max-width:100%;max-height:100%;touch-action:none;}
.photo-annotator-toolbar{background:#17181B;padding:10px 12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.photo-annotator-toolbar button{flex-shrink:0;background:#2A2C31;color:#fff;border:none;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:700;display:flex;align-items:center;gap:6px;}
.photo-annotator-toolbar button.active{background:#E11D2E;}
.photo-annotator-toolbar button.primary{background:#22C55E;margin-left:auto;}
.photo-annotator-toolbar button.ghost{background:transparent;color:#c9cdd3;}
.photo-thumb{position:relative;border-radius:8px;overflow:hidden;aspect-ratio:1;background:#eee;}
.photo-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.photo-thumb .rm{position:absolute;top:3px;right:3px;background:rgba(20,20,20,.65);color:#fff;border:none;border-radius:6px;width:22px;height:22px;font-size:13px;line-height:1;padding:0;display:flex;align-items:center;justify-content:center;}
.photo-add{
  border:2px dashed var(--c-border);border-radius:8px;aspect-ratio:1;
  display:flex;align-items:center;justify-content:center;color:var(--c-muted);font-size:26px;cursor:pointer;background:#fafbfb;
}
/* ---- Bottom nav ---- */
.bottomnav{
  position:fixed;left:0;right:0;bottom:0;
  max-width:920px;margin:0 auto;
  background:linear-gradient(180deg,#eef3f7 0%,#ffffff 55%);
  border-top:2px solid var(--c-accent);
  display:flex;
  z-index:30;
  padding-bottom:env(safe-area-inset-bottom);
}
@media (min-width:900px){ .bottomnav{max-width:960px;} }
@media (min-width:1200px){ .bottomnav{max-width:1080px;} }
.bottomnav button{
  flex:1;background:none;border:none;border-radius:0;
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:13px 4px 11px;color:var(--c-muted);font-size:12.5px;font-weight:700;letter-spacing:.2px;
}
.bottomnav button.active{color:var(--c-accent-dark);}
.bottomnav svg{width:27px;height:27px;}
/* ---- History list ---- */
.fiche-item{
  display:flex;justify-content:space-between;align-items:flex-start;gap:10px;
  border:1px solid var(--c-border);border-radius:var(--radius-sm);padding:12px;margin-bottom:8px;background:#fff;
}
.fiche-item .meta b{font-size:14px;}
.fiche-item .meta div{font-size:12px;color:var(--c-muted);margin-top:2px;}
.fiche-item .acts{display:flex;flex-direction:column;gap:6px;}
/* ---- Admin tabs ---- */
.subtabs{display:flex;gap:6px;margin-bottom:14px;overflow-x:auto;padding-bottom:2px;}
.subtabs button{white-space:nowrap;background:#fff;border:1px solid var(--c-border);color:var(--c-muted);}
.subtabs button.active{background:var(--c-primary);color:#fff;border-color:var(--c-primary);}
.list-edit-row{display:flex;gap:6px;align-items:center;margin-bottom:6px;}
.list-edit-row input{flex:1;}
.swatch-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
.swatch{
  width:38px;height:38px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--c-border);cursor:pointer;
}
.swatch.selected{box-shadow:0 0 0 2px var(--c-text);}
.color-input-line{display:flex;align-items:center;gap:10px;margin-top:8px;}
.color-input-line input[type=color]{width:44px;height:34px;padding:2px;border:1px solid var(--c-border);border-radius:8px;background:#fff;}
.preset-card{
  border:1px solid var(--c-border);border-radius:var(--radius-sm);padding:10px;display:flex;align-items:center;gap:10px;cursor:pointer;margin-bottom:8px;
}
.preset-card .dots{display:flex;gap:4px;}
.preset-card .dots span{width:16px;height:16px;border-radius:50%;display:inline-block;}
.toast{
  position:fixed;left:50%;bottom:92px;transform:translateX(-50%);
  background:var(--c-primary);color:#fff;padding:10px 14px 10px 16px;border-radius:30px;font-size:13px;font-weight:600;
  box-shadow:var(--shadow);z-index:60;opacity:0;pointer-events:none;transition:opacity .25s, transform .25s;cursor:pointer;
  display:flex;align-items:center;gap:10px;max-width:min(90vw,420px);
}
.toast .toast-close{flex-shrink:0;opacity:.65;display:flex;}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-4px);}
.hidden{display:none !important;}
.stat-box{background:#fff;border:1px solid var(--c-border);border-radius:var(--radius-sm);padding:12px;text-align:center;}
.stat-box b{font-size:20px;display:block;}
.stat-box span{font-size:11px;color:var(--c-muted);text-transform:uppercase;letter-spacing:.4px;}
.hbar-row{display:flex;align-items:center;gap:8px;margin-bottom:9px;border:1px solid var(--c-border);border-radius:11px;padding:11px 12px;background:var(--c-surface);transition:border-color .2s,box-shadow .2s;}
.hbar-row:hover{border-color:#9edca9;box-shadow:0 2px 8px rgba(28,32,39,.06);}
.hbar-row .name{width:150px;font-size:12.5px;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hbar-track{flex:1;background:#eef0f1;border-radius:999px;height:13px;overflow:hidden;display:flex;}
.hbar-fill{height:100%;background:linear-gradient(90deg,#17a93b,#1ec84b);}
.hbar-fill-ot{background:linear-gradient(90deg,#2563eb,#3b82f6);}
.hbar-val{font-size:12.5px;font-weight:800;width:62px;text-align:right;flex-shrink:0;}
.section-note{font-size:12px;color:var(--c-muted);margin-top:-4px;margin-bottom:10px;}
.admin-backbar{position:sticky;z-index:15;background:var(--c-bg);padding:8px 0;margin:-8px 0 2px;}
.logo-preview{display:flex;align-items:center;gap:14px;margin-bottom:10px;}
.logo-preview img{max-height:60px;max-width:160px;background:#fff;border:1px solid var(--c-border);border-radius:8px;padding:6px;}
a.link-btn{text-decoration:none;}

@media (max-width:560px){
  .topbar{
    gap:9px;
    padding:calc(9px + env(safe-area-inset-top)) 9px 9px;
  }
  .topbar .brandtext b{
    font-size:14px;
  }
  .topbar .brandtext span{
    font-size:8px;
    letter-spacing:.12px;
    line-height:1.16;
  }
  .topbar .ticket-tab{
    font-size:9px;
    padding:4px 6px;
  }
  #darkModeToggle{
    width:30px !important;
    height:30px !important;
    font-size:15px !important;
  }
}

.brand-o{color:#1ec84b !important;font:inherit !important;font-size:inherit !important;font-weight:inherit !important;line-height:inherit !important;letter-spacing:inherit !important;text-transform:inherit !important;vertical-align:baseline !important;display:inline !important;}
.topbar .brandtext b .brand-o{font-size:inherit !important;font-weight:inherit !important;line-height:inherit !important;letter-spacing:inherit !important;}

/* ============================================================
   TRACÉO 2.1.15 — Graphique Heures mobile corrigé
   Adaptation visuelle uniquement : aucune logique métier modifiée.
   ============================================================ */
:root{
  --app-max-width:1080px;
  --touch-min:44px;
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{overflow-x:hidden;}
img,canvas,svg,video{max-width:100%;}
button,input,select,textarea{font:inherit;}
button,.navbtn,.btn-primary,.btn-outline,.btn-dark,.btn-danger{touch-action:manipulation;}

/* Les tableaux restent lisibles sans élargir toute la page. */
.table-wrap,.responsive-table,[data-table-wrap]{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
table{max-width:100%;}

/* Fenêtres et contenus longs : jamais hors écran. */
.modal,.modal-card,.dialog,.popup-card,[role="dialog"]{
  max-width:min(94vw,720px);
  max-height:min(90dvh,900px);
  overflow:auto;
  overscroll-behavior:contain;
}

/* Téléphone compact */
@media (max-width:599px){
  .app-shell{width:100%;min-height:100dvh;}
  .view{padding-left:10px;padding-right:10px;padding-bottom:calc(92px + env(safe-area-inset-bottom));}
  .card,.section-card{padding:12px;}
  .grid2,.grid3,.grid4,.form-grid,.stats-grid{grid-template-columns:minmax(0,1fr) !important;}
  input,select,textarea{font-size:16px;max-width:100%;}
  textarea{min-height:96px;}
  button,.btn-primary,.btn-outline,.btn-dark,.btn-danger{min-height:var(--touch-min);}
  .btn-sm{min-height:38px;}
  .actions,.action-row,.btn-row{display:flex;flex-wrap:wrap;gap:8px;}
  .actions > button,.action-row > button,.btn-row > button{flex:1 1 145px;}
  .fiche-item{flex-direction:column;align-items:stretch;}
  .fiche-item .acts{flex-direction:row;flex-wrap:wrap;width:100%;}
  .fiche-item .acts button{flex:1 1 120px;}
  .list-edit-row{align-items:stretch;flex-wrap:wrap;}
  .list-edit-row input{flex-basis:100%;}
  .hbar-row{align-items:flex-start;flex-wrap:wrap;}
  .hbar-row .name{width:100%;white-space:normal;}
  .hbar-track{min-width:150px;}
  .subtabs{scroll-snap-type:x proximity;}
  .subtabs button{scroll-snap-align:start;min-height:40px;}
  .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .bottomnav{max-width:none;overflow-x:auto;justify-content:flex-start;scrollbar-width:none;}
  .bottomnav::-webkit-scrollbar{display:none;}
  .bottomnav button{min-width:64px;padding:8px 3px 7px;font-size:10.5px;gap:3px;}
  .bottomnav svg{width:24px;height:24px;flex:none;}
  .toast{bottom:calc(78px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);text-align:center;}
  .logo-preview{align-items:flex-start;flex-direction:column;}
}

/* Très petits téléphones */
@media (max-width:360px){
  .view{padding-left:7px;padding-right:7px;}
  .bottomnav button{min-width:58px;font-size:9.5px;}
  .bottomnav svg{width:22px;height:22px;}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .topbar .ticket-tab{display:none;}
}

/* Tablette portrait et paysage */
@media (min-width:600px) and (max-width:1023px){
  .app-shell{max-width:100%;}
  .view{padding:20px 22px 108px;}
  .grid2,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .grid3,.grid4,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .bottomnav{max-width:100%;}
  .bottomnav button{min-height:68px;}
  .modal,.modal-card,.dialog,.popup-card,[role="dialog"]{max-width:min(88vw,760px);}
  .photo-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));}
}

/* Ordinateur et grandes tablettes */
@media (min-width:1024px){
  body{padding:18px 18px 0;}
  .app-shell{max-width:var(--app-max-width);min-height:calc(100vh - 18px);margin:0 auto;border-radius:16px 16px 0 0;overflow:hidden;}
  .view{padding:24px 30px 112px;}
  .grid2,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .grid3,.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .grid4{grid-template-columns:repeat(4,minmax(0,1fr));}
  .bottomnav{max-width:var(--app-max-width);border-radius:12px 12px 0 0;}
  .bottomnav button{padding-top:10px;padding-bottom:9px;}
  .bottomnav button:hover{background:rgba(30,200,75,.06);}
  .fiche-item .acts{min-width:150px;}
  .modal,.modal-card,.dialog,.popup-card,[role="dialog"]{max-width:min(78vw,820px);}
}

/* Grand écran : largeur maîtrisée pour garder une lecture confortable. */
@media (min-width:1440px){
  :root{--app-max-width:1180px;}
  .view{padding-left:40px;padding-right:40px;}
}

/* Orientation paysage basse : préserver l'accès aux actions. */
@media (orientation:landscape) and (max-height:520px){
  .topbar{position:relative;}
  .view{padding-bottom:78px;}
  .bottomnav button{padding-top:5px;padding-bottom:5px;gap:1px;}
  .bottomnav svg{width:21px;height:21px;}
  .modal,.modal-card,.dialog,.popup-card,[role="dialog"]{max-height:82dvh;}
}

/* Correctif 2.1.15 — graphique Heures sur téléphone */
.heures-synthese-grid{
  display:grid;
  grid-template-columns:minmax(130px,170px) minmax(260px,1fr) minmax(280px,1.15fr);
  gap:16px;
  align-items:start;
  min-width:0;
}
.heures-synthese-grid > *{min-width:0;max-width:100%;}
@media (max-width:599px){
  .heures-synthese-grid{
    grid-template-columns:minmax(0,1fr);
    gap:14px;
    width:100%;
    max-width:100%;
    overflow:hidden;
  }
  .heures-synthese-grid > div:first-child{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
  }
  .heures-synthese-grid svg{
    width:min(130px,42vw) !important;
    height:auto !important;
    max-width:100% !important;
  }
  .heures-synthese-grid .stat-box{min-width:0;overflow-wrap:anywhere;}
}

/* Mes fiches : classement automatique par mois */
.my-pdf-month-folder{border:1px solid var(--c-border);border-radius:14px;background:var(--c-surface);margin:10px 0;overflow:hidden;}
.my-pdf-month-folder>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:52px;padding:10px 12px;cursor:pointer;user-select:none;background:color-mix(in srgb,var(--c-primary) 7%,var(--c-surface));}
.my-pdf-month-folder>summary::-webkit-details-marker{display:none;}
.my-pdf-month-folder>summary::after{content:'›';font-size:24px;line-height:1;color:var(--c-muted);margin-left:4px;transform:rotate(0deg);transition:transform .18s ease;}
.my-pdf-month-folder[open]>summary::after{transform:rotate(90deg);}
.my-pdf-folder-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;color:#D97706;background:#FFF7E6;flex:0 0 auto;}
.my-pdf-folder-title{font-weight:800;flex:1;min-width:0;}
.my-pdf-folder-count{font-size:12px;font-weight:700;color:var(--c-muted);white-space:nowrap;}
.my-pdf-folder-content{padding:8px 10px 10px;}
.my-pdf-folder-content .fiche-item:last-child{margin-bottom:0;}
@media(max-width:560px){
  .my-pdf-month-folder>summary{padding:9px 10px;gap:8px;}
  .my-pdf-folder-count{font-size:11px;}
  .my-pdf-folder-content{padding:6px 8px 8px;}
}

/* Correctif 2.1.34 — pied de page discret en bas de chaque page */
.app-footer-global{
  position:static;
  width:100%;
  text-align:center;
  font-size:12px;
  line-height:1.35;
  font-weight:600;
  color:#5b6470;
  padding:10px 14px calc(84px + env(safe-area-inset-bottom));
  margin-top:auto;
  background:transparent;
  border:0;
  pointer-events:none;
}
@media(max-width:599px){
  .app-footer-global{font-size:10.5px;padding:8px 8px calc(76px + env(safe-area-inset-bottom));}
}

/* Sélecteur d'heure TRACÉO pour Android : remplace la fenêtre native qui peut
   déborder sur certains téléphones et tronquer le bouton « Définir ». */
.traceo-time-overlay{
  position:fixed;inset:0;z-index:10050;
  display:flex;align-items:center;justify-content:center;
  padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));
  background:rgba(15,18,22,.72);
}
.traceo-time-dialog{
  width:min(420px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  box-sizing:border-box;
  overflow:hidden;
  background:#fff;color:#1C2027;border-radius:18px;
  padding:20px 16px 16px;
  box-shadow:0 18px 55px rgba(0,0,0,.35);
}
.traceo-time-title{font-size:20px;font-weight:900;text-align:center;margin:0 0 16px;}
.traceo-time-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center;min-width:0;}
.traceo-time-row select{width:100%;min-width:0;max-width:100%;font-size:18px;text-align:center;padding:12px 8px;}
.traceo-time-sep{font-size:24px;font-weight:900;text-align:center;}
.traceo-time-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:18px;}
.traceo-time-actions button{width:100%;min-width:0;white-space:nowrap;padding:12px 8px;font-size:15px;}
@media(max-width:360px){
  .traceo-time-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:18px 12px 14px;}
  .traceo-time-actions{gap:8px;}
  .traceo-time-actions button{font-size:14px;padding:12px 5px;}
}

/* ============================================================
   TRACÉO 2.1.38 — adaptation complète multi-écrans
   Téléphone, tablette, PC et grand écran — visuel uniquement.
   ============================================================ */
:root{
  --responsive-page-max:1440px;
  --responsive-content-max:1320px;
  --responsive-gutter:clamp(10px,2.2vw,42px);
}
html,body{width:100%;max-width:100%;overflow-x:hidden;}
body{min-height:100dvh;}
/* WebKit peut conserver une ancienne valeur de 100dvh après le réveil d'un
   iPhone/iPad. La hauteur réelle est recalculée par traceo-boot.js. */
html[data-ios-device="true"],
html[data-ios-device="true"] body,
html[data-ios-device="true"] .app-shell{
  min-height:var(--traceo-ios-height,100dvh);
}
.app-shell{
  width:100%;
  max-width:var(--responsive-page-max);
  min-height:100dvh;
  margin-inline:auto;
}
.view{
  width:100%;
  max-width:var(--responsive-content-max);
  margin-inline:auto;
  padding-inline:var(--responsive-gutter);
}
.card,.section-card,.fiche-item,.stat-box,.subrow,.preset-card{
  max-width:100%;
  min-width:0;
}
.grid,.grid-2,.grid-3,.grid2,.grid3,.grid4,.form-grid,.stats-grid,
.heures-synthese-grid,.admin-hub-grid{
  width:100%;
  min-width:0;
}
.grid>* ,.grid-2>* ,.grid-3>* ,.grid2>* ,.grid3>* ,.grid4>* ,
.form-grid>* ,.stats-grid>* ,.heures-synthese-grid>* ,.admin-hub-grid>*{
  min-width:0;
}
input,select,textarea,button,.csel-wrap,.csel-display,.native-date-time{
  max-width:100%;
}
.table-wrap,.responsive-table,[data-table-wrap]{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
}
table{width:100%;border-collapse:collapse;}
img,svg,canvas,video{max-width:100%;height:auto;}
.modal,.modal-card,.dialog,.popup-card,[role="dialog"]{
  width:min(720px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px);
  margin:auto;
  overflow:auto;
}
.traceo-time-dialog{
  width:min(420px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  overflow:auto;
}
.bottomnav{
  width:min(100%,var(--responsive-page-max));
  max-width:var(--responsive-page-max);
}

/* Téléphones compacts */
@media (max-width:479px){
  :root{--responsive-gutter:8px;}
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom));}
  .topbar{gap:8px;padding-inline:9px;}
  .topbar .brandtext b{font-size:13px;line-height:1.18;}
  .topbar .ticket-tab{display:none;}
  .view{padding-top:10px;padding-bottom:18px;}
  .card,.section-card{padding:11px;border-radius:10px;margin-bottom:10px;}
  .card h2{font-size:12px;letter-spacing:.55px;}
  .grid-2,.grid-3,.grid2,.grid3,.grid4,.form-grid,.stats-grid,
  .heures-synthese-grid,.admin-hub-grid{grid-template-columns:minmax(0,1fr)!important;}
  .row-actions,.actions,.action-row,.btn-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:7px!important;
  }
  .row-actions>button,.actions>button,.action-row>button,.btn-row>button{
    width:100%;justify-content:center;min-height:44px;
  }
  .month-picker{grid-template-columns:42px minmax(0,1fr) 42px;gap:6px;}
  .fiche-item{padding:10px;gap:8px;}
  .fiche-item .acts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
  .fiche-item .acts button{width:100%;justify-content:center;}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .bottomnav{overflow-x:auto;justify-content:flex-start;scrollbar-width:none;}
  .bottomnav::-webkit-scrollbar{display:none;}
  .bottomnav button{flex:0 0 64px;min-width:64px;font-size:10px;padding:7px 2px 6px;}
  .bottomnav svg{width:22px;height:22px;}
  .app-footer-global{padding-bottom:calc(72px + env(safe-area-inset-bottom));}
  .traceo-time-row{gap:6px;}
  .traceo-time-dialog{padding:16px 12px 12px;border-radius:14px;}
  .traceo-time-title{font-size:18px;margin-bottom:12px;}
}

/* Téléphones standards et grands téléphones */
@media (min-width:480px) and (max-width:767px){
  :root{--responsive-gutter:12px;}
  .grid-2,.grid-3,.grid2,.grid3,.grid4,.form-grid,.stats-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .admin-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .row-actions,.actions,.action-row,.btn-row{display:flex;flex-wrap:wrap;gap:8px;}
  .row-actions>button,.actions>button,.action-row>button,.btn-row>button{flex:1 1 170px;justify-content:center;}
  .fiche-item{flex-direction:column;align-items:stretch;}
  .fiche-item .acts{flex-direction:row;flex-wrap:wrap;}
  .fiche-item .acts button{flex:1 1 135px;justify-content:center;}
  .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .bottomnav{overflow-x:auto;scrollbar-width:none;}
  .bottomnav::-webkit-scrollbar{display:none;}
  .bottomnav button{min-width:68px;font-size:10.5px;}
}

/* Tablettes portrait */
@media (min-width:768px) and (max-width:1023px){
  :root{--responsive-gutter:clamp(18px,3vw,28px);}
  .app-shell{max-width:100%;}
  .grid-2,.grid2,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .grid-3,.grid3,.grid4,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .admin-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:720px!important;}
  .heures-synthese-grid{grid-template-columns:minmax(150px,190px) minmax(0,1fr)!important;}
  .heures-synthese-grid>*:last-child{grid-column:1/-1;}
  .photo-grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));}
  .bottomnav{max-width:100%;}
  .bottomnav button{min-height:70px;}
}

/* PC et grandes tablettes */
@media (min-width:1024px) and (max-width:1439px){
  :root{--responsive-page-max:1180px;--responsive-content-max:1100px;}
  body{padding:18px 18px 0;}
  .app-shell{min-height:calc(100dvh - 18px);border-radius:16px 16px 0 0;overflow:hidden;}
  .grid-2,.grid2,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .grid-3,.grid3,.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .grid4{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .admin-hub-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;max-width:760px!important;}
  .heures-synthese-grid{grid-template-columns:minmax(160px,190px) minmax(280px,1fr) minmax(320px,1.15fr)!important;}
}

/* Grands écrans */
@media (min-width:1440px){
  :root{--responsive-page-max:1520px;--responsive-content-max:1400px;--responsive-gutter:48px;}
  body{padding:24px 24px 0;}
  .app-shell{min-height:calc(100dvh - 24px);border-radius:18px 18px 0 0;overflow:hidden;}
  .view{padding-top:32px;padding-bottom:126px;}
  .card{padding:24px 30px;margin-bottom:18px;}
  .grid-2,.grid2,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .grid-3,.grid3,.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .grid4{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .admin-hub-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;max-width:980px!important;}
  .heures-synthese-grid{grid-template-columns:minmax(170px,210px) minmax(360px,1fr) minmax(420px,1.2fr)!important;}
  .photo-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));}
  .bottomnav button{padding-top:13px;padding-bottom:12px;}
}

/* Très grands écrans : éviter les lignes interminables. */
@media (min-width:1900px){
  :root{--responsive-page-max:1680px;--responsive-content-max:1540px;}
  .view{padding-inline:64px;}
}

/* Paysage à faible hauteur */
@media (orientation:landscape) and (max-height:560px){
  .topbar{position:relative;}
  .view{padding-bottom:78px;}
  .bottomnav button{min-height:54px;padding-top:5px;padding-bottom:5px;gap:2px;}
  .bottomnav svg{width:21px;height:21px;}
  .modal,.modal-card,.dialog,.popup-card,[role="dialog"],.traceo-time-dialog{max-height:calc(100dvh - 16px);}
}

/* ============================================================
   TRACÉO 2.1.39 — véritable plein écran sur ordinateur
   Téléphone et tablette inchangés.
   ============================================================ */
@media (min-width:1024px){
  :root{
    --responsive-page-max:none;
    --responsive-content-max:none;
    --responsive-gutter:clamp(24px,3vw,64px);
  }
  body{padding:0;background:var(--c-bg);}
  .app-shell{
    width:100%;
    max-width:none;
    min-height:100dvh;
    margin:0;
    border:0;
    border-radius:0;
    box-shadow:none;
    overflow:visible;
  }
  .view{
    width:100%;
    max-width:none;
    margin:0;
    padding-left:var(--responsive-gutter);
    padding-right:var(--responsive-gutter);
  }
  .bottomnav{
    width:100%;
    max-width:none;
    margin:0;
    border-left:0;
    border-right:0;
    border-radius:0;
  }
}
@media (min-width:1900px){
  :root{--responsive-gutter:clamp(56px,4vw,96px);}
  .view{padding-left:var(--responsive-gutter);padding-right:var(--responsive-gutter);}
}

/* TRACÉO 2.1.48 — Autocontrôle professionnel multi-métiers */
.ac-pro-hero{background:linear-gradient(135deg,var(--c-primary),var(--c-primary-2));color:#fff;border-radius:16px;padding:18px;margin-bottom:14px;box-shadow:var(--shadow)}
.ac-pro-hero h2{margin:0 0 5px;color:#fff;font-size:20px;text-transform:none;letter-spacing:0}.ac-pro-hero h2::before{display:none}.ac-pro-hero p{margin:0;color:rgba(255,255,255,.78);font-size:13px}
.ac-pro-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ac-metier-card{border:1.5px solid var(--c-border);border-radius:14px;background:var(--c-surface);padding:15px;cursor:pointer;display:flex;align-items:center;gap:12px;min-height:92px;transition:transform .15s,border-color .15s,box-shadow .15s}.ac-metier-card:hover{transform:translateY(-1px);border-color:#8ccf98;box-shadow:0 5px 16px rgba(16,20,24,.09)}.ac-metier-icon{width:46px;height:46px;border-radius:13px;display:flex;align-items:center;justify-content:center;flex:none}.ac-metier-card b{display:block;font-size:14px}.ac-metier-card small{display:block;color:var(--c-muted);margin-top:4px;line-height:1.3}
.ac-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.ac-kpi{border:1px solid var(--c-border);border-radius:11px;padding:10px;background:var(--c-surface);text-align:center}.ac-kpi b{display:block;font-size:20px}.ac-kpi span{font-size:10px;text-transform:uppercase;color:var(--c-muted);font-weight:700}.ac-progress{height:8px;background:#e8ecef;border-radius:999px;overflow:hidden}.ac-progress>span{display:block;height:100%;background:linear-gradient(90deg,var(--c-accent),#22c55e);border-radius:inherit}
.ac-point-card{border:1px solid var(--c-border);border-radius:12px;padding:13px;margin-bottom:10px;background:var(--c-surface)}.ac-point-card[data-status="non"]{border-color:#e7a7a7;background:#fff8f8}.ac-answer-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.ac-fav{border-radius:999px;padding:7px 10px}.ac-sticky-actions{position:sticky;bottom:calc(72px + env(safe-area-inset-bottom));z-index:12;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border:1px solid var(--c-border);border-radius:14px;padding:10px;box-shadow:0 -4px 18px rgba(16,20,24,.08)}.ac-mobile-nav{display:none}.ac-nc-summary{border-left:4px solid var(--c-danger);background:#fff7f7;padding:10px 12px;border-radius:8px;margin-top:10px}.ac-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ac-search{position:relative}.ac-search input{padding-left:38px}.ac-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none}.ac-recent-card{border:1px solid var(--c-border);border-radius:12px;padding:12px;background:#fafbfb;display:flex;justify-content:space-between;gap:10px;align-items:center}.ac-model-row{display:flex;align-items:center;gap:10px;border:1px solid var(--c-border);border-radius:12px;padding:12px;margin-bottom:8px;background:var(--c-surface)}.ac-model-row .meta{flex:1;min-width:0}.ac-model-row .meta b{font-size:14px}.ac-model-row .meta div{font-size:12px;color:var(--c-muted);margin-top:3px}
@media(max-width:599px){.ac-pro-grid{grid-template-columns:1fr}.ac-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ac-info-grid{grid-template-columns:1fr}.ac-point-card{display:none}.ac-point-card.ac-mobile-active{display:block}.ac-mobile-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:10px 0}.ac-mobile-nav button:last-child{justify-self:end}.ac-sticky-actions{bottom:calc(68px + env(safe-area-inset-bottom))}.ac-answer-row{grid-template-columns:1fr}.ac-answer-row button{min-height:46px}.ac-metier-card{min-height:78px}.ac-pro-hero{padding:15px}}
@media(min-width:900px){.ac-pro-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* TRACÉO 2.1.50 — suppression sécurisée des modèles personnalisés */
.ac-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0}.ac-toolbar .spacer{flex:1}.ac-help{margin-top:8px;border:1px dashed var(--c-border);border-radius:9px;background:#f8faf9}.ac-help summary{cursor:pointer;padding:8px 10px;font-size:12px;font-weight:700;color:var(--c-muted)}.ac-help-content{padding:0 10px 10px;font-size:12px;color:var(--c-muted);line-height:1.45}.ac-corrective{margin-top:9px;padding:10px;border-radius:10px;background:#fff3f3;border:1px solid #efc0c0}.ac-review-overlay{position:fixed;inset:0;z-index:10080;background:rgba(15,18,22,.72);display:flex;align-items:center;justify-content:center;padding:14px}.ac-review-dialog{width:min(720px,calc(100vw - 28px));max-height:88dvh;overflow:auto;background:var(--c-surface);border-radius:16px;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.35)}.ac-review-list{display:grid;gap:8px;margin:12px 0}.ac-review-item{border:1px solid var(--c-border);border-radius:10px;padding:10px;background:#fafbfb}.ac-review-item.bad{border-color:#e7a7a7;background:#fff8f8}.ac-quick-mode .ac-point-card{display:none}.ac-quick-mode .ac-point-card.ac-mobile-active{display:block}.ac-quick-mode .ac-mobile-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:10px 0}.ac-custom-create{border:1.5px dashed #8ccf98;background:#f5fbf6}

/* TRACÉO 2.1.57.2 — menu Fiche compact, style Administration */
.fiche-hub-card{text-align:center;padding:18px 18px 20px;}
.fiche-hub-heading{display:flex;align-items:center;justify-content:center;gap:10px;}
.fiche-hub-heading h2::before{display:none;}
.fiche-hub-folder{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#2E9B42;background:#EAF7EC;border:1px solid #CDE9D2;flex:none;}
.fiche-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,150px));justify-content:center;gap:26px 34px;max-width:420px;margin:18px auto 0;}
.fiche-hub-option{width:100%;padding:4px;background:transparent;border:0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;color:var(--c-primary);box-shadow:none;transition:transform .16s ease;}
.fiche-hub-option:hover{transform:translateY(-2px);}
.fiche-hub-option:active{transform:scale(.97);}
.fiche-hub-option strong{font-size:13px;line-height:1.25;}
.fiche-hub-desc{font-size:11px;color:var(--c-muted);line-height:1.3;}
.fiche-hub-icon{width:64px;height:64px;border-radius:18px;display:flex;align-items:center;justify-content:center;border:1.5px solid transparent;box-shadow:0 2px 7px rgba(16,20,24,.06);}
.fiche-hub-icon svg{width:30px;height:30px;}
.fiche-hub-access{display:none;}
.fiche-hub-chantier .fiche-hub-icon{color:#2E9B42;background:#EAF7EC;border-color:#BEE3C5;}
.fiche-hub-basevie .fiche-hub-icon{color:#2563C7;background:#EAF1FF;border-color:#C8D9F5;}
.fiche-hub-info{display:flex;align-items:center;justify-content:center;gap:8px;max-width:620px;margin:20px auto 0;padding:10px 13px;border-radius:10px;background:#EFF8F0;border:1px solid #D8ECD9;color:#275F31;font-size:12px;}
.fiche-hub-info>span:first-child{font-size:18px;flex:none;}
@media(max-width:599px){
  .fiche-hub-card{padding:15px 10px 17px;}
  .fiche-hub-grid{grid-template-columns:repeat(2,minmax(0,128px));gap:22px 20px;margin-top:14px;}
  .fiche-hub-icon{width:58px;height:58px;border-radius:17px;}
  .fiche-hub-icon svg{width:27px;height:27px;}
  .fiche-hub-option strong{font-size:12px;}
  .fiche-hub-desc{font-size:10.5px;}
  .fiche-hub-info{font-size:11px;margin-top:17px;}
}

/* TRACÉO 2.1.57.4 — Autocontrôle utilise exactement le composant visuel du menu Fiche */
.autocontrole-hub-grid{grid-template-columns:repeat(2,minmax(0,150px));max-width:420px;}
.autocontrole-hub-electricite .fiche-hub-icon{color:#D97706;background:#FFF7E6;border-color:#F5D7A3;}
.autocontrole-hub-balisage .fiche-hub-icon{color:#2563C7;background:#EAF1FF;border-color:#C8D9F5;}
.autocontrole-hub-photometrie .fiche-hub-icon{color:#7C3AED;background:#F1ECFF;border-color:#DDD2FA;}
.autocontrole-hub-genie-civil .fiche-hub-icon{color:#475569;background:#EEF2F6;border-color:#CBD5E1;}
@media(max-width:599px){
  .autocontrole-hub-grid{grid-template-columns:repeat(2,minmax(0,128px));max-width:320px;}
}


/* ============================================================
   Stabilisation interface — cohérence multi-écrans
   Aucun changement métier : uniquement dimensions et débordements sûrs.
   ============================================================ */
:where(.card,.section-card,.fiche-item,.subrow,.stat-box){min-width:0;}
:where(input,select,textarea,.csel-display){box-sizing:border-box;}
:where(.row-actions,.actions,.action-row,.btn-row){min-width:0;}
:where(.row-actions,.actions,.action-row,.btn-row)>button{max-width:100%;}
@media (max-width:767px){
  .modal,.modal-card,.dialog,.popup-card,[role="dialog"]{
    width:min(100% - 16px,720px);
    max-width:calc(100vw - 16px);
  }
  .subtabs{-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;}
  .table-wrap,.responsive-table,[data-table-wrap]{scrollbar-width:thin;}
}

/* ============================================================
   Correctif iPhone / iOS — navigation basse et zones sûres
   Modification visuelle uniquement : aucun JavaScript métier.
   ============================================================ */
@supports (-webkit-touch-callout:none){
  /* Respecte l'encoche / Dynamic Island en paysage et les bords iOS. */
  .topbar{
    padding-left:max(10px, env(safe-area-inset-left));
    padding-right:max(10px, env(safe-area-inset-right));
  }

  @media (max-width:767px){
    .view{
      padding-left:max(8px, env(safe-area-inset-left));
      padding-right:max(8px, env(safe-area-inset-right));
    }

    /* Sur iPhone, les 6 onglets doivent tenir dans la largeur utile.
       On désactive le défilement horizontal qui pouvait laisser la barre
       visuellement décalée vers la droite après un geste ou une restauration. */
    .bottomnav{
      left:0;
      right:0;
      width:100%;
      max-width:none;
      margin:0;
      box-sizing:border-box;
      overflow-x:hidden;
      justify-content:stretch;
      padding-left:env(safe-area-inset-left);
      padding-right:env(safe-area-inset-right);
      padding-bottom:env(safe-area-inset-bottom);
    }
    .bottomnav button{
      flex:1 1 0 !important;
      width:auto;
      min-width:0 !important;
      max-width:none;
      padding-left:1px;
      padding-right:1px;
      white-space:normal;
      overflow-wrap:anywhere;
      text-align:center;
      line-height:1.05;
    }
  }

  @media (max-width:599px){
    /* iOS/Safari zoome automatiquement les champs < 16 px : ce zoom peut
       décaler toute l’interface et la barre basse. 16 px évite ce comportement
       sans modifier les écrans tablette/PC. */
    input[type=text],input[type=number],input[type=date],input[type=time],
    input[type=password],input[type=email],select,textarea,.csel-display{
      font-size:16px;
    }
  }

  @media (max-width:390px){
    .bottomnav button{font-size:9.5px !important;gap:2px;}
    .bottomnav svg{width:22px;height:22px;}
  }

  @media (max-width:340px){
    .bottomnav button{font-size:9px !important;}
    .bottomnav svg{width:21px;height:21px;}
  }
}

/* ============================================================
   Pré-production — navigation mobile uniforme Android / iPhone
   Les 6 onglets occupent toujours la largeur utile sans défilement.
   ============================================================ */
@media (max-width:767px){
  .bottomnav{
    left:0;right:0;width:100%;max-width:none;margin:0;box-sizing:border-box;
    overflow-x:hidden;justify-content:stretch;
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .bottomnav button{
    flex:1 1 0 !important;width:auto;min-width:0 !important;max-width:none;
    padding-left:1px;padding-right:1px;white-space:normal;overflow-wrap:anywhere;
    text-align:center;line-height:1.05;
  }
}
@media (max-width:390px){
  .bottomnav button{font-size:9.5px !important;gap:2px;}
  .bottomnav svg{width:22px;height:22px;}
}
@media (max-width:340px){
  .bottomnav button{font-size:9px !important;}
  .bottomnav svg{width:21px;height:21px;}
}

/* ============================================================
   TRACÉO 2.8.51 — Accueil synthétique
   Ajout isolé : aucun format métier / stockage n'est modifié.
   ============================================================ */
.home-dashboard{max-width:1060px;margin:0 auto;padding:4px 0 12px}
.home-greeting{margin:4px 0 16px}
.home-greeting h1{margin:0 0 4px;font-size:clamp(22px,4vw,31px);color:var(--c-primary);font-weight:850;letter-spacing:-.02em}
.home-date{color:var(--c-accent-dark);font-weight:750;font-size:14px}
.home-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin-bottom:14px}
.home-search-box{position:relative}
.home-search-box svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--c-muted);pointer-events:none}
.home-search-input{width:100%;min-height:48px;padding:11px 14px 11px 43px;border:1px solid var(--c-border);border-radius:11px;background:var(--c-surface);color:var(--c-text);font:inherit;box-shadow:var(--shadow)}
.home-search-results{display:none;margin:-6px 0 14px;border:1px solid var(--c-border);border-radius:11px;background:var(--c-surface);overflow:hidden;box-shadow:var(--shadow)}
.home-search-results.show{display:block}
.home-result{width:100%;border:0;border-bottom:1px solid var(--c-border);background:transparent;text-align:left;padding:11px 13px;display:flex;gap:10px;align-items:center;color:var(--c-text)}
.home-result:last-child{border-bottom:0}.home-result:hover{background:color-mix(in srgb,var(--c-accent) 7%,var(--c-surface))}
.home-result-type{font-size:11px;font-weight:800;text-transform:uppercase;color:var(--c-accent-dark);min-width:88px}.home-result-main{min-width:0;flex:1}.home-result-main b{font-size:13.5px}.home-result-main small{display:block;color:var(--c-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.home-metric{border:1px solid var(--c-border);border-radius:12px;background:var(--c-surface);padding:15px 16px;box-shadow:var(--shadow);min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"top value" "foot value";column-gap:18px;row-gap:7px;align-items:center}
.home-metric-top{grid-area:top;display:flex;align-items:center;gap:12px;min-width:0}.home-metric-top>span:last-child{display:flex;flex-direction:column;gap:3px;min-width:0}.home-metric-icon{width:43px;height:43px;border-radius:50%;background:var(--c-primary);color:#fff;display:flex;align-items:center;justify-content:center;flex:none}.home-metric-label{display:block;font-weight:800;font-size:13.5px;line-height:1.2}.home-metric-sub{display:block;font-size:11.5px;line-height:1.25;color:var(--c-muted);margin:0}.home-metric-value{grid-area:value;font-size:28px;font-weight:900;color:var(--c-accent-dark);margin:0;text-align:right;line-height:1.05;white-space:nowrap;min-width:66px}.home-metric-foot{grid-area:foot;text-align:left;color:var(--c-muted);font-size:11.5px;margin:0;padding-left:55px;line-height:1.25}
.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.home-action{min-height:52px;border-radius:10px;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center;gap:8px}.home-action.primary{background:var(--c-accent);color:#fff;border:1px solid var(--c-accent)}.home-action.secondary{background:var(--c-surface);color:var(--c-primary);border:1px solid var(--c-border)}
.home-assistant{border:1px solid #edd3a5;border-radius:12px;background:var(--c-surface);overflow:hidden;margin-bottom:12px;box-shadow:var(--shadow)}.home-assistant.ok{border-color:#a9dfb3}.home-assistant-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fffaf2}.home-assistant.ok .home-assistant-head{background:#f4fbf5}.home-assistant-head-main{flex:1;min-width:0}.home-assistant-title{font-weight:850;font-size:14px}.home-assistant-sub{font-size:12px;color:var(--c-muted);margin-top:2px}.home-assistant-toggle{border:0;background:transparent;color:var(--c-primary);font-weight:750;padding:6px 2px}.home-assistant-detail{display:none;padding:11px 14px 13px;border-top:1px solid var(--c-border)}.home-assistant.open .home-assistant-detail{display:block}.home-chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}.home-chip{border-radius:999px;border:1px solid #eed6ad;background:#fff9ee;padding:6px 9px;font-size:11.5px}.home-assistant.ok .home-chip{border-color:#b9dec0;background:#f3faf4}.home-progress-row{display:flex;align-items:center;gap:10px}.home-progress{height:7px;flex:1;border-radius:999px;background:#e8ecef;overflow:hidden}.home-progress>span{display:block;height:100%;background:var(--c-accent);border-radius:999px}.home-progress-pct{font-size:12px;font-weight:850;color:var(--c-accent-dark)}
.home-assistant.home-assistant-today{margin:0;border-width:1px 0 0;border-radius:0;box-shadow:none}.home-today-grid+.home-assistant-today{border-top-color:var(--c-border)}
.home-assistant-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--c-border)}.home-assistant-row:first-child{padding-top:0}.home-assistant-row:last-child{border-bottom:0;padding-bottom:0}.home-assistant-row>div{flex:1;min-width:0}.home-assistant-row b{display:block;font-size:12.5px}.home-assistant-row small{display:block;color:var(--c-muted);font-size:11.5px;margin-top:3px}.home-assistant-row button{flex:none}
.global-sync-state{margin-left:auto;border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:4px 8px;font-size:10.5px;font-weight:800;white-space:nowrap}.global-sync-state.pending{color:#F4C868}.global-sync-state.synced{color:#8BE19A}.global-sync-state.error{color:#FF949A}@media(max-width:420px){.global-sync-state{max-width:145px;overflow:hidden;text-overflow:ellipsis}}
.home-card{border:1px solid var(--c-border);border-radius:12px;background:var(--c-surface);box-shadow:var(--shadow);margin-bottom:12px;overflow:hidden}.home-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid var(--c-border)}.home-card-head h2{font-size:15px;margin:0}.home-link{border:0;background:transparent;color:var(--c-primary);font-weight:750;font-size:12px}.home-report-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto 24px;gap:9px;align-items:center;padding:11px 14px;border-bottom:1px solid var(--c-border)}.home-report-row:last-child{border-bottom:0}.home-report-icon{width:26px;height:30px;border-radius:5px;background:var(--c-primary);color:#fff;display:flex;align-items:center;justify-content:center}.home-report-main b{font-size:13px}.home-report-main small{display:block;color:var(--c-muted);font-size:11.5px;margin-top:2px}.home-report-date{text-align:right;color:var(--c-muted);font-size:11px}.home-report-status{width:20px;height:20px;border-radius:50%;background:var(--c-accent);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900}
.home-today-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.home-today-item{display:flex;align-items:flex-start;gap:9px;padding:13px 14px;min-width:0}.home-today-item+.home-today-item{border-left:1px solid var(--c-border)}.home-today-icon{font-size:20px;line-height:1}.home-today-main{min-width:0}.home-today-main b{font-size:12.5px}.home-today-main small{display:block;color:var(--c-muted);font-size:11px;margin-top:3px}
@media(max-width:640px){.home-dashboard{padding:0}.home-search-row{grid-template-columns:1fr}.home-metrics{gap:7px}.home-metric{display:block;padding:11px 8px;text-align:center!important}.home-metric-top{display:block;text-align:center}.home-metric-top>span:last-child{display:block}.home-metric-icon{width:36px;height:36px;margin:0 auto 6px}.home-metric-label{font-size:11.5px}.home-metric-sub{font-size:10px;margin-top:2px}.home-metric-value{font-size:21px;margin-top:8px;text-align:center}.home-metric-foot{display:none}.home-actions{gap:7px}.home-action{font-size:12px;padding:9px 5px}.home-report-row{grid-template-columns:27px minmax(0,1fr) 66px 20px;padding:10px}.home-today-grid{grid-template-columns:1fr}.home-today-item+.home-today-item{border-left:0;border-top:1px solid var(--c-border)}}
@media(max-width:360px){.home-metric-icon{display:none}.home-metric-value{font-size:19px}.home-metric{padding:9px 4px}.home-actions{grid-template-columns:1fr}}


/* TRACÉO 2.8.52 — Autocontrôle plus professionnel et simplifié */
.ac-point-card{box-shadow:0 1px 2px rgba(16,20,24,.035);transition:border-color .15s ease,background .15s ease}.ac-point-card[data-status="oui"]{border-color:#b9dcbc;background:#fbfefb}.ac-point-card[data-status="na"]{background:#fafbfc}.ac-point-card[data-status="non"]{border-color:#e3a3a3;background:#fff8f8;box-shadow:inset 3px 0 0 #d64545}
.ac-answer-row button{font-weight:750;min-height:42px;border-radius:9px}.ac-note-toggle{margin-top:8px;border:1px dashed var(--c-border);border-radius:9px;background:#fafbfb}.ac-note-toggle summary{cursor:pointer;padding:8px 10px;font-size:12px;font-weight:700;color:var(--c-muted)}.ac-note-toggle>div{padding:0 10px 10px}
.ac-pro-top{background:var(--c-surface);border:1px solid var(--c-border);border-radius:14px;padding:14px;margin-bottom:12px;box-shadow:0 1px 3px rgba(16,20,24,.05)}.ac-pro-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.ac-pro-title h2{margin:0;font-size:18px;text-transform:none;letter-spacing:0}.ac-pro-context{font-size:12px;color:var(--c-muted);margin-top:3px}.ac-pro-percent{font-weight:850;color:#238b39;font-size:18px;white-space:nowrap}.ac-pro-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:11px}.ac-pro-summary>div{border:1px solid #dde3e7;border-radius:10px;padding:9px;text-align:center;background:#fafbfb}.ac-pro-summary b{display:block;font-size:18px}.ac-pro-summary span{font-size:10px;color:var(--c-muted);font-weight:700;text-transform:uppercase}
.ac-model-row{padding:13px 12px;box-shadow:0 1px 2px rgba(16,20,24,.035)}.ac-model-row .meta b{font-size:14.5px}.ac-model-row .chip{min-width:50px;text-align:center}.autocontrole-hub-grid .fiche-hub-option{box-shadow:0 1px 2px rgba(16,20,24,.035);transition:transform .12s ease,border-color .12s ease}.autocontrole-hub-grid .fiche-hub-option:active{transform:scale(.985)}
.ac-sticky-actions{padding:12px}.ac-sticky-actions>button[data-action="genAutocontrolePdf"]{min-height:48px;font-size:14.5px}.ac-corrective{box-shadow:inset 3px 0 0 #d64545}
@media(max-width:599px){.ac-pro-summary{grid-template-columns:repeat(3,1fr)}.ac-point-card{padding:14px}.ac-answer-row{grid-template-columns:repeat(3,1fr)!important}.ac-answer-row button{min-height:46px;padding:9px 5px}.ac-kpi-grid{display:none}.ac-help summary{padding:9px 10px}}


/* === AUTOCONTROLE 2.8.54 — DESIGN ALIGNE SUR L'ACCUEIL === */
.ac-home-style{border:1px solid #dfe4e8!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,20,24,.06)!important;background:#fff!important}
.ac-home-style .fiche-hub-heading{background:#1C2027;color:#fff;margin:-18px -18px 18px;padding:18px 20px;border-radius:13px 13px 0 0;text-align:left}
.ac-home-style .fiche-hub-heading h2{color:#fff!important;font-size:21px!important}
.ac-home-style .fiche-hub-heading .section-note{color:#cbd2d8!important}
.ac-home-style .fiche-hub-folder{background:#4CAF50!important;color:#fff!important;border-color:#4CAF50!important;width:48px!important;height:48px!important;border-radius:50%!important}
.autocontrole-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:none!important;gap:12px!important}
.autocontrole-hub-grid .fiche-hub-option{min-height:132px!important;padding:18px 14px!important;border:1px solid #dfe4e8!important;border-radius:12px!important;background:#fff!important;box-shadow:0 1px 2px rgba(16,20,24,.04)!important;justify-content:center!important}
.autocontrole-hub-grid .fiche-hub-option:hover{border-color:#9fcda7!important;background:#fbfefb!important}
.autocontrole-hub-grid .fiche-hub-icon{width:54px!important;height:54px!important;border-radius:50%!important;background:#1C2027!important;color:#fff!important;border-color:#1C2027!important}
.autocontrole-hub-grid .fiche-hub-option strong{font-size:15px!important;font-weight:800!important}
.autocontrole-hub-grid .fiche-hub-desc{font-size:12px!important;color:#66717c!important}
.ac-home-style .fiche-hub-info{margin-top:15px!important;background:#f4faf5!important;border-color:#cae6cf!important;color:#31683b!important}
.ac-model-list-card{overflow:hidden}
.ac-model-list-card>h2{margin:-14px -14px 14px;padding:17px 18px;background:#1C2027;color:#fff;font-size:19px!important}
.ac-model-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px!important;padding:14px!important;border-color:#dfe4e8!important;border-radius:11px!important}
.ac-model-row .meta b{font-size:15px!important}.ac-model-row .meta div{font-size:12.5px!important;line-height:1.4}
.ac-model-row .chip{background:#eff8f0!important;border-color:#c8e2cd!important;color:#247235!important;padding:6px 9px!important}
.ac-model-row .btn-primary{background:#4CAF50!important;border-color:#4CAF50!important;color:#fff!important;min-width:74px}
.ac-pro-top{background:#1C2027!important;color:#fff!important;border:0!important;border-radius:14px!important;padding:18px!important;box-shadow:0 2px 6px rgba(16,20,24,.12)!important}
.ac-pro-title h2{color:#fff!important;font-size:21px!important}.ac-pro-context{color:#cbd2d8!important}.ac-pro-percent{color:#5bd06b!important;font-size:22px!important}
.ac-pro-top .ac-progress{background:#3b424b!important}.ac-pro-top .ac-progress>span{background:#4CAF50!important}
.ac-pro-summary>div{background:#2a3038!important;border-color:#404750!important}.ac-pro-summary b{color:#fff!important}.ac-pro-summary span{color:#cbd2d8!important}
.ac-section-card{border:1px solid #dfe4e8!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,20,24,.05)!important}
.ac-section-card>h2{font-size:17px!important;text-transform:none!important;letter-spacing:0!important;padding-bottom:10px;border-bottom:1px solid #edf0f2}
.ac-point-card{padding:16px!important;border-radius:12px!important;margin-bottom:12px!important}
.ac-point-card>div:first-child{font-size:14.5px!important}
.ac-answer-row{gap:9px!important}.ac-answer-row button{min-height:44px!important;border-radius:9px!important;font-weight:800!important}
.ac-point-card[data-status="oui"]{border-color:#a9d9b1!important;background:#f8fdf9!important;box-shadow:inset 4px 0 0 #4CAF50!important}
.ac-point-card[data-status="non"]{box-shadow:inset 4px 0 0 #D64545!important}.ac-point-card[data-status="na"]{box-shadow:inset 4px 0 0 #94A3B8!important}
.ac-sticky-actions{border-top:4px solid #4CAF50!important;padding:13px!important}
@media(max-width:599px){
 .autocontrole-hub-grid{grid-template-columns:1fr 1fr!important;gap:9px!important}.autocontrole-hub-grid .fiche-hub-option{min-height:116px!important;padding:13px 8px!important}
 .ac-home-style .fiche-hub-heading{margin:-15px -10px 15px;padding:15px 14px}.ac-model-row{grid-template-columns:auto minmax(0,1fr) auto!important}.ac-model-row .chip{display:none}.ac-model-row .btn-primary{min-width:68px}
 .ac-pro-top{padding:15px!important}.ac-pro-title h2{font-size:18px!important}.ac-pro-percent{font-size:19px!important}
 .ac-pro-summary{gap:6px!important}.ac-pro-summary>div{padding:8px 4px!important}.ac-pro-summary b{font-size:16px!important}
}
/* === FICHE 2.8.55 — DESIGN ALIGNE SUR ACCUEIL / AUTOCONTROLE === */
.fiche-home-style{border:1px solid #dfe4e8!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,20,24,.06)!important;background:#fff!important;overflow:hidden}
.fiche-home-style .fiche-hub-heading{background:#1C2027;color:#fff;margin:-18px -18px 18px;padding:18px 20px;border-radius:13px 13px 0 0;text-align:left}
.fiche-home-style .fiche-hub-heading h2{color:#fff!important;font-size:21px!important}.fiche-home-style .fiche-hub-heading .section-note{color:#cbd2d8!important}
.fiche-home-style .fiche-hub-folder{background:#4CAF50!important;color:#fff!important;border-color:#4CAF50!important;width:48px!important;height:48px!important;border-radius:50%!important}
.fiche-home-style .fiche-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:none!important;gap:12px!important}
.fiche-home-style .fiche-hub-option{min-height:132px!important;padding:18px 14px!important;border:1px solid #dfe4e8!important;border-radius:12px!important;background:#fff!important;box-shadow:0 1px 2px rgba(16,20,24,.04)!important;justify-content:center!important}
.fiche-home-style .fiche-hub-option:hover{border-color:#9fcda7!important;background:#fbfefb!important}.fiche-home-style .fiche-hub-icon{width:54px!important;height:54px!important;border-radius:50%!important;background:#1C2027!important;color:#fff!important;border-color:#1C2027!important}
.fiche-home-style .fiche-hub-option strong{font-size:15px!important;font-weight:800!important}.fiche-home-style .fiche-hub-desc{font-size:12px!important;color:#66717c!important}.fiche-home-style .fiche-hub-info{background:#f4faf5!important;border-color:#cae6cf!important;color:#31683b!important}
.fiche-pro-hero{background:#1C2027;color:#fff;border-radius:14px;padding:18px 20px;margin-bottom:12px;box-shadow:0 2px 6px rgba(16,20,24,.12);display:flex;align-items:center;justify-content:space-between;gap:16px}
.fiche-pro-hero-main{display:flex;align-items:center;gap:13px}.fiche-pro-hero-icon{width:48px;height:48px;border-radius:50%;background:#4CAF50;color:#fff;display:grid;place-items:center;flex:none}.fiche-pro-hero h2{margin:0;color:#fff!important;font-size:21px!important;text-transform:none!important;letter-spacing:0!important}.fiche-pro-hero h2:before{display:none!important}.fiche-pro-hero p{margin:4px 0 0;color:#cbd2d8;font-size:12.5px}.fiche-pro-state{font-size:12px;font-weight:800;color:#75d684;background:#293039;border:1px solid #424a53;border-radius:999px;padding:7px 10px;white-space:nowrap}
.fiche-pro .card{border:1px solid #dfe4e8!important;border-radius:14px!important;box-shadow:0 1px 3px rgba(16,20,24,.05)!important;background:#fff!important;padding:16px!important;margin-bottom:12px!important}.fiche-pro .card>h2{font-size:17px!important;text-transform:none!important;letter-spacing:0!important;margin:0 0 14px!important;padding:0 0 10px!important;border-bottom:1px solid #edf0f2;color:#1C2027!important}.fiche-pro .card>h2:before{display:none!important}
.fiche-pro .subrow{border:1px solid #e1e6ea!important;border-radius:12px!important;background:#fbfcfc!important;padding:38px 14px 14px!important;margin-bottom:10px!important;box-shadow:none!important}.fiche-pro .field label{font-size:11.5px!important;font-weight:800!important;color:#4b5560!important;margin-bottom:5px!important}.fiche-pro input,.fiche-pro select,.fiche-pro textarea{border-color:#cfd6dc!important;border-radius:9px!important;background:#fff!important}.fiche-pro textarea{min-height:92px}.fiche-pro .row-actions{gap:8px!important}.fiche-pro .btn-primary{border-radius:9px!important}.fiche-pro .empty-note{border:1px dashed #ccd4da!important;background:#fafcfa!important;border-radius:10px!important}
.fiche-pro .signature-box{background:#fff!important;border-color:#cfd6dc!important}.fiche-pro .status-track{background:#fafbfb;border:1px solid #e1e6ea;border-radius:11px;padding:12px}.fiche-pro .send-chip{display:inline-flex!important}.fiche-pro .card:last-child{border-top:4px solid #4CAF50!important}.fiche-pro .card:last-child>button[data-action="genPdf"]{min-height:48px!important;font-size:14.5px!important;background:#4CAF50!important;border-color:#4CAF50!important}.fiche-pro .icon-row-btn{border-radius:9px!important;background:#f7f9f8!important}
@media(max-width:599px){.fiche-home-style .fiche-hub-heading{margin:-15px -10px 15px;padding:15px 14px}.fiche-home-style .fiche-hub-option{min-height:116px!important;padding:13px 8px!important}.fiche-pro-hero{padding:15px 14px}.fiche-pro-hero h2{font-size:18px!important}.fiche-pro-hero-icon{width:42px;height:42px}.fiche-pro-state{display:none}.fiche-pro .card{padding:13px!important}.fiche-pro .subrow{padding:38px 12px 12px!important}.fiche-pro .grid.grid-2,.fiche-pro .grid.grid-3,.fiche-pro .ac-info-grid{grid-template-columns:1fr!important}}


/* TRACÉO 2.8.56 — Icônes colorées Fiche / Autocontrôle */
.fiche-home-style .fiche-hub-icon,
.ac-home-style .fiche-hub-icon{
  width:72px!important;
  height:72px!important;
  border-radius:50%!important;
  border-width:1.5px!important;
  border-style:solid!important;
  box-shadow:none!important;
}
.fiche-home-style .fiche-hub-icon svg,
.ac-home-style .fiche-hub-icon svg{
  width:34px!important;
  height:34px!important;
}

/* Fiche : Base vie vert, Fiche chantier bleu */
.fiche-home-style .fiche-hub-basevie .fiche-hub-icon{
  color:#28A745!important;
  background:#EAF8EE!important;
  border-color:#B9E6C4!important;
}
.fiche-home-style .fiche-hub-chantier .fiche-hub-icon{
  color:#2188F3!important;
  background:#EAF4FF!important;
  border-color:#BBD9FC!important;
}

/* Autocontrôle : une couleur claire par métier */
.ac-home-style .autocontrole-hub-electricite .fiche-hub-icon{
  color:#28A745!important;
  background:#EAF8EE!important;
  border-color:#B9E6C4!important;
}
.ac-home-style .autocontrole-hub-balisage .fiche-hub-icon{
  color:#2188F3!important;
  background:#EAF4FF!important;
  border-color:#BBD9FC!important;
}
.ac-home-style .autocontrole-hub-photometrie .fiche-hub-icon{
  color:#F2A900!important;
  background:#FFF6DF!important;
  border-color:#F5D999!important;
}
.ac-home-style .autocontrole-hub-genie-civil .fiche-hub-icon{
  color:#9C32C7!important;
  background:#F7EAFE!important;
  border-color:#E1BDF3!important;
}

/* Cartes légèrement teintées pour reprendre la maquette validée */
.ac-home-style .autocontrole-hub-electricite{border-color:#B9E6C4!important;}
.ac-home-style .autocontrole-hub-balisage{border-color:#BBD9FC!important;}
.ac-home-style .autocontrole-hub-photometrie{border-color:#F5D999!important;}
.ac-home-style .autocontrole-hub-genie-civil{border-color:#E1BDF3!important;}
.fiche-home-style .fiche-hub-basevie{border-color:#B9E6C4!important;}
.fiche-home-style .fiche-hub-chantier{border-color:#BBD9FC!important;}

@media(max-width:599px){
  .fiche-home-style .fiche-hub-icon,
  .ac-home-style .fiche-hub-icon{
    width:62px!important;
    height:62px!important;
  }
  .fiche-home-style .fiche-hub-icon svg,
  .ac-home-style .fiche-hub-icon svg{
    width:30px!important;
    height:30px!important;
  }
}


/* TRACÉO 2.8.58 — Administration réorganisée */
.admin-hub-grid{
  gap:14px!important;
  max-width:760px!important;
  margin:18px auto 0!important;
}
.admin-hub-grid>[data-adminsub]{
  min-height:132px;
  padding:16px 10px 13px;
  border:1px solid #E1E6EB;
  border-radius:14px;
  background:#fff;
  justify-content:flex-start;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.admin-hub-grid>[data-adminsub]:active{transform:scale(.98);}
.admin-hub-grid>[data-adminsub]>div:first-child{
  width:58px!important;height:58px!important;border-radius:18px!important;
}
.admin-hub-grid>[data-adminsub]>span:nth-child(2){
  font-size:13px!important;
  margin-top:1px;
}
.admin-hub-grid>[data-adminsub]>span:nth-child(3){
  font-size:11px!important;
  max-width:150px;
}
@media(min-width:700px){
  .admin-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:699px){
  .admin-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}


/* TRACÉO 2.8.60 — Satisfaction */
#satisfactionStars button:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:8px;}
@media(max-width:599px){
  #satisfactionOverlay>div{padding:19px 16px!important;}
  #satisfactionStars{gap:2px!important;}
  #satisfactionStars button{font-size:35px!important;}
}


/* TRACÉO 2.8.61 — Éditeur complet Satisfaction */
.sat-overlay{position:fixed;inset:0;background:rgba(10,14,20,.64);z-index:145;display:flex;align-items:center;justify-content:center;padding:18px}
.sat-dialog{background:var(--c-surface);border-radius:18px;padding:22px;max-width:520px;width:100%;max-height:90vh;overflow:auto;box-shadow:0 20px 55px rgba(0,0,0,.36)}
.sat-head{display:flex;gap:12px;align-items:center}.sat-head-icon{width:50px;height:50px;border-radius:15px;background:#FFF5D8;color:#E5A000;display:flex;align-items:center;justify-content:center;font-size:29px}
.sat-head h2{margin:0 0 3px;font-size:20px}.sat-head>div:last-child>div{color:var(--c-muted);font-size:13px}
.sat-question{padding:15px 0;border-bottom:1px solid var(--c-border)}.sat-q-label{font-weight:750;margin-bottom:10px}
.sat-stars{display:flex;gap:5px;justify-content:center}.sat-stars button{border:0;background:transparent;color:#CBD2D9;font-size:38px;padding:2px}.sat-stars button.selected{color:#F2A900}
.sat-choice-row{display:flex;gap:8px;flex-wrap:wrap}.sat-choice-row button{border:1px solid var(--c-border);background:var(--c-surface);border-radius:10px;padding:9px 14px}.sat-choice-row button.selected{border-color:#4CAF50;background:#EAF8EE;color:#23823A;font-weight:750}
.sat-question.sat-missing{background:#FFF2F2;border-radius:10px;padding-left:9px;padding-right:9px}
.sat-admin-status{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.sat-admin-status>div{padding:12px;border:1px solid var(--c-border);border-radius:12px;background:var(--c-bg);display:flex;justify-content:space-between}.sat-admin-status .on{color:#24963E;font-weight:800}
.sat-admin-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:18px 0 10px}
.sat-admin-question{border:1px solid var(--c-border);border-radius:14px;padding:13px;margin-bottom:12px;background:var(--c-bg)}
.sat-admin-qtop{display:grid;grid-template-columns:30px 1fr auto auto auto;gap:6px;align-items:center}.sat-admin-num{width:28px;height:28px;border-radius:9px;background:#232830;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.sat-admin-qtop select{margin:0}.sat-required{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:650}.sat-required input{width:auto}.sat-publish-actions{margin-top:16px}
@media(max-width:599px){.sat-dialog{padding:18px 14px}.sat-admin-qtop{grid-template-columns:30px 1fr auto auto auto}.sat-admin-qtop .btn-sm{padding:7px}.sat-stars button{font-size:34px}}


/* TRACÉO 2.8.63 — Satisfaction fidèle à la maquette */
.sat-maq-shell{max-width:1180px;margin:auto}.sat-maq-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}.sat-maq-head h2{font-size:25px;margin:0 0 5px}.sat-maq-head>div>div{font-size:13px;color:var(--c-muted)}
.sat-maq-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:18px}.sat-maq-side{border:1px solid var(--c-border);border-radius:14px;background:#f8faf9;padding:12px;height:max-content;position:sticky;top:90px}.sat-maq-side h4{margin:3px 9px 9px;font-size:10px;color:#87919a;text-transform:uppercase;letter-spacing:.08em}
.sat-maq-nav{width:100%;border:0;background:transparent;border-radius:9px;padding:10px;text-align:left;font-weight:700;font-size:12px;color:#4f5a65;display:flex;align-items:center;gap:8px}.sat-maq-nav>span{width:8px;height:8px;border-radius:50%;background:#bcc5cc}.sat-maq-nav.active{background:#e7f3e9;color:#257534}.sat-maq-nav.active>span{background:#4CAF50}
.sat-maq-card{background:var(--c-surface);border:1px solid var(--c-border);border-radius:14px;padding:17px;margin-bottom:13px}.sat-maq-cardtitle{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.sat-maq-cardtitle h3{font-size:13px;margin:0;text-transform:uppercase;letter-spacing:.06em;color:#5c6670}.sat-maq-cardtitle h3:before{content:"";display:inline-block;width:4px;height:14px;background:#4CAF50;border-radius:3px;margin-right:8px;vertical-align:-2px}
.sat-maq-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.sat-maq-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.sat-maq-setting{border:1px solid #e2e6ea;border-radius:12px;padding:12px;background:#fbfcfc;display:flex;justify-content:space-between;align-items:center;gap:12px}.sat-maq-setting strong{display:block;font-size:12px}.sat-maq-setting small{display:block;color:var(--c-muted);font-size:11px;margin-top:3px;line-height:1.35}
.sat-switch{position:relative;width:46px;height:26px;flex:none}.sat-switch input{opacity:0;width:0;height:0;position:absolute}.sat-switch span{position:absolute;inset:0;border-radius:999px;background:#c7cdd3;cursor:pointer}.sat-switch span:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.22);transition:.2s}.sat-switch input:checked+span{background:#4CAF50}.sat-switch input:checked+span:before{transform:translateX(20px)}
.sat-maq-muted{border:1px dashed #bdc6cd;background:#fafbfc;border-radius:11px;padding:11px;color:#64707b;font-size:11px;margin-top:11px}.sat-maq-pills{display:flex;flex-wrap:wrap;gap:7px}.sat-maq-pill{border:1px solid #93d59f;background:#edf8ef;color:#277837;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:700}
.sat-maq-question{border:1px solid #dce2e6;border-radius:12px;background:#fff;margin-bottom:9px;overflow:hidden}.sat-maq-qhead{display:flex;align-items:center;gap:9px;padding:11px}.sat-handle{color:#adb5bd;font-size:17px}.sat-qnum{width:28px;height:28px;border-radius:8px;background:#edf7ef;color:#2b7d39;display:grid;place-items:center;font-weight:900;font-size:12px}.sat-qmain{flex:1;min-width:0}.sat-qmain b{display:block;font-size:12px}.sat-qmain small{display:block;color:#66717d;font-size:10.5px;margin-top:2px}.sat-qflags{display:flex;gap:5px;flex-wrap:wrap}.sat-tag{font-size:9px;font-weight:800;padding:4px 6px;border-radius:999px;background:#eef1f4;color:#5a6570}.sat-tag.req{background:#fff0ef;color:#b13e37}.sat-tag.multi{background:#edf3ff;color:#356cad}.sat-qedit{border:0;background:#f0f3f5;color:#56616c;border-radius:8px;padding:7px 9px;font-size:11px;font-weight:800}.sat-maq-qbody{display:none;border-top:1px solid #e5e9ec;background:#fbfcfc;padding:13px}.sat-maq-question.open .sat-maq-qbody{display:block}
.sat-maq-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:13px}.sat-maq-stats>div{background:#fff;border:1px solid var(--c-border);border-radius:12px;padding:13px;text-align:center}.sat-maq-stats b{font-size:21px}.sat-maq-stats span{display:block;font-size:9px;color:var(--c-muted);text-transform:uppercase;font-weight:800;margin-top:4px}.sat-danger-zone{border-color:#efcfcc;background:#fffafa}
.sat-version{display:flex;align-items:center;gap:11px;border:1px solid #dfe4e7;border-radius:11px;padding:11px}.sat-vicon{width:40px;height:40px;border-radius:10px;background:#eef7ef;color:#2e7d3a;display:grid;place-items:center;font-weight:900}.sat-version>div:nth-child(2){flex:1}.sat-version small{display:block;color:var(--c-muted);margin-top:3px}.sat-version>span,.sat-summary-row>span{font-size:9px;padding:4px 7px;border-radius:999px;background:#e8f6eb;color:#267634;font-weight:900}.sat-summary-row{border:1px solid #e2e6ea;border-radius:11px;padding:11px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.sat-summary-row small{display:block;color:var(--c-muted);margin-top:3px}.sat-summary-row span.blue{background:#edf3ff;color:#356cad}
.sat-preview-wrap{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.sat-preview-phone{background:#1e2329;border-radius:28px;padding:10px;box-shadow:0 16px 40px rgba(0,0,0,.18)}.sat-preview-top{height:40px;background:#1C2027;color:#fff;border-radius:20px 20px 0 0;padding:13px;font-size:11px;font-weight:900}.sat-preview-card{background:#fff;padding:18px;border-radius:0 0 20px 20px;min-height:480px}.sat-preview-card h3{font-size:17px;margin:0 0 5px}
.sat-overlay{position:fixed;inset:0;background:rgba(10,14,20,.64);z-index:145;display:flex;align-items:center;justify-content:center;padding:18px}.sat-phone-dialog{background:#1e2329;border-radius:28px;padding:10px;width:min(390px,96vw);max-height:92vh;overflow:auto}.sat-user-top{height:40px;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 12px}.sat-user-top button{border:0;background:transparent;color:#fff;font-size:24px}.sat-user-card{background:#fff;border-radius:20px;padding:18px;color:#1C2027}.sat-user-icon{width:48px;height:48px;border-radius:14px;background:#e8f6eb;color:#2e7d3a;display:grid;place-items:center;font-size:24px;margin-bottom:12px}.sat-user-card h2{margin:0 0 5px;font-size:18px}.sat-user-sub{font-size:12px;color:#66717d;line-height:1.4}.sat-progress{height:5px;background:#e6e9ec;border-radius:999px;overflow:hidden;margin:13px 0 18px}.sat-progress i{display:block;height:100%;background:#4CAF50;transition:width .2s}.sat-user-qtitle{font-size:13px;font-weight:800}.sat-user-qcount,.sat-user-hint{font-size:10.5px;color:#66717d;margin-top:5px}.sat-stars{font-size:0;margin:10px 0}.sat-stars button{border:0;background:transparent;color:#d5dbe0;font-size:31px;padding:2px}.sat-stars button.selected{color:#f2b01e}.sat-selectcards{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.sat-selectcards button{border:1.5px solid #cfd8d2;border-radius:10px;padding:9px 7px;background:#fbfcfb;font-size:11px;font-weight:800}.sat-selectcards button.selected{background:#eaf7ed;border-color:#86ca92;color:#277535}.sat-nps{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-top:10px}.sat-nps button{border:1px solid #d2d9de;background:#fff;border-radius:8px;padding:7px 3px}.sat-nps button.selected{background:#eaf7ed;border-color:#86ca92;color:#277535}.sat-user-question textarea{width:100%;margin-top:10px;border:1.5px solid #b8d4bd;background:#f7fbf8;border-radius:10px;padding:10px;min-height:85px}.sat-user-actions{display:flex;gap:8px;margin-top:15px}.sat-user-actions>*{flex:1}.sat-required-star{color:#d64545}.sat-missing{background:#fff5f4;border-radius:10px;padding:8px}.sat-thanks{text-align:center;padding:25px 5px}.sat-thanks>div{font-size:40px;color:#4CAF50}.sat-thanks p{color:#66717d;font-size:12px;line-height:1.5}
@media(max-width:850px){.sat-maq-layout{grid-template-columns:1fr}.sat-maq-side{position:static;display:flex;overflow-x:auto;gap:4px}.sat-maq-side h4{display:none}.sat-maq-nav{width:auto;white-space:nowrap;flex:none}.sat-preview-wrap{grid-template-columns:1fr}.sat-preview-phone{max-width:390px;margin:auto}.sat-maq-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:599px){.sat-maq-head{flex-direction:column}.sat-maq-grid2,.sat-maq-grid3{grid-template-columns:1fr}.sat-qflags{display:none}.sat-maq-qhead{gap:6px}.sat-qedit{padding:6px}.sat-selectcards{grid-template-columns:1fr 1fr}}


/* TRACÉO 2.8.64 — Voyant Satisfaction actif / arrêté */
.sat-live-status{
  display:flex;align-items:center;gap:12px;
  border-radius:14px;padding:14px 16px;margin-bottom:13px;
  border:1.5px solid;transition:background .18s,border-color .18s,color .18s;
}
.sat-live-status .sat-live-dot{
  width:15px;height:15px;border-radius:50%;flex:none;
  box-shadow:0 0 0 5px rgba(0,0,0,.04);
}
.sat-live-status b{display:block;font-size:14px;letter-spacing:.02em}
.sat-live-status small{display:block;margin-top:3px;font-size:11px;line-height:1.35}
.sat-live-status.active{background:#EAF8EE;border-color:#9BD6A7;color:#237438}
.sat-live-status.active .sat-live-dot{background:#35B653;box-shadow:0 0 0 5px rgba(53,182,83,.14)}
.sat-live-status.inactive{background:#FFF1F0;border-color:#E9B8B4;color:#A63D37}
.sat-live-status.inactive .sat-live-dot{background:#D64545;box-shadow:0 0 0 5px rgba(214,69,69,.14)}


.sat-save-hint{
  margin:-3px 0 13px;
  padding:10px 12px;
  border-radius:10px;
  background:#EDF5FF;
  border:1px solid #D6E7FB;
  color:#3F638A;
  font-size:11px;
  line-height:1.4;
}


/* TRACÉO 2.8.69 — Barre de navigation basse mobile redimensionnée */
@media (max-width: 760px){
  .bottomnav{
    left:0!important;
    right:0!important;
    width:100%!important;
    min-width:0!important;
    padding-left:max(4px, env(safe-area-inset-left))!important;
    padding-right:max(4px, env(safe-area-inset-right))!important;
    padding-top:5px!important;
    padding-bottom:max(5px, env(safe-area-inset-bottom))!important;
    gap:0!important;
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    align-items:end!important;
    overflow:hidden!important;
  }
  .bottomnav .navbtn{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
    padding:4px 1px 3px!important;
    margin:0!important;
    gap:2px!important;
    font-size:10px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    letter-spacing:-.15px!important;
  }
  .bottomnav .navbtn svg,
  .bottomnav .navbtn > span:first-child svg{
    width:24px!important;
    height:24px!important;
    flex:0 0 auto!important;
  }
  .bottomnav .navbtn > span:first-child{
    min-width:0!important;
  }
}
@media (max-width: 390px){
  .bottomnav .navbtn{
    font-size:9px!important;
    letter-spacing:-.25px!important;
  }
  .bottomnav .navbtn svg,
  .bottomnav .navbtn > span:first-child svg{
    width:22px!important;
    height:22px!important;
  }
}


/* TRACÉO 2.8.70 — Partie haute figée sur téléphone, tablette et ordinateur */
:root{--traceo-topbar-height:62px;}

.topbar{
  position:sticky!important;
  top:0!important;
  z-index:70!important;
  width:100%;
  box-sizing:border-box;
}

/* La barre utilisateur reste immédiatement sous l'en-tête principal. */
#redacteurBar:not(.hidden){
  position:sticky!important;
  top:var(--traceo-topbar-height)!important;
  z-index:69!important;
  width:100%;
  box-sizing:border-box;
}

/* Les anciennes règles paysage ne doivent plus désactiver l'en-tête fixe. */
@media (orientation:landscape) and (max-height:560px){
  .topbar{position:sticky!important;top:0!important;}
}

/* Sur ordinateur, overflow:hidden sur le conteneur pouvait neutraliser sticky. */
@media (min-width:1024px){
  .app-shell{overflow:visible!important;}
  .topbar{border-radius:16px 16px 0 0;}
}

/* iOS : conserve l'encoche / Dynamic Island tout en gardant l'en-tête fixe. */
@supports (-webkit-touch-callout:none){
  .topbar{
    position:-webkit-sticky!important;
    position:sticky!important;
    top:0!important;
  }
  #redacteurBar:not(.hidden){
    position:-webkit-sticky!important;
    position:sticky!important;
    top:var(--traceo-topbar-height)!important;
  }
}


/* TRACÉO 2.8.71 — En-tête réellement fixe + navigation basse pleine largeur */
:root{
  --traceo-topbar-height:62px;
  --traceo-fixed-header-total:62px;
}

/* Les deux bandeaux supérieurs sont retirés du flux et restent à l'écran. */
.topbar{
  position:fixed!important;
  top:0!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  width:100%!important;
  max-width:var(--responsive-page-max,1440px)!important;
  z-index:120!important;
  box-sizing:border-box!important;
}

#redacteurBar:not(.hidden){
  position:fixed!important;
  top:var(--traceo-topbar-height)!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  width:100%!important;
  max-width:var(--responsive-page-max,1440px)!important;
  z-index:119!important;
  box-sizing:border-box!important;
}

/* Réserve exactement la place occupée par les bandeaux fixes. */
.app-shell{
  padding-top:var(--traceo-fixed-header-total)!important;
}

/* Les barres Admin collantes commencent sous l'ensemble de l'en-tête. */
.admin-backbar{
  scroll-margin-top:calc(var(--traceo-fixed-header-total) + 8px);
}

/* La navigation basse occupe tout l'écran, sans marge à gauche/droite. */
.bottomnav{
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  display:flex!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  gap:0!important;
  overflow:hidden!important;
  padding-left:max(2px, env(safe-area-inset-left))!important;
  padding-right:max(2px, env(safe-area-inset-right))!important;
}

.bottomnav .navbtn{
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding-left:2px!important;
  padding-right:2px!important;
  text-align:center!important;
}

/* Tablettes : auparavant la règle mobile s'arrêtait à 760px. */
@media (max-width:1024px){
  .bottomnav .navbtn{
    font-size:clamp(9px,1.65vw,11px)!important;
    line-height:1.05!important;
    letter-spacing:-.1px!important;
    white-space:nowrap!important;
    gap:2px!important;
  }
  .bottomnav .navbtn svg,
  .bottomnav .navbtn > span:first-child svg{
    width:clamp(22px,3.4vw,25px)!important;
    height:clamp(22px,3.4vw,25px)!important;
  }
}

/* Très petits téléphones : reste lisible sans pousser les derniers onglets hors écran. */
@media (max-width:390px){
  .bottomnav .navbtn{
    font-size:8.7px!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .bottomnav .navbtn svg,
  .bottomnav .navbtn > span:first-child svg{
    width:21px!important;
    height:21px!important;
  }
}

/* iPhone / iPad Safari */
@supports (-webkit-touch-callout:none){
  .topbar,
  #redacteurBar:not(.hidden){
    position:fixed!important;
  }
}


/* TRACÉO 2.8.72 — Rédacteur intégré au header + bouton rouge Déconnexion */
.topbar{
  min-height:58px!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding-top:max(9px,env(safe-area-inset-top))!important;
  padding-bottom:9px!important;
}
.topbar .brandtext{
  min-width:0!important;
  flex:1 1 auto!important;
}
.topbar-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  min-width:0;
  flex:0 1 auto;
}
#redacteurBar{
  background:transparent!important;
  color:#d7dce2!important;
  font-size:11px!important;
  padding:0!important;
  position:static!important;
  transform:none!important;
  width:auto!important;
  max-width:min(30vw,260px)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  z-index:auto!important;
}
#redacteurBarText{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.login-screen-bg{
  background:radial-gradient(circle at 50% -15%,#f2faf3 0%,#e7edf3 56%,#e2e9f0 100%);
}
html[data-theme="dark"] .login-screen-bg{
  background:radial-gradient(circle at 50% -15%,#182920 0%,#131A21 56%,#10171D 100%) !important;
}
.login-tagline-text{color:#1C2027;}
html[data-theme="dark"] .login-tagline-text{color:#F3F6F8 !important;}
.login-icon-label{color:#1C2027;}
html[data-theme="dark"] .login-icon-label{color:#F3F6F8 !important;}
.offline-badge{
  display:flex;align-items:center;gap:5px;
  background:#FEF3E2;color:#9A6B12;
  border-radius:999px;padding:5px 10px 5px 8px;
  font-size:11.5px;font-weight:800;white-space:nowrap;flex-shrink:0;
}
.header-logout-btn{
  width:34px;
  height:34px;
  padding:0;
  flex:0 0 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#D64545;
  border:1px solid #ED7770;
  border-radius:9px;
  box-shadow:0 2px 7px rgba(214,69,69,.28);
  cursor:pointer;
}
.header-logout-btn:hover{background:#C63838;}
.header-logout-btn:active{transform:scale(.96);}
.header-logout-btn.hidden{display:none!important;}

/* Annule l'ancienne règle qui plaçait redacteurBar comme deuxième bandeau fixe. */
#redacteurBar:not(.hidden){
  position:static!important;
  top:auto!important;
  left:auto!important;
  transform:none!important;
}

/* Mobile : garder l'essentiel sans grossir le bandeau. */
@media(max-width:700px){
  .topbar{gap:6px!important;padding-left:10px!important;padding-right:8px!important;}
  .topbar-right{gap:5px;}
  .topbar .brandtext b{
    display:block;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
  }
  #redacteurBar{
    max-width:24vw!important;
    font-size:9.5px!important;
  }
  .ticket-tab{font-size:9.5px!important;padding-left:5px!important;padding-right:5px!important;}
  #darkModeToggle,.header-logout-btn{
    width:32px!important;
    height:32px!important;
    flex-basis:32px!important;
  }
}
@media(max-width:430px){
  /* Sur très petit écran, le nom reste accessible mais on retire le préfixe visuellement via largeur compacte. */
  #redacteurBar{max-width:21vw!important;font-size:9px!important;}
  .ticket-tab{display:none!important;}
}


/* TRACÉO 2.8.73 — Rédacteur replacé à gauche */
.topbar-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar-left .brandtext{
  min-width:0!important;
  flex:1 1 auto!important;
}
.topbar-left #redacteurBar{
  flex:0 1 auto;
  max-width:260px!important;
  color:#d7dce2!important;
}
.topbar-right{
  flex:0 0 auto!important;
}
@media(max-width:700px){
  .topbar-left{gap:6px;}
  .topbar-left #redacteurBar{
    max-width:28vw!important;
    font-size:9.5px!important;
  }
}
@media(max-width:430px){
  .topbar-left #redacteurBar{
    max-width:24vw!important;
    font-size:9px!important;
  }
}


/* TRACÉO 2.8.74 — Correction spécifique ordinateur du bandeau principal */
@media (min-width:1025px){
  .topbar{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:18px!important;
    min-height:62px!important;
    height:auto!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  .topbar-left{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:16px!important;
    min-width:0!important;
    flex:1 1 auto!important;
    width:auto!important;
  }
  .topbar-left .brandtext{
    flex:0 1 auto!important;
    width:auto!important;
    max-width:70%!important;
    min-width:0!important;
  }
  .topbar-left #redacteurBar{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    position:static!important;
    transform:none!important;
    margin:0!important;
    padding:0!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:11px!important;
    color:#d7dce2!important;
  }
  .topbar-left #redacteurBar.hidden{
    display:none!important;
  }
  .topbar-right{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    margin-left:auto!important;
  }
  .topbar-right .ticket-tab{
    flex:0 0 auto!important;
  }
  #darkModeToggle,
  .header-logout-btn{
    flex:0 0 34px!important;
  }
}


/* TRACÉO 2.8.75 — Bandeau haut lisible sur tous supports */
.topbar{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  background:#1C2027!important;
}
.topbar-mainrow{
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 12px;
  box-sizing:border-box;
}
.topbar-mainrow .brandtext{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
}
.topbar-mainrow .brandtext b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.topbar-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
}
.topbar-userrow{
  min-height:28px;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:4px 12px 6px!important;
  margin:0!important;
  background:#1C2027!important;
  border-top:1px solid rgba(255,255,255,.08);
  color:#d7dce2!important;
  font-size:11px!important;
  line-height:1.2!important;
  position:static!important;
  transform:none!important;
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
.topbar-userrow.hidden{display:none!important;}
#redacteurBarText{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
}
@media(min-width:1025px){
  .topbar-mainrow{padding-left:16px;padding-right:12px;}
  .topbar-userrow{padding-left:16px!important;}
}
@media(max-width:700px){
  .topbar-mainrow{min-height:52px;padding:7px 8px;gap:7px;}
  .topbar-mainrow .brandtext b{font-size:12px!important;}
  .topbar-actions{gap:5px;}
  #darkModeToggle,.header-logout-btn{width:31px!important;height:31px!important;flex-basis:31px!important;}
  .topbar-userrow{min-height:25px;padding:3px 8px 5px!important;font-size:10px!important;}
}
@media(max-width:480px){
  .ticket-tab{display:none!important;}
  .topbar-mainrow .brandtext b{font-size:11px!important;}
}


/* TRACÉO 2.8.76 — Recalibrage global de l'affichage */
html,body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
body{
  padding-left:0!important;
  padding-right:0!important;
  padding-top:0!important;
  box-sizing:border-box!important;
}
*,*::before,*::after{box-sizing:border-box;}

/* Le header ne dépend plus de la largeur de l'ancien cadre desktop. */
.topbar{
  left:0!important;
  right:0!important;
  width:100%!important;
  max-width:100vw!important;
  transform:none!important;
  margin:0!important;
  overflow:hidden!important;
}
.topbar-mainrow{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.topbar-mainrow .brandtext{
  min-width:0!important;
  overflow:hidden!important;
}
#headerCompanyName{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
.brand-tagline{display:inline;}

/* L'écran de connexion n'affiche jamais les onglets de navigation. */
.bottomnav.hidden,
body.login-mode .bottomnav{
  display:none!important;
}
body.login-mode{
  padding-bottom:0!important;
}
body.login-mode .view{
  padding-bottom:0!important;
}

/* L'application exploite davantage l'écran au lieu de rester dans un cadre étroit. */
.app-shell{
  width:100%!important;
  max-width:1440px!important;
  margin:0 auto!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
  overflow:visible!important;
  box-shadow:none!important;
}
.view{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding-left:clamp(10px,2vw,28px)!important;
  padding-right:clamp(10px,2vw,28px)!important;
  padding-top:clamp(12px,1.8vw,24px)!important;
  padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;
}
.view>*{
  max-width:100%!important;
  min-width:0!important;
}
.card,.section-card,.fiche-form,.home-dashboard,.ac-home-style,.fiche-home-style{
  width:100%;
  max-width:100%;
  min-width:0;
}

/* Les grilles s'adaptent à l'espace réellement disponible. */
@media(min-width:1024px){
  .app-shell{max-width:1440px!important;}
  .view{
    padding-left:clamp(20px,2.4vw,36px)!important;
    padding-right:clamp(20px,2.4vw,36px)!important;
  }
  .admin-hub-grid{
    max-width:980px!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
@media(min-width:1400px){
  .app-shell{max-width:1560px!important;}
  .view{
    padding-left:42px!important;
    padding-right:42px!important;
  }
}

/* Tablette : moins de marges perdues. */
@media(min-width:600px) and (max-width:1023px){
  .view{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .admin-hub-grid{max-width:760px!important;}
}

/* Téléphone : header compact et lisible. */
@media(max-width:599px){
  .topbar-mainrow{
    min-height:50px!important;
    padding:7px 8px!important;
  }
  .brand-tagline{display:none!important;}
  #headerCompanyName .brand-name{
    font-size:16px!important;
  }
  .topbar-actions{
    flex:0 0 auto!important;
    min-width:0!important;
    gap:5px!important;
  }
  .ticket-tab{display:none!important;}
  #darkModeToggle,.header-logout-btn{
    width:31px!important;
    height:31px!important;
    min-width:31px!important;
    flex:0 0 31px!important;
  }
  .topbar-userrow{
    padding:4px 8px 5px!important;
    min-height:25px!important;
    font-size:10px!important;
  }
  .view{
    padding-left:8px!important;
    padding-right:8px!important;
    padding-top:10px!important;
  }
  .card,.section-card{
    padding-left:11px!important;
    padding-right:11px!important;
  }
}

/* Très petit téléphone : aucune possibilité de débordement du bandeau. */
@media(max-width:360px){
  #headerCompanyName .brand-name{font-size:15px!important;}
  .topbar-mainrow{gap:5px!important;padding-left:6px!important;padding-right:6px!important;}
  #darkModeToggle,.header-logout-btn{width:29px!important;height:29px!important;min-width:29px!important;flex-basis:29px!important;}
}

/* Sur connexion, le contenu peut utiliser toute la hauteur car la nav est absente. */
body.login-mode #viewRoot{
  min-height:calc(100dvh - var(--traceo-fixed-header-total,0px));
}


/* TRACÉO 2.8.77 — Marge du rédacteur sur ordinateur */
@media (min-width:1024px){
  .topbar-userrow{
    padding-left:32px!important;
    padding-right:24px!important;
  }
}
@media (min-width:1440px){
  .topbar-userrow{
    padding-left:42px!important;
    padding-right:32px!important;
  }
}


/* TRACÉO 2.8.81 — Rédacteur retiré du bandeau supérieur */
#redacteurBar,
#redacteurBar:not(.hidden),
.topbar-userrow{
  display:none!important;
}


/* TRACÉO 2.8.82 — Bouton Nouveau autocontrôle gris sur l'accueil */
.home-action.secondary{
  background:#E6E9EC!important;
  color:#3E4852!important;
  border-color:#C9D0D6!important;
}
.home-action.secondary:hover{
  background:#DDE1E5!important;
  border-color:#B9C1C8!important;
}


/* TRACÉO 2.8.84 — Liseré vert intégré discrètement au bandeau supérieur */
.topbar{
  border-bottom:2px solid rgba(31,181,74,.72)!important;
  box-shadow:0 3px 10px rgba(0,0,0,.10)!important;
}
/* Neutralise l'ancien trait vert séparé sous le bandeau. */
.app-shell,
#viewRoot,
.view{
  border-top-color:transparent!important;
}


/* TRACÉO 2.8.88 — iPhone/iPad : zones sûres Apple + notifications visibles */
:root{
  --traceo-safe-top:env(safe-area-inset-top,0px);
  --traceo-safe-bottom:env(safe-area-inset-bottom,0px);
}

/* Le bandeau commence sous l'encoche / Dynamic Island et remplit proprement
   la zone système sans que les boutons passent derrière l'heure ou la batterie. */
.topbar{
  top:0!important;
  padding-top:var(--traceo-safe-top)!important;
}
.topbar-mainrow{
  min-height:56px!important;
}

/* La hauteur mesurée du header inclut désormais la zone sûre ; le contenu
   reste donc automatiquement sous le bandeau sur iPhone/iPad. */
.app-shell{
  padding-top:var(--traceo-fixed-header-total)!important;
}

/* Navigation basse au-dessus de l'indicateur d'accueil iOS. */
.bottomnav{
  padding-bottom:max(4px,var(--traceo-safe-bottom))!important;
}

/* Messages d'information : toujours au-dessus de la navigation et de
   l'indicateur d'accueil, avec un z-index supérieur au bandeau. */
.toast{
  z-index:180!important;
  bottom:calc(82px + var(--traceo-safe-bottom))!important;
  max-width:min(calc(100vw - 24px),420px)!important;
}

/* Les overlays informatifs ne doivent pas commencer sous l'encoche. */
.sat-overlay,
.success-anim-overlay,
#newUserGuideOverlay{
  padding-top:max(18px,var(--traceo-safe-top))!important;
  padding-bottom:max(18px,var(--traceo-safe-bottom))!important;
}

/* Réglages Apple uniquement : un peu plus d'air autour des contrôles. */
@supports (-webkit-touch-callout:none){
  .topbar{
    position:fixed!important;
    top:0!important;
  }
  .topbar-mainrow{
    padding-left:max(10px,env(safe-area-inset-left))!important;
    padding-right:max(10px,env(safe-area-inset-right))!important;
  }
  .toast{
    bottom:calc(88px + env(safe-area-inset-bottom,0px))!important;
  }
}


/* TRACÉO 2.8.89 — Actions accueil plus lisibles */
.home-action{
  font-size:16px!important;
  font-weight:850!important;
  letter-spacing:-.1px!important;
  min-height:56px!important;
}
.home-action.secondary{
  background:#343A40!important;
  color:#FFFFFF!important;
  border-color:#343A40!important;
  box-shadow:0 2px 6px rgba(28,32,39,.16)!important;
}
.home-action.secondary:hover{
  background:#2B3035!important;
  border-color:#2B3035!important;
}
.home-action.secondary:active{
  background:#24292E!important;
}
@media(max-width:599px){
  .home-action{
    font-size:15px!important;
    min-height:54px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
}


/* TRACÉO 2.8.90 — Editeur Apparence entreprise */
:root{
  --theme-header:#1C2027;
  --theme-navigation:#FFFFFF;
  --theme-card:#FFFFFF;
  --theme-secondary:#343A40;
  --theme-accent-line:#4CAF50;
  --theme-radius:14px;
  --theme-font-scale:1;
}
body{font-size:calc(16px * var(--theme-font-scale));}
.topbar{background:var(--theme-header)!important;border-bottom-color:var(--theme-accent-line)!important;}
.card,.section-card{border-radius:var(--theme-radius)!important;}
.card{background:var(--theme-card);}
.bottomnav{background:var(--theme-navigation)!important;}
.home-action.secondary{background:var(--theme-secondary)!important;border-color:var(--theme-secondary)!important;color:#fff!important;}

.appearance-admin-intro{display:flex;align-items:center;gap:14px;padding:15px 17px;margin-bottom:14px;border:1px solid var(--c-border);border-radius:14px;background:color-mix(in srgb,var(--c-accent) 7%,var(--c-surface));}
.appearance-admin-intro>div{flex:1;min-width:0}.appearance-admin-intro b{display:block;font-size:15px}.appearance-admin-intro span:not(.appearance-safe-badge){display:block;font-size:12px;color:var(--c-muted);margin-top:3px;line-height:1.4}
.appearance-safe-badge{font-size:10px;font-weight:800;text-transform:uppercase;color:#247235;background:#EAF8EE;border:1px solid #C5E8CC;border-radius:999px;padding:6px 9px;white-space:nowrap}
.appearance-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,430px);gap:16px;align-items:start}
.appearance-preview-sticky{position:sticky;top:calc(var(--traceo-fixed-header-total) + 12px)}
.appearance-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;margin-top:12px}
.appearance-control-grid label{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--c-border);border-radius:10px;padding:9px 11px;font-size:12px;font-weight:700;background:var(--c-surface)}
.appearance-control-grid input[type=color]{width:42px;height:32px;padding:1px;border:0;background:transparent}
.appearance-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.appearance-presets .preset-card{margin:0;width:100%;text-align:left}
.appearance-range-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(120px,1.4fr) 48px;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--c-border)}
.appearance-range-row:last-child{border-bottom:0}.appearance-range-row b{display:block;font-size:13px}.appearance-range-row span{display:block;font-size:11px;color:var(--c-muted);margin-top:2px}.appearance-range-row output{font-size:12px;font-weight:800;text-align:right}
.appearance-actions{flex-wrap:wrap}.appearance-actions button{flex:1 1 175px}
.appearance-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.appearance-device-switch{display:flex;gap:4px}.appearance-device-switch button{border:1px solid var(--c-border);background:var(--c-surface);border-radius:8px;padding:6px 8px;font-size:10px;font-weight:700;color:var(--c-muted)}.appearance-device-switch button.active{background:var(--c-primary);color:#fff;border-color:var(--c-primary)}
.appearance-preview-frame{margin:12px auto 0;transition:max-width .2s}.appearance-preview-frame.phone{max-width:300px}.appearance-preview-frame.tablet{max-width:390px}.appearance-preview-frame.desktop{max-width:100%}
.appearance-preview-app{overflow:hidden;border:7px solid #20252B;border-radius:22px;background:var(--pv-bg);box-shadow:0 10px 30px rgba(15,23,42,.16);font-size:calc(11px * var(--pv-scale))}
.appearance-preview-header{min-height:45px;background:var(--pv-header);border-bottom:2px solid var(--pv-line);color:#fff;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:8px}.appearance-preview-header b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.appearance-preview-header span{font-size:.85em;white-space:nowrap}
.appearance-preview-content{padding:11px}.appearance-preview-hello{font-size:1.45em;font-weight:900;margin-bottom:8px}.appearance-preview-search{background:var(--pv-card);border:1px solid #d9dee3;border-radius:calc(var(--pv-radius)*.75);padding:9px;color:#6b7280}
.appearance-preview-stats{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}.appearance-preview-stats>div,.appearance-preview-card{background:var(--pv-card);border:1px solid #d9dee3;border-radius:var(--pv-radius);padding:9px}.appearance-preview-stats b{display:block;font-size:1.4em}.appearance-preview-stats span,.appearance-preview-card span{display:block;color:#6b7280;font-size:.85em;margin-top:2px}
.appearance-preview-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}.appearance-preview-actions button{border:0;border-radius:calc(var(--pv-radius)*.75);padding:9px 5px;font-weight:800;font-size:.9em}.appearance-preview-actions button:first-child{background:var(--pv-accent);color:#fff}.appearance-preview-actions button:last-child{background:var(--pv-secondary);color:#fff}
.appearance-preview-card{margin-top:8px}.appearance-preview-nav{display:grid;grid-template-columns:repeat(4,1fr);background:var(--pv-nav);border-top:1px solid #d9dee3;padding:6px 2px}.appearance-preview-nav span{text-align:center;color:var(--pv-primary);font-size:1.25em}.appearance-preview-nav small{display:block;font-size:.55em;margin-top:2px}
@media(max-width:1050px){.appearance-editor-grid{grid-template-columns:1fr}.appearance-preview-sticky{position:static}.appearance-preview-frame.desktop{max-width:620px}}
@media(max-width:599px){.appearance-control-grid{grid-template-columns:1fr}.appearance-presets{grid-template-columns:1fr 1fr}.appearance-range-row{grid-template-columns:1fr 48px}.appearance-range-row input{grid-column:1/-1;grid-row:2}.appearance-preview-head{display:block}.appearance-device-switch{margin-top:8px}.appearance-admin-intro{align-items:flex-start}.appearance-safe-badge{font-size:9px}}


/* TRACÉO — Première version — Fiche chantier mobile */
.fiche-mobile-toolbar{display:none}
.optional-label{font-size:11px;font-weight:700;color:var(--c-muted);text-transform:none;letter-spacing:0}
.fiche-photo-suggestion{margin:-2px 0 12px;padding:8px 10px;border-radius:9px;background:var(--c-soft)}
@media(max-width:599px){
  .fiche-mobile-toolbar{
    position:fixed;
    top:calc(var(--traceo-fixed-header-total, 66px) + 8px);
    right:max(10px,env(safe-area-inset-right,0px));
    z-index:175;
    display:flex;
    align-items:center;
    gap:7px;
    pointer-events:none;
  }
  .fiche-mobile-toolbar button{pointer-events:auto}
  .fiche-mobile-duplicate{
    min-height:42px;
    border:1px solid #CBD3DA;
    border-radius:11px;
    padding:0 12px;
    display:flex;
    align-items:center;
    gap:6px;
    background:#FFFFFF;
    color:#36414B;
    font-size:12px;
    font-weight:800;
    box-shadow:0 3px 12px rgba(23,32,42,.15);
  }
  .fiche-mobile-close{
    width:44px;
    min-width:44px;
    height:42px;
    border:1px solid #D73539;
    border-radius:11px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#E5484D;
    color:#FFFFFF;
    box-shadow:0 3px 12px rgba(229,72,77,.28);
  }
  body.dark .fiche-mobile-duplicate{
    background:#252B32;
    border-color:#4B5560;
    color:#F3F4F6;
  }
}

/* Satisfaction 2.9.20 - Visages + aperçu + remerciement */
.sat-faces{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:12px 0 4px}
.sat-faces button{border:1px solid #d6dde1;background:#fff;border-radius:12px;padding:8px 2px;min-width:0;cursor:pointer;transition:.15s ease}
.sat-faces button span{display:block;font-size:27px;line-height:1.05}
.sat-faces button small{display:block;margin-top:5px;font-size:7.5px;line-height:1.1;color:#65717c}
.sat-faces button.selected{background:#eaf7ed;border-color:#4caf50;box-shadow:0 0 0 2px rgba(76,175,80,.12);transform:translateY(-2px)}
.sat-faces button.selected span{transform:scale(1.08)}
.sat-faces button.selected small{color:#218232;font-weight:800}
.sat-rating-buttons{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:12px 0 4px}
.sat-rating-buttons button{border:1px solid #d6dde1;background:#fff;border-radius:10px;padding:10px 2px;font-weight:800}
.sat-rating-buttons button.selected{background:#eaf7ed;border-color:#4caf50;color:#218232}
.sat-rating-preview{margin-top:14px;border:1px solid var(--c-border);border-radius:12px;padding:12px;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;background:var(--c-surface)}
.sat-rating-preview>div{text-align:center;min-width:0}
.sat-rating-preview.faces span{display:block;font-size:28px}
.sat-rating-preview.faces small{display:block;font-size:8px;color:var(--c-muted);margin-top:4px}
.sat-rating-preview.stars span{font-size:27px;color:#f2a900}
.sat-rating-preview.buttons b{display:block;border:1px solid var(--c-border);border-radius:9px;padding:8px 2px}
.sat-thanks-check{font-size:42px;line-height:1;color:#4caf50}
.sat-thanks-animated .sat-thanks-check{animation:satThanksPop .5s cubic-bezier(.2,.9,.3,1.25) both}
.sat-thanks-sparkles{display:flex;justify-content:center;gap:12px;height:22px;align-items:center;color:#4caf50;opacity:0}
.sat-thanks-animated .sat-thanks-sparkles{animation:satThanksSpark .85s ease-out .1s both}
.sat-thanks-sparkles i{font-style:normal}
@keyframes satThanksPop{0%{opacity:0;transform:scale(.55)}65%{opacity:1;transform:scale(1.15)}100%{opacity:1;transform:scale(1)}}
@keyframes satThanksSpark{0%{opacity:0;transform:translateY(6px) scale(.7)}45%{opacity:1;transform:translateY(0) scale(1.15)}100%{opacity:.9;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.sat-thanks-animated .sat-thanks-check,.sat-thanks-animated .sat-thanks-sparkles{animation:none!important;opacity:1}}

/* TRACÉO 2.9.20 — Satisfaction : modèle Apparence complet */
.sat-appearance-card{max-width:760px}
.sat-rating-mode{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:7px}
.sat-rating-mode button{border:1px solid var(--c-border);background:var(--c-surface);color:var(--c-text);border-radius:10px;padding:10px 8px;font-weight:800;cursor:pointer}
.sat-rating-mode button.active{border-color:#4caf50;box-shadow:0 0 0 1px #4caf50 inset;color:#218232;background:#eef8f0}
.sat-inline-label{display:block;font-size:12px;font-weight:800;margin:13px 0 7px}
.sat-live-preview{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;border:1px solid var(--c-border);background:var(--c-surface);border-radius:12px;padding:12px}
.sat-live-preview button{border:0;background:transparent;min-width:0;text-align:center;color:var(--c-text);padding:3px 1px}
.sat-live-preview button span{display:block;font-size:31px;line-height:1.05}
.sat-live-preview button small{display:block;font-size:8px;line-height:1.1;margin-top:5px;color:var(--c-muted);white-space:normal}
.sat-live-preview button.selected{border-radius:50%;outline:2px solid #4caf50;outline-offset:2px}
.sat-setting-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid var(--c-border)}
.sat-setting-row strong{display:block;font-size:13px}
.sat-setting-row small{display:block;color:var(--c-muted);font-size:10px;margin-top:2px}
.sat-color-input{display:grid;grid-template-columns:52px 1fr;gap:8px;align-items:center}
.sat-color-input input[type=color]{width:52px;height:40px;padding:3px;border:1px solid var(--c-border);border-radius:9px;background:var(--c-surface)}
.sat-save-appearance{width:100%;margin-top:15px}
.sat-thanks-animated .sat-thanks-check{animation-duration:min(.55s,var(--sat-thanks-duration,2.5s))}
.sat-thanks-animated .sat-thanks-sparkles{animation-duration:min(1s,var(--sat-thanks-duration,2.5s))}
@media(max-width:520px){
  .sat-rating-mode{grid-template-columns:1fr}
  .sat-live-preview{gap:3px;padding:8px}
  .sat-live-preview button span{font-size:26px}
  .sat-live-preview button small{font-size:7px}
}


/* TRACÉO 2.9.20 — Correctif final visages Satisfaction */
.sat-faces{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin:12px 0 4px;
  align-items:stretch;
}
.sat-faces button{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  width:100%;
  min-width:0;
  min-height:78px;
  padding:8px 3px 7px;
  border:1px solid #d6dde1;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  box-sizing:border-box;
}
.sat-faces button span{
  display:block;
  flex:0 0 auto;
  font-size:28px;
  line-height:1;
  margin-bottom:6px;
}
.sat-faces button small{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:26px;
  margin:0;
  padding:0 2px;
  font-size:7.4px;
  line-height:1.08;
  text-align:center;
  white-space:normal;
  overflow:hidden;
  text-overflow:clip;
  word-break:normal;
  overflow-wrap:break-word;
  color:#4f5b66;
}
.sat-faces button.selected{
  background:#edf9ef;
  border-color:#4caf50;
  box-shadow:0 0 0 2px rgba(76,175,80,.14);
  transform:none;
}
.sat-faces button.selected span{
  transform:scale(1.06);
}
.sat-faces button.selected small{
  color:#218232;
  font-weight:800;
}

/* Aperçu administration : mêmes visages et mêmes proportions */
.sat-live-preview{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.sat-live-preview button{
  min-height:74px;
  padding:8px 3px;
  border-radius:12px;
  overflow:hidden;
}
.sat-live-preview button span{
  font-size:28px;
}
.sat-live-preview button small{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  font-size:7.4px;
  line-height:1.08;
  white-space:normal;
  overflow:hidden;
  overflow-wrap:break-word;
}

@media(max-width:430px){
  .sat-faces{gap:4px}
  .sat-faces button{min-height:82px;padding-left:2px;padding-right:2px}
  .sat-faces button span{font-size:26px}
  .sat-faces button small{font-size:6.8px;line-height:1.05}
}


/* TRACÉO 2.9.20 — Visages graphiques Satisfaction identiques sur tous les appareils */
.sat-face{
  position:relative;
  display:block !important;
  width:42px;
  height:42px;
  margin:0 auto 6px !important;
  border-radius:50%;
  flex:0 0 42px;
  box-sizing:border-box;
  background:#f3c944;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.08);
}
.sat-face .eye{
  position:absolute;
  top:13px;
  width:5px;
  height:6px;
  border-radius:50%;
  background:#24272b;
}
.sat-face .e1{left:11px}
.sat-face .e2{right:11px}
.sat-face .mouth{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  box-sizing:border-box;
}

/* Rouge : très insatisfait */
.sat-face-very-bad{background:#ef5a4f}
.sat-face-very-bad .mouth{
  bottom:8px;
  width:18px;
  height:10px;
  border:3px solid #24272b;
  border-bottom:0;
  border-radius:16px 16px 0 0;
}
/* Orange : insatisfait */
.sat-face-bad{background:#f59d20}
.sat-face-bad .mouth{
  bottom:9px;
  width:16px;
  height:8px;
  border:3px solid #343434;
  border-bottom:0;
  border-radius:14px 14px 0 0;
}
/* Jaune : moyen */
.sat-face-neutral{background:#f3cf3b}
.sat-face-neutral .mouth{
  bottom:11px;
  width:15px;
  height:3px;
  border-radius:2px;
  background:#333;
}
/* Vert : satisfait */
.sat-face-good{background:#43bd61}
.sat-face-good .mouth{
  bottom:9px;
  width:17px;
  height:9px;
  border:3px solid #173b22;
  border-top:0;
  border-radius:0 0 16px 16px;
}
/* Vert foncé : très satisfait avec anneau */
.sat-face-very-good{
  background:#319a4b;
  border:3px solid #59dd73;
  box-shadow:0 0 0 3px rgba(57,190,84,.25), inset 0 -2px 0 rgba(0,0,0,.08);
}
.sat-face-very-good .eye{background:#fff}
.sat-face-very-good .mouth{
  bottom:8px;
  width:18px;
  height:10px;
  background:#fff;
  border-radius:0 0 16px 16px;
}
.sat-face-very-good .mouth::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:3px;
  background:#27753b;
}

/* Questionnaire : cases propres, texte lisible */
.sat-faces button{
  min-height:86px !important;
  padding:8px 3px 7px !important;
  overflow:hidden !important;
}
.sat-faces button > span.sat-face{
  font-size:0 !important;
  line-height:0 !important;
}
.sat-faces button small{
  min-height:27px !important;
  font-size:7.2px !important;
  line-height:1.08 !important;
  padding:0 1px !important;
  white-space:normal !important;
  overflow:hidden !important;
  overflow-wrap:break-word !important;
}
.sat-faces button.selected{
  border-color:#39b957 !important;
  background:#effaf1 !important;
  box-shadow:0 0 0 2px rgba(57,185,87,.15) !important;
}
.sat-faces button.selected .sat-face{
  transform:scale(1.06);
}

/* Aperçu administration */
.sat-live-preview .sat-face{
  width:46px;
  height:46px;
  flex-basis:46px;
}
.sat-live-preview button.selected{
  outline:none !important;
}
.sat-live-preview button.selected .sat-face{
  box-shadow:0 0 0 3px rgba(57,185,87,.24), inset 0 -2px 0 rgba(0,0,0,.08);
}
.sat-live-preview button.selected .sat-face-very-good{
  box-shadow:0 0 0 4px rgba(57,185,87,.28), inset 0 -2px 0 rgba(0,0,0,.08);
}

@media(max-width:430px){
  .sat-face{width:38px;height:38px;flex-basis:38px}
  .sat-face .eye{top:12px;width:4px;height:5px}
  .sat-face .e1{left:10px}.sat-face .e2{right:10px}
  .sat-faces button{min-height:82px !important}
  .sat-faces button small{font-size:6.6px !important}
}


/* ============================================================
   TRACÉO 2.9.20 — Satisfaction / visage propre + sélecteur fiable
   ============================================================ */

.sat-rating-mode{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.sat-rating-mode button{
  min-height:44px!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  user-select:none!important;
}
.sat-rating-mode button.active{
  background:#edf8ef!important;
  border-color:#39b957!important;
  color:#16802b!important;
  box-shadow:0 0 0 1px #39b957 inset!important;
}

/* Aperçu */
.sat-live-preview{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:start!important;
  padding:16px 12px!important;
  overflow:hidden!important;
}
.sat-preview-item,
.sat-live-preview > button{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  min-height:92px!important;
  padding:4px 2px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sat-preview-item small,
.sat-live-preview > button small{
  display:block!important;
  width:100%!important;
  margin-top:8px!important;
  font-size:9px!important;
  line-height:1.15!important;
  color:#58636e!important;
  text-align:center!important;
  white-space:normal!important;
  overflow:visible!important;
}
.sat-preview-number b{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:48px!important;
  height:48px!important;
  border-radius:12px!important;
  background:#f2f4f5!important;
  border:1px solid #d8dde1!important;
  font-size:20px!important;
}
.sat-preview-star span{
  color:#f0b51e!important;
  font-size:40px!important;
  line-height:48px!important;
}

/* Visages graphiques */
.sat-face{
  position:relative!important;
  display:block!important;
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  min-height:48px!important;
  margin:0 auto!important;
  padding:0!important;
  border-radius:50%!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  transform:none!important;
  font-size:0!important;
  line-height:0!important;
}
.sat-face .eye{
  position:absolute!important;
  top:15px!important;
  width:5px!important;
  height:6px!important;
  border-radius:50%!important;
  background:#20252a!important;
}
.sat-face .e1{left:12px!important}
.sat-face .e2{right:12px!important}
.sat-face .mouth{
  position:absolute!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  display:block!important;
  box-sizing:border-box!important;
}

/* 1 rouge */
.sat-face-very-bad{
  background:#ef594f!important;
}
.sat-face-very-bad .mouth{
  bottom:8px!important;
  width:20px!important;
  height:11px!important;
  border:3px solid #25292d!important;
  border-bottom:0!important;
  border-radius:18px 18px 0 0!important;
}

/* 2 orange */
.sat-face-bad{
  background:#f39a25!important;
}
.sat-face-bad .mouth{
  bottom:9px!important;
  width:18px!important;
  height:9px!important;
  border:3px solid #303438!important;
  border-bottom:0!important;
  border-radius:16px 16px 0 0!important;
}

/* 3 jaune */
.sat-face-neutral{
  background:#f2c83b!important;
}
.sat-face-neutral .mouth{
  bottom:12px!important;
  width:17px!important;
  height:3px!important;
  background:#303438!important;
  border-radius:2px!important;
}

/* 4 vert */
.sat-face-good{
  background:#43bd61!important;
}
.sat-face-good .mouth{
  bottom:9px!important;
  width:19px!important;
  height:10px!important;
  border:3px solid #194327!important;
  border-top:0!important;
  border-radius:0 0 18px 18px!important;
}

/* 5 vert foncé avec cercle */
.sat-face-very-good{
  background:#2f9949!important;
  border:3px solid #59d971!important;
  box-shadow:0 0 0 4px rgba(70,190,95,.18)!important;
}
.sat-face-very-good .eye{
  background:#fff!important;
}
.sat-face-very-good .mouth{
  bottom:8px!important;
  width:20px!important;
  height:11px!important;
  background:#fff!important;
  border-radius:0 0 18px 18px!important;
}
.sat-face-very-good .mouth::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  width:100%!important;
  height:3px!important;
  background:#28763c!important;
}

/* Questionnaire */
.sat-faces{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
  margin:12px 0 4px!important;
}
.sat-faces button{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  min-height:94px!important;
  padding:8px 3px 7px!important;
  border:1px solid #d7dde1!important;
  border-radius:12px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:none!important;
  transform:none!important;
}
.sat-faces button small{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  width:100%!important;
  min-height:28px!important;
  margin-top:8px!important;
  padding:0 1px!important;
  font-size:8px!important;
  line-height:1.12!important;
  text-align:center!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  overflow:hidden!important;
  color:#59646f!important;
}
.sat-faces button.selected{
  border-color:#39b957!important;
  background:#eff9f1!important;
  box-shadow:0 0 0 2px rgba(57,185,87,.13)!important;
}
.sat-faces button.selected small{
  color:#1a7e2c!important;
  font-weight:800!important;
}

@media(max-width:460px){
  .sat-rating-mode{grid-template-columns:1fr!important}
  .sat-live-preview{gap:5px!important;padding:12px 6px!important}
  .sat-face{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important}
  .sat-face .eye{top:13px!important}
  .sat-face .e1{left:11px!important}
  .sat-face .e2{right:11px!important}
  .sat-faces{gap:4px!important}
  .sat-faces button{min-height:90px!important;padding-left:2px!important;padding-right:2px!important}
  .sat-faces button small{font-size:7px!important;line-height:1.08!important}
  .sat-preview-item small,.sat-live-preview>button small{font-size:7.5px!important}
}


/* ============================================================
   TRACÉO 2.9.20 — Satisfaction selector FINAL (isolated sat11)
   ============================================================ */
.sat11-card{max-width:760px}
.sat11-field{margin:0 0 16px}
.sat11-field>label{display:block;font-size:12px;font-weight:800;margin:0 0 7px;color:var(--c-text)}

.sat11-modes{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.sat11-mode-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:46px;
  padding:9px 10px;
  border:1px solid #cfd6dc;
  border-radius:10px;
  background:#fff;
  color:#1c2027;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  pointer-events:auto;
  box-shadow:none;
  outline:none;
}
.sat11-mode-btn b{font-size:15px}
.sat11-mode-btn.is-active{
  border-color:#36b653;
  background:#edf8ef;
  color:#16802b;
  box-shadow:0 0 0 1px #36b653 inset;
}

.sat11-preview{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  align-items:start;
  width:100%;
  padding:15px 12px;
  border:1px solid #cfd6dc;
  border-radius:12px;
  background:#fff;
  box-sizing:border-box;
  overflow:hidden;
}
.sat11-preview-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  text-align:center;
}
.sat11-preview-item small{
  display:block;
  width:100%;
  margin-top:7px;
  font-size:8px;
  line-height:1.12;
  color:#59646f;
  white-space:normal;
  overflow-wrap:break-word;
}
.sat11-star>span{
  font-size:38px;
  line-height:48px;
  color:#f1b91f;
}
.sat11-number>b{
  display:flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  border-radius:10px;
  background:#f4f6f7;
  border:1px solid #d3d9de;
  color:#1c2027;
  font-size:19px;
}

/* Faces in sat11 preview */
.sat11-preview .sat-face{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
  margin:0 auto!important;
}

/* On mobile keep the 3 controls on one row, as requested */
@media(max-width:520px){
  .sat11-modes{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .sat11-mode-btn{gap:3px;padding:7px 3px;font-size:10px;min-height:42px}
  .sat11-mode-btn b{font-size:12px}
  .sat11-preview{gap:4px;padding:11px 5px}
  .sat11-preview .sat-face{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
  }
  .sat11-preview-item small{font-size:6.7px;line-height:1.06}
  .sat11-star>span{font-size:30px;line-height:38px}
  .sat11-number>b{width:38px;height:38px;font-size:16px}
}


/* ============================================================
   TRACÉO 2.9.20 — Satisfaction / Résultats visuels
   ============================================================ */
.sat-results-wrap{display:flex;flex-direction:column;gap:16px}
.sat-results-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.sat-kpi-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px 16px;
  border:1px solid var(--c-border);
  border-radius:13px;
  background:var(--c-surface);
  box-shadow:0 3px 10px rgba(28,32,39,.04);
}
.sat-kpi-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:12px;
  background:#eef8f0;
  color:#2f9f49;
  font-size:19px;
}
.sat-kpi-card small{
  display:block;
  color:var(--c-muted);
  font-size:10px;
  margin-bottom:2px;
}
.sat-kpi-card strong{
  display:block;
  color:var(--c-text);
  font-size:24px;
  line-height:1;
}
.sat-kpi-card strong em{
  font-style:normal;
  color:var(--c-muted);
  font-size:11px;
  margin-left:2px;
}

.sat-results-grid{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(250px,.8fr);
  gap:16px;
}
.sat-result-card{
  border:1px solid var(--c-border);
  border-radius:14px;
  background:var(--c-surface);
  padding:18px;
  box-shadow:0 3px 12px rgba(28,32,39,.04);
}
.sat-result-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.sat-result-head h3{
  margin:0;
  font-size:15px;
  color:var(--c-text);
}
.sat-result-head p{
  margin:3px 0 0;
  color:var(--c-muted);
  font-size:10px;
}
.sat-count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:30px;
  height:28px;
  padding:0 9px;
  border-radius:999px;
  background:#edf8ef;
  color:#218232;
  font-size:11px;
  font-weight:800;
}

.sat-bars{display:flex;flex-direction:column;gap:10px}
.sat-bar-row{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 76px;
  align-items:center;
  gap:10px;
}
.sat-bar-label{
  display:flex;
  align-items:center;
  gap:3px;
  font-size:11px;
  color:var(--c-text);
}
.sat-bar-label span{color:#f0b51e}
.sat-bar-track{
  position:relative;
  height:10px;
  border-radius:999px;
  background:#edf0f2;
  overflow:hidden;
}
.sat-bar-track i{
  display:block;
  height:100%;
  border-radius:999px;
  min-width:0;
}
.sat-bar-track i.bad{background:#e7655d}
.sat-bar-track i.neutral{background:#e8bd3a}
.sat-bar-track i.good{background:#52b96a}
.sat-bar-track i.very-good{background:#2f9f49}
.sat-bar-value{
  text-align:right;
  font-size:11px;
  font-weight:800;
  color:var(--c-text);
}
.sat-bar-value small{
  font-weight:500;
  color:var(--c-muted);
}

.sat-score-card{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.sat-score-card .sat-result-head{align-self:stretch}
.sat-score-ring{
  --score:0;
  display:grid;
  place-items:center;
  width:150px;
  height:150px;
  margin:3px auto 15px;
  border-radius:50%;
  background:conic-gradient(#42b85c calc(var(--score)*1%), #e8ecef 0);
  position:relative;
}
.sat-score-ring::before{
  content:"";
  position:absolute;
  inset:14px;
  border-radius:50%;
  background:var(--c-surface);
}
.sat-score-ring>div{
  position:relative;
  z-index:1;
  text-align:center;
}
.sat-score-ring strong{
  display:block;
  font-size:30px;
  color:#24863a;
}
.sat-score-ring small{
  display:block;
  color:var(--c-muted);
  font-size:9px;
}
.sat-score-legend{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 12px;
  font-size:9px;
  color:var(--c-muted);
}
.sat-score-legend span{
  display:flex;
  align-items:center;
  gap:5px;
}
.sat-score-legend .dot{
  width:8px;
  height:8px;
  border-radius:50%;
}
.sat-score-legend .dot.good{background:#42b85c}
.sat-score-legend .dot.neutral{background:#e8bd3a}
.sat-score-legend .dot.bad{background:#e7655d}

.sat-response-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sat-response-item{
  border:1px solid #e1e5e8;
  border-radius:12px;
  padding:13px 14px;
  background:#fbfcfc;
}
.sat-response-top{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.sat-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:50%;
  background:#eaf7ed;
  color:#218232;
  font-size:14px;
  font-weight:900;
}
.sat-response-meta strong{
  display:block;
  font-size:11px;
  color:var(--c-text);
}
.sat-response-meta small{
  display:block;
  margin-top:2px;
  font-size:8px;
  color:var(--c-muted);
}
.sat-note-chip{
  min-width:52px;
  padding:6px 9px;
  border-radius:999px;
  text-align:center;
  font-size:10px;
  font-weight:900;
}
.sat-note-chip.bad{background:#fdeceb;color:#b83b33}
.sat-note-chip.neutral{background:#fff7d7;color:#916b00}
.sat-note-chip.good{background:#edf8ef;color:#277f38}
.sat-note-chip.very-good{background:#dff4e4;color:#15742b}

.sat-response-details{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.sat-response-details>div{
  padding:9px 10px;
  border-radius:9px;
  background:#fff;
  border:1px solid #e3e7ea;
}
.sat-response-details small{
  display:block;
  color:var(--c-muted);
  font-size:8px;
  margin-bottom:3px;
}
.sat-response-details p{
  margin:0;
  color:var(--c-text);
  font-size:10px;
  line-height:1.35;
}
.sat-response-empty{
  margin-top:10px;
  color:var(--c-muted);
  font-size:9px;
  font-style:italic;
}
.sat-empty-state{
  padding:34px 16px;
  text-align:center;
  color:var(--c-muted);
}
.sat-empty-state>div{
  font-size:34px;
  color:#f0b51e;
}
.sat-empty-state h3{
  margin:8px 0 5px;
  color:var(--c-text);
  font-size:14px;
}
.sat-empty-state p{
  max-width:420px;
  margin:0 auto;
  font-size:10px;
  line-height:1.45;
}

@media(max-width:900px){
  .sat-results-kpis{grid-template-columns:repeat(2,1fr)}
  .sat-results-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .sat-results-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .sat-kpi-card{padding:11px 10px;gap:8px}
  .sat-kpi-icon{width:34px;height:34px;flex-basis:34px;font-size:16px}
  .sat-kpi-card strong{font-size:20px}
  .sat-result-card{padding:13px}
  .sat-bar-row{grid-template-columns:36px minmax(0,1fr) 58px;gap:7px}
  .sat-response-details{grid-template-columns:1fr}
  .sat-score-ring{width:128px;height:128px}
}


/* TRACÉO 2.9.20 — Aperçu Satisfaction réparé */
.sat12-preview-shell{display:flex;flex-direction:column;gap:14px}
.sat12-preview-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:2px 2px 0
}
.sat12-preview-head h3{margin:0;font-size:16px;color:var(--c-text)}
.sat12-preview-head p{margin:4px 0 0;font-size:10px;color:var(--c-muted)}
.sat12-preview-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:28px;padding:0 10px;border-radius:999px;
  background:#edf8ef;color:#218232;font-size:10px;font-weight:800
}
.sat12-phone{
  max-width:430px;width:100%;margin:0 auto;padding:10px;
  border-radius:26px;background:#20252b;box-shadow:0 12px 28px rgba(28,32,39,.14)
}
.sat12-phone-top{
  display:flex;align-items:center;justify-content:space-between;
  min-height:42px;padding:0 12px;color:#fff;font-size:12px
}
.sat12-phone-card{
  background:#fff;border-radius:20px;padding:18px;color:#1c2027;
  --sat12-accent:#4CAF50
}
.sat12-check{
  display:flex;align-items:center;justify-content:center;
  width:48px;height:48px;border-radius:12px;
  background:color-mix(in srgb,var(--sat12-accent) 12%,white);
  color:var(--sat12-accent);font-size:24px
}
.sat12-phone-card h2{margin:14px 0 5px;font-size:18px}
.sat12-phone-card>p{margin:0;color:#697582;font-size:11px;line-height:1.45}
.sat12-progress{height:5px;border-radius:999px;background:#e7ebed;margin:14px 0 18px;overflow:hidden}
.sat12-progress i{display:block;width:18%;height:100%;background:var(--sat12-accent)}
.sat12-question{margin-top:4px}
.sat12-qtitle{display:flex;align-items:center;gap:4px}
.sat12-qtitle strong{font-size:13px}
.sat12-qtitle b{color:#d64545}
.sat12-question>small{display:block;margin-top:3px;color:#73808b;font-size:8px}
.sat12-preview-ratings{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:12px}
.sat12-preview-stars span{
  display:flex;align-items:center;justify-content:center;
  min-height:44px;border:1px solid #d9dfe3;border-radius:10px;
  color:#f0b51e;font-size:23px
}
.sat12-preview-buttons span{
  display:flex;align-items:center;justify-content:center;
  min-height:42px;border:1px solid #d9dfe3;border-radius:10px;
  font-size:13px;font-weight:900
}
.sat12-preview-face-item{
  display:flex;flex-direction:column;align-items:center;min-width:0
}
.sat12-preview-face-item>.sat-face{
  width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important
}
.sat12-preview-face-item small{
  display:block;width:100%;margin-top:6px;
  font-size:6.7px;line-height:1.05;text-align:center;color:#64707b;
  white-space:normal
}
.sat12-question textarea{
  width:100%;min-height:72px;margin-top:11px;padding:10px;
  border:1px solid #d8dee2;border-radius:10px;background:#f8faf9;resize:none
}
.sat12-choice-row{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:11px}
.sat12-choice-row button,.sat12-actions button{
  min-height:40px;border:1px solid #cfd6dc;border-radius:9px;background:#fff;color:#26313d
}
.sat12-nps{display:grid;grid-template-columns:repeat(11,1fr);gap:2px;margin-top:11px}
.sat12-nps span{
  display:flex;align-items:center;justify-content:center;min-height:30px;
  border:1px solid #d9dfe3;border-radius:6px;font-size:8px
}
.sat12-actions{display:flex;gap:9px;margin-top:16px}
.sat12-actions button{flex:1}
.sat12-actions button.primary{
  background:var(--sat12-accent);border-color:var(--sat12-accent);color:#fff;font-weight:800
}
.sat12-preview-note{
  padding:10px 12px;border-left:3px solid #4caf50;
  border-radius:8px;background:#f4faf5;color:#56616c;font-size:10px
}
@media(max-width:520px){
  .sat12-preview-head{flex-direction:column}
  .sat12-phone{padding:8px}
  .sat12-phone-card{padding:15px}
  .sat12-preview-ratings{gap:3px}
  .sat12-preview-face-item>.sat-face{
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important
  }
  .sat12-preview-face-item small{font-size:6px}
}


/* ============================================================
   TRACÉO 2.9.20 — Messages et bandeaux toujours au premier plan
   Téléphone / tablette / ordinateur
   ============================================================ */

/* Bandeaux temporaires et notifications */
#updateBanner,
#syncBanner,
#backupReminderBanner,
#backupReminder,
#newPasswordBanner,
#manualPdfBanner,
#supportThankYouOverlay,
#successAnimOverlay,
#pointageNotificationOverlay,
#pointageNotifOverlay,
#traceoImportOverlay,
#traceoDeleteOverlay,
#traceoDeleteConfirmOverlay,
#dupPointageOverlay,
#traceoMfaSetupOverlay,
#traceoMfaCodeOverlay,
#traceoRecoveryCodesOverlay,
#changelogOverlay{
  z-index:2147483646 !important;
  pointer-events:auto !important;
  visibility:visible !important;
  opacity:1 !important;
}

/* Les vrais dialogues passent encore au-dessus des bandeaux si nécessaire. */
.modal,
.overlay,
[role="dialog"]{
  position:relative;
  z-index:2147483645;
}

/* Toasts / messages courts */
.toast,
.toast-container,
#toast,
#toastContainer,
[class*="toast"]{
  z-index:2147483647 !important;
  pointer-events:auto !important;
}

/* Tous les bandeaux fixes restent dans la zone visible. */
#updateBanner,
#syncBanner,
#backupReminderBanner,
#backupReminder,
#newPasswordBanner,
#manualPdfBanner{
  max-width:calc(100vw - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))) !important;
  box-sizing:border-box !important;
}

/* Adaptation téléphone */
@media(max-width:600px){
  #updateBanner,
  #syncBanner,
  #backupReminderBanner,
  #backupReminder,
  #newPasswordBanner,
  #manualPdfBanner{
    left:max(8px,env(safe-area-inset-left)) !important;
    right:max(8px,env(safe-area-inset-right)) !important;
    width:auto !important;
    font-size:12px !important;
  }

  #updateBanner button,
  #syncBanner button,
  #backupReminderBanner button,
  #backupReminder button,
  #newPasswordBanner button,
  #manualPdfBanner button,
  .toast button{
    min-height:38px !important;
    touch-action:manipulation !important;
    pointer-events:auto !important;
  }
}

/* Tablette / ordinateur : garde les messages visibles sans masquer tout l'écran. */
@media(min-width:601px){
  #updateBanner,
  #syncBanner,
  #backupReminderBanner,
  #backupReminder,
  #newPasswordBanner,
  #manualPdfBanner{
    left:50% !important;
    right:auto !important;
    transform:translateX(-50%) !important;
    width:min(720px,calc(100vw - 32px)) !important;
  }
}


/* ===== TRACÉO 2.9.60 — messages d'action très contrastés ===== */
#toast.toast{
  position:fixed !important;
  left:50% !important;
  bottom:calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  top:auto !important;
  transform:translateX(-50%) !important;
  width:auto !important;
  min-width:min(280px,calc(100vw - 28px)) !important;
  max-width:min(460px,calc(100vw - 28px)) !important;
  padding:12px 15px !important;
  border-radius:14px !important;
  color:#fff !important;
  background:#243142 !important;
  border:1px solid rgba(255,255,255,.22) !important;
  box-shadow:0 10px 28px rgba(0,0,0,.34),0 2px 8px rgba(0,0,0,.22) !important;
  font-size:13.5px !important;
  font-weight:750 !important;
  line-height:1.35 !important;
  text-align:left !important;
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  opacity:0;
  pointer-events:none !important;
  z-index:2147483647 !important;
}
#toast.toast.show{
  opacity:1 !important;
  pointer-events:auto !important;
  transform:translateX(-50%) translateY(-4px) !important;
}
#toast.toast.toast-success{
  background:#176b37 !important;
  border-color:#4ade80 !important;
}
#toast.toast.toast-info{
  background:#174b78 !important;
  border-color:#60a5fa !important;
}
#toast.toast.toast-warning{
  background:#8a4b08 !important;
  border-color:#fbbf24 !important;
}
#toast.toast.toast-error{
  background:#8f2525 !important;
  border-color:#f87171 !important;
}
#toast .toast-icon{
  flex:0 0 auto;
  font-size:16px;
  line-height:1;
}
#toast .toast-message{
  flex:1 1 auto;
  min-width:0;
}
#toast .toast-close{
  flex:0 0 auto;
  opacity:.9 !important;
  width:26px;
  height:26px;
  display:flex !important;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.14);
}
@media (min-width: 800px){
  #toast.toast{
    bottom:28px !important;
  }
}


/* ===== TRACÉO 2.9.60 — notifications d'action visuel final ===== */
#toast.toast{
  position:fixed !important;
  left:50% !important;
  top:92px !important;
  bottom:auto !important;
  transform:translateX(-50%) translateY(-6px) !important;
  width:min(420px,calc(100vw - 32px)) !important;
  min-width:0 !important;
  max-width:420px !important;
  padding:13px 14px !important;
  border-radius:13px !important;
  color:#fff !important;
  border:2px solid rgba(255,255,255,.18) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.30),0 3px 9px rgba(0,0,0,.20) !important;
  font-size:13px !important;
  line-height:1.35 !important;
  text-align:left !important;
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) 30px !important;
  align-items:center !important;
  gap:11px !important;
  opacity:0;
  pointer-events:none !important;
  z-index:2147483647 !important;
  overflow:hidden;
}
#toast.toast.show{
  opacity:1 !important;
  pointer-events:auto !important;
  transform:translateX(-50%) translateY(0) !important;
}
#toast.toast.toast-success{
  background:linear-gradient(135deg,#08762f,#005d27) !important;
  border-color:#16c45a !important;
}
#toast.toast.toast-info{
  background:linear-gradient(135deg,#07559a,#003d77) !important;
  border-color:#1f8ff1 !important;
}
#toast.toast.toast-warning{
  background:linear-gradient(135deg,#d77a00,#b95f00) !important;
  border-color:#ffae1a !important;
}
#toast.toast.toast-error{
  background:linear-gradient(135deg,#d10d17,#a9000a) !important;
  border-color:#ff3b44 !important;
}
#toast .toast-icon{
  width:38px !important;
  height:38px !important;
  border-radius:50% !important;
  border:2px solid rgba(255,255,255,.95) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
  font-size:20px !important;
  font-weight:900 !important;
  line-height:1 !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
#toast .toast-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
#toast .toast-title{
  font-size:14px !important;
  font-weight:900 !important;
  color:#fff !important;
  letter-spacing:.01em;
}
#toast .toast-message{
  font-size:12.5px !important;
  font-weight:650 !important;
  color:#fff !important;
  opacity:.98;
  overflow-wrap:anywhere;
}
#toast .toast-close{
  width:28px !important;
  height:28px !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  opacity:1 !important;
  border:1px solid rgba(255,255,255,.22);
}
#toast .toast-close svg{
  width:15px !important;
  height:15px !important;
}

/* Téléphone + tablette : juste au-dessus de la navigation basse */
@media (max-width: 799px){
  #toast.toast{
    top:auto !important;
    bottom:calc(78px + env(safe-area-inset-bottom,0px)) !important;
    width:calc(100vw - 28px) !important;
    max-width:520px !important;
    grid-template-columns:40px minmax(0,1fr) 30px !important;
    padding:12px 13px !important;
    border-radius:12px !important;
  }
  #toast .toast-icon{
    width:36px !important;
    height:36px !important;
    font-size:19px !important;
  }
}

/* Très petits écrans */
@media (max-width: 380px){
  #toast.toast{
    width:calc(100vw - 18px) !important;
    grid-template-columns:36px minmax(0,1fr) 28px !important;
    gap:8px !important;
    padding:10px 11px !important;
  }
  #toast .toast-icon{
    width:34px !important;
    height:34px !important;
    font-size:18px !important;
  }
  #toast .toast-title{font-size:13px !important;}
  #toast .toast-message{font-size:11.8px !important;}
}


/* =====================================================================
   TRACÉO 2.9.60 — CLARTÉ V2
   Affinage visuel conservateur : identité TRACÉO préservée.
   ===================================================================== */

/* Texte plus net sans modifier les proportions de l'interface */
html,body{
  text-rendering:optimizeLegibility;
}
body{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Cartes : bordure plus propre, ombre très légère */
.card,
.home-card,
.home-metric,
.fiche-item,
.stat-box,
.section-card{
  border-color:#AEB7C0 !important;
  box-shadow:0 1px 3px rgba(20,28,36,.08) !important;
}

/* Titres et textes secondaires */
.card h2,
.home-card h2{
  font-weight:800 !important;
}
.section-note,
.home-metric-sub,
.home-metric-foot,
small{
  color:#535E69 !important;
}

/* Champs : conserver le look TRACÉO mais rendre les contours plus francs */
input[type=text],
input[type=number],
input[type=date],
input[type=time],
input[type=password],
input[type=email],
select,
textarea,
.csel-display{
  border-color:#94B99C !important;
  box-shadow:none !important;
}
input:focus,
select:focus,
textarea:focus,
.csel-display:focus,
.csel-display[aria-expanded="true"]{
  border-color:#3E9C4C !important;
  box-shadow:0 0 0 2px rgba(62,156,76,.18) !important;
  outline:none !important;
}

/* Boutons et icônes : contours plus nets, pas plus gros */
button,
.btn-primary,
.btn-outline,
.btn-dark,
.btn-danger{
  font-weight:700 !important;
}
button svg,
.btn-icon svg,
.icon-row-btn svg,
.bottomnav svg{
  stroke-width:2.25 !important;
  shape-rendering:geometricPrecision;
}

/* Navigation basse */
.bottomnav{
  border-top-color:#AEB7C0 !important;
  box-shadow:0 -1px 5px rgba(20,28,36,.08) !important;
}
.bottomnav button{
  font-weight:700 !important;
}

/* Statuts : plus lisibles, sans grossir la barre */
.status-label{
  color:#59636E !important;
  font-weight:700 !important;
}
.status-label.active{
  color:#1C2027 !important;
  font-weight:800 !important;
}
.status-line{
  background:#AEB7C0 !important;
}
.status-dot.current{
  box-shadow:0 0 0 3px rgba(232,135,30,.15) !important;
}

/* Heures / détails */
.fiche-item .meta,
table td{
  color:#26313B !important;
}
table th{
  color:#3D4854 !important;
  font-weight:800 !important;
}

/* Accueil */
.home-metric-value{
  font-weight:900 !important;
}
.home-metric-label{
  font-weight:800 !important;
}

/* Dialogues : ombre plus courte et plus nette */
[role="dialog"],
.modal-card,
.popup-card{
  box-shadow:0 10px 28px rgba(20,28,36,.22) !important;
}

/* =====================================================================
   Notifications d'action : sans gros titre "Information / Succès".
   Icône + message + bouton fermer uniquement.
   ===================================================================== */
#toast.toast{
  display:grid !important;
  grid-template-columns:36px minmax(0,1fr) 28px !important;
  align-items:center !important;
  gap:9px !important;
  width:min(390px,calc(100vw - 28px)) !important;
  max-width:390px !important;
  padding:11px 12px !important;
  border-radius:12px !important;
  border:2px solid rgba(255,255,255,.18) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.28) !important;
  font-size:13px !important;
  font-weight:750 !important;
  line-height:1.3 !important;
}
#toast .toast-icon{
  width:32px !important;
  height:32px !important;
  border-radius:50% !important;
  border:2px solid rgba(255,255,255,.95) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
  font-size:17px !important;
  font-weight:900 !important;
}
#toast .toast-message{
  color:#fff !important;
  font-size:13px !important;
  font-weight:750 !important;
  line-height:1.3 !important;
}
#toast .toast-close{
  width:27px !important;
  height:27px !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  opacity:1 !important;
}
#toast.toast.toast-success{
  background:#08752F !important;
  border-color:#19B958 !important;
}
#toast.toast.toast-info{
  background:#07518D !important;
  border-color:#2386D8 !important;
}
#toast.toast.toast-warning{
  background:#C16B00 !important;
  border-color:#E89B19 !important;
}
#toast.toast.toast-error{
  background:#B7131C !important;
  border-color:#E44149 !important;
}

/* PC : sous le bandeau, sans descendre trop bas */
@media (min-width:800px){
  #toast.toast{
    top:82px !important;
    bottom:auto !important;
  }
}

/* Mobile/tablette : juste au-dessus de la navigation */
@media (max-width:799px){
  #toast.toast{
    top:auto !important;
    bottom:calc(76px + env(safe-area-inset-bottom,0px)) !important;
    width:calc(100vw - 22px) !important;
    max-width:500px !important;
  }
}


/* =====================================================================
   TRACÉO 2.9.60 — RELIEF UI
   Couche purement visuelle : profondeur, hiérarchie, netteté.
   ===================================================================== */

/* Fond global plus vivant mais discret */
body{
  background:
    radial-gradient(circle at top left, rgba(76,175,80,.055), transparent 28%),
    linear-gradient(180deg,#F4F6F5 0%,#EEF2F0 100%) !important;
}
.app-shell{
  background:rgba(255,255,255,.94);
}

/* En-tête avec profondeur douce */
.topbar{
  background:linear-gradient(180deg,#1D222A 0%,#14191F 100%) !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 3px 10px rgba(0,0,0,.20) !important;
}
.topbar::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(76,175,80,.55),transparent);
  pointer-events:none;
}

/* Cartes principales : vrai relief, sans effet flottant excessif */
.card,
.home-card,
.home-metric,
.section-card,
.stat-box,
.preset-card{
  background:linear-gradient(180deg,#FFFFFF 0%,#FBFCFB 100%) !important;
  border:1px solid #B7C0C8 !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 1px 2px rgba(22,31,40,.08),
    0 5px 14px rgba(22,31,40,.055) !important;
}
.card:hover,
.home-card:hover,
.home-metric:hover{
  border-color:#AAB4BD !important;
}

/* Titres de cartes */
.card h2,
.home-card h2{
  color:#35414C !important;
  text-shadow:0 1px 0 #fff;
}
.card h2::before{
  box-shadow:0 1px 2px rgba(0,0,0,.14);
}

/* Champs : profondeur légère et nette */
input[type=text],
input[type=number],
input[type=date],
input[type=time],
input[type=password],
input[type=email],
select,
textarea,
.csel-display{
  background:linear-gradient(180deg,#FFFFFF 0%,#F8FAF8 100%) !important;
  border:1.5px solid #9DB7A2 !important;
  box-shadow:
    inset 0 1px 2px rgba(23,31,40,.045),
    0 1px 0 rgba(255,255,255,.9) !important;
}
input:hover,
select:hover,
textarea:hover,
.csel-display:hover{
  border-color:#7FAE88 !important;
}
input:focus,
select:focus,
textarea:focus,
.csel-display:focus,
.csel-display[aria-expanded="true"]{
  background:#FFFFFF !important;
  border-color:#3E9C4C !important;
  box-shadow:
    0 0 0 3px rgba(62,156,76,.15),
    0 2px 6px rgba(40,120,55,.10) !important;
}

/* Boutons principaux : aspect plus solide */
.btn-primary{
  background:linear-gradient(180deg,#4FBC61 0%,#389E4A 100%) !important;
  border:1px solid #2C8C3E !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 2px 4px rgba(24,86,39,.22) !important;
  text-shadow:0 1px 0 rgba(0,0,0,.12);
}
.btn-primary:active{
  transform:translateY(1px);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.10),
    0 1px 2px rgba(24,86,39,.15) !important;
}
.btn-outline{
  background:linear-gradient(180deg,#FFFFFF 0%,#F3F5F4 100%) !important;
  border:1px solid #A9B3BC !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 1px 2px rgba(20,28,36,.08) !important;
}
.btn-outline:active{
  transform:translateY(1px);
}
.btn-danger{
  background:linear-gradient(180deg,#FFF1F0 0%,#FBE5E4 100%) !important;
  box-shadow:0 1px 2px rgba(130,35,35,.08) !important;
}

/* Boutons icônes */
.btn-icon,
.icon-row-btn{
  box-shadow:0 1px 2px rgba(20,28,36,.10);
}
.btn-icon:active,
.icon-row-btn:active{
  transform:translateY(1px);
}

/* Navigation basse : détachée du contenu */
.bottomnav{
  background:rgba(255,255,255,.97) !important;
  backdrop-filter:saturate(120%) blur(8px);
  -webkit-backdrop-filter:saturate(120%) blur(8px);
  border-top:1px solid #B3BCC5 !important;
  box-shadow:0 -3px 12px rgba(19,27,35,.10) !important;
}
.bottomnav button{
  position:relative;
}
.bottomnav button.active::before,
.bottomnav button[aria-current="page"]::before{
  content:"";
  position:absolute;
  top:3px;
  left:50%;
  width:28px;
  height:3px;
  border-radius:3px;
  transform:translateX(-50%);
  background:#4CAF50;
  box-shadow:0 1px 3px rgba(41,130,54,.25);
}

/* Accueil : cartes métriques avec relief différencié */
.home-metric{
  position:relative;
  overflow:hidden;
}
.home-metric::after{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background:linear-gradient(90deg,#4CAF50,#83CF8B);
  opacity:.78;
}
.home-metric-value{
  color:#171D24 !important;
  text-shadow:0 1px 0 #fff;
}

/* Carte assistant / alertes internes */
.home-assistant-card,
.home-today-item{
  border-color:#B9C2CA !important;
}
.home-today-item{
  background:linear-gradient(180deg,#FFFFFF,#F8FAF9) !important;
}

/* Fiches/historique : chaque ligne mieux séparée */
.fiche-item{
  background:linear-gradient(180deg,#FFFFFF,#FAFBFA) !important;
  border:1px solid #C1C8CE !important;
  border-radius:10px;
  box-shadow:0 1px 2px rgba(22,31,40,.055) !important;
}
.fiche-item + .fiche-item{
  margin-top:7px;
}

/* Sous-blocs */
.subrow{
  background:linear-gradient(180deg,#FBFCFB,#F6F8F7) !important;
  border-color:#C1C8CE !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

/* Statistiques */
.stat-box{
  position:relative;
  overflow:hidden;
}
.stat-box::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;width:3px;
  background:#4CAF50;
  opacity:.75;
}

/* Progression des statuts */
.status-dot{
  border:1px solid rgba(0,0,0,.10) !important;
  box-shadow:0 1px 2px rgba(20,28,36,.10);
}
.status-dot.done{
  background:linear-gradient(180deg,#3CC75A,#1FA443) !important;
}
.status-dot.current{
  background:linear-gradient(180deg,#F19A3A,#DA7411) !important;
}
.status-line{
  box-shadow:inset 0 1px 1px rgba(0,0,0,.06);
}

/* Chips / badges */
.chip,
.send-chip,
.home-chip{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 1px 2px rgba(20,28,36,.06);
}

/* Tableaux */
table{
  border-collapse:separate !important;
  border-spacing:0;
}
table th{
  background:#F1F4F2 !important;
  border-bottom:1px solid #B8C1C9 !important;
}
table td{
  border-bottom:1px solid #D5DADE !important;
}
table tr:hover td{
  background:#FAFCFA !important;
}

/* Dialogues et panneaux */
[role="dialog"],
.modal-card,
.popup-card{
  border:1px solid #AAB4BD !important;
  box-shadow:
    0 2px 6px rgba(20,28,36,.14),
    0 16px 38px rgba(20,28,36,.22) !important;
}

/* Notifications : relief renforcé, sans gros titre */
#toast.toast{
  box-shadow:
    0 2px 6px rgba(0,0,0,.18),
    0 10px 24px rgba(0,0,0,.30) !important;
}
#toast .toast-icon{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 1px 3px rgba(0,0,0,.18);
}
#toast .toast-close{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}

/* Images, photos et signatures : bordure propre */
.photo-grid img,
.signature-box,
.logo-preview{
  border-color:#AEB7C0 !important;
  box-shadow:0 1px 3px rgba(20,28,36,.10);
}

/* Mobile : relief conservé mais compact */
@media (max-width:599px){
  .card,
  .home-card,
  .home-metric,
  .stat-box{
    box-shadow:
      0 1px 2px rgba(22,31,40,.075),
      0 3px 8px rgba(22,31,40,.045) !important;
  }
  .bottomnav{
    box-shadow:0 -2px 9px rgba(19,27,35,.10) !important;
  }
}

/* Desktop : cadre un peu plus premium */
@media (min-width:900px){
  body{
    background:
      radial-gradient(circle at top center,rgba(76,175,80,.055),transparent 34%),
      linear-gradient(180deg,#E8EDEA,#DEE5E1) !important;
  }
  .app-shell{
    border-left:1px solid #C1C8CE !important;
    border-right:1px solid #C1C8CE !important;
    box-shadow:
      0 2px 8px rgba(20,28,36,.08),
      0 14px 34px rgba(20,28,36,.12) !important;
  }
}


/* =====================================================================
   TRACÉO 2.9.60 — boutons de partage différenciés
   Fiche chantier / Base vie / Autocontrôle
   ===================================================================== */
.share-action-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}
.share-action-card{
  min-width:0;
  min-height:78px;
  padding:12px 16px !important;
  border-radius:12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:14px !important;
  text-align:left !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 2px 5px rgba(22,31,40,.10) !important;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background .14s ease;
}
.share-action-card:hover{
  transform:translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 5px 12px rgba(22,31,40,.13) !important;
}
.share-action-card:active{
  transform:translateY(1px);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(22,31,40,.08) !important;
}
.share-action-mail{
  background:linear-gradient(180deg,#F5FAFF 0%,#E9F3FF 100%) !important;
  border:1.5px solid #1976D2 !important;
  color:#1268BE !important;
}
.share-action-mail:hover{
  background:linear-gradient(180deg,#EDF7FF 0%,#DFEEFF 100%) !important;
  border-color:#0F65BC !important;
}
.share-action-whatsapp{
  background:linear-gradient(180deg,#F5FFF8 0%,#EAF8EE 100%) !important;
  border:1.5px solid #179B45 !important;
  color:#118A3B !important;
}
.share-action-whatsapp:hover{
  background:linear-gradient(180deg,#EEFFF3 0%,#DFF5E6 100%) !important;
  border-color:#0C8134 !important;
}
.share-action-icon{
  flex:0 0 46px;
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 2px 5px rgba(20,28,36,.16);
}
.share-action-icon-mail{
  background:linear-gradient(180deg,#2388E8 0%,#0868C8 100%);
}
.share-action-icon-whatsapp{
  background:linear-gradient(180deg,#22C95B 0%,#0EA545 100%);
}
.share-action-icon svg{
  width:25px !important;
  height:25px !important;
  stroke:#fff !important;
  stroke-width:2.2 !important;
}
.share-action-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.share-action-text strong{
  font-size:15px;
  line-height:1.2;
  font-weight:850;
  color:currentColor;
}
.share-action-text small{
  font-size:12px;
  line-height:1.25;
  font-weight:600;
  color:#535E69 !important;
}
@media (max-width:540px){
  .share-action-grid{
    grid-template-columns:minmax(0,1fr);
    gap:9px;
  }
  .share-action-card{
    min-height:68px;
    padding:10px 13px !important;
  }
  .share-action-icon{
    flex-basis:42px;
    width:42px;
    height:42px;
  }
  .share-action-icon svg{
    width:23px !important;
    height:23px !important;
  }
  .share-action-text strong{font-size:14px;}
  .share-action-text small{font-size:11.5px;}
}


/* =====================================================================
   TRACÉO 2.9.60 — relief renforcé et traits plus marqués
   Visuel uniquement.
   ===================================================================== */

/* Contours principaux plus francs */
.card,
.home-card,
.home-metric,
.section-card,
.stat-box,
.preset-card,
.fiche-item,
.subrow{
  border-width:1.4px !important;
  border-color:#9FAAB4 !important;
}

/* Cartes un peu plus détachées */
.card,
.home-card,
.home-metric,
.section-card,
.stat-box{
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 2px 4px rgba(20,28,36,.10),
    0 7px 16px rgba(20,28,36,.07) !important;
}

/* Traits de séparation */
hr.sep,
.section-separator,
.divider,
.card + .card{
  border-color:#A9B3BC !important;
}

/* Champs : traits plus lisibles */
input[type=text],
input[type=number],
input[type=date],
input[type=time],
input[type=password],
input[type=email],
select,
textarea,
.csel-display{
  border-width:1.6px !important;
  border-color:#88A990 !important;
}
input:focus,
select:focus,
textarea:focus,
.csel-display:focus,
.csel-display[aria-expanded="true"]{
  border-width:1.8px !important;
  border-color:#329444 !important;
  box-shadow:0 0 0 3px rgba(50,148,68,.18),0 2px 7px rgba(40,120,55,.11) !important;
}

/* Boutons plus présents */
.btn-primary,
.btn-outline,
.btn-danger,
.btn-dark,
.icon-row-btn{
  border-width:1.4px !important;
}
.btn-primary{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 3px 6px rgba(24,86,39,.22) !important;
}
.btn-outline{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 4px rgba(20,28,36,.11) !important;
}

/* Boutons Mail / WhatsApp */
.share-action-card{
  border-width:1.8px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 3px 7px rgba(22,31,40,.12) !important;
}
.share-action-mail{
  border-color:#0F6FD3 !important;
}
.share-action-whatsapp{
  border-color:#148B3E !important;
}
.share-action-icon{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 3px 6px rgba(20,28,36,.20) !important;
}

/* Navigation */
.bottomnav{
  border-top-width:1.5px !important;
  border-top-color:#9EA9B3 !important;
  box-shadow:0 -3px 14px rgba(19,27,35,.12) !important;
}

/* En-tête */
.topbar{
  border-bottom:1.5px solid rgba(76,175,80,.55) !important;
  box-shadow:0 4px 12px rgba(0,0,0,.22) !important;
}

/* Statuts */
.status-line{
  height:3px !important;
  background:#9EA8B2 !important;
}
.status-line.done{
  background:#239E43 !important;
}
.status-dot{
  border-width:1.5px !important;
  box-shadow:0 2px 4px rgba(20,28,36,.14) !important;
}

/* Tableaux */
table th{
  border-bottom:1.5px solid #A9B3BC !important;
}
table td{
  border-bottom:1px solid #C6CDD3 !important;
}

/* Icônes */
button svg,
.btn-icon svg,
.icon-row-btn svg,
.bottomnav svg,
.share-action-icon svg{
  stroke-width:2.35 !important;
}

/* Notifications */
#toast.toast{
  border-width:2px !important;
  box-shadow:0 3px 8px rgba(0,0,0,.20),0 12px 26px rgba(0,0,0,.30) !important;
}

/* Mobile : ne pas alourdir */
@media (max-width:599px){
  .card,
  .home-card,
  .home-metric,
  .section-card,
  .stat-box{
    box-shadow:
      0 1px 2px rgba(20,28,36,.09),
      0 4px 10px rgba(20,28,36,.06) !important;
  }
}


/* ===== TRACÉO 2.9.60 — code chantier compact + popup nom complet ===== */
.chantier-code-btn{
  min-height:0 !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  background:#EEF8F0 !important;
  color:#236B35 !important;
  border:1.4px solid #A9CFB1 !important;
  box-shadow:0 1px 2px rgba(20,28,36,.07) !important;
  font-size:11px !important;
  font-weight:850 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
}
.chantier-code-btn:hover{
  background:#E3F3E7 !important;
  border-color:#78B986 !important;
}
.chantier-code-btn-day{
  padding:3px 8px !important;
  font-size:10.5px !important;
}
.chantier-name-overlay{
  position:fixed;
  inset:0;
  z-index:2147483646;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.chantier-name-dialog{
  width:min(92vw,430px);
  background:#fff;
  border:1.5px solid #AEB7C0;
  border-radius:16px;
  padding:20px;
  box-shadow:0 16px 42px rgba(15,23,42,.28);
  text-align:center;
}
.chantier-name-code{
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  background:#EEF8F0;
  color:#236B35;
  border:1px solid #A9CFB1;
  font-size:13px;
  font-weight:900;
  margin-bottom:12px;
}
.chantier-name-full{
  color:#1C2732;
  font-size:16px;
  font-weight:800;
  line-height:1.4;
  overflow-wrap:anywhere;
  margin-bottom:18px;
}
.chantier-name-close{
  min-width:120px;
  justify-content:center;
}


/* ===== TRACÉO 2.9.60 — Heures alignées + guides différenciés ===== */
.heures-chantier-table,
.heures-day-table{
  width:100%;
}
.heures-chantier-head,
.heures-chantier-row{
  display:grid;
  grid-template-columns:minmax(120px,1fr) 120px 105px 85px;
  align-items:center;
  column-gap:20px;
  padding:5px 0;
}
.heures-chantier-head{
  font-size:10.5px;
  font-weight:850;
  color:#4A5561;
  border-bottom:1px solid #C3CBD2;
}
.heures-chantier-row{
  font-size:12px;
  border-bottom:1px dashed var(--c-border);
}
.heures-chantier-head span:not(:first-child),
.heures-chantier-row span:not(:first-child){
  text-align:right;
}
.heures-normal-cell{
  font-weight:800;
  white-space:nowrap;
}
.heures-sup-cell{
  color:#1D4ED8;
  font-weight:850;
  white-space:nowrap;
}
.heures-total-cell{
  font-weight:900;
  white-space:nowrap;
}
.heures-day-head,
.heures-day-row{
  display:grid;
  grid-template-columns:minmax(210px,1.2fr) minmax(90px,.7fr) 90px 85px 80px;
  align-items:center;
  column-gap:18px;
}
.heures-day-head{
  padding:4px 0 5px;
  font-size:10.5px;
  font-weight:850;
  color:#4A5561;
  border-bottom:1px solid #C3CBD2;
}
.heures-day-row{
  min-height:34px;
  padding:4px 0;
  font-size:12px;
  border-bottom:1px dashed var(--c-border);
}
.heures-day-head span:nth-child(n+3),
.heures-day-row > span:nth-child(n+3){
  text-align:right;
}
.heures-day-date{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  flex-wrap:wrap;
}
.heures-day-chantiers{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
@media (max-width:700px){
  .heures-chantier-head,
  .heures-chantier-row{
    grid-template-columns:minmax(82px,1fr) 82px 72px 66px;
    column-gap:9px;
  }
  .heures-chantier-head{
    font-size:9.5px;
  }
  .heures-day-head,
  .heures-day-row{
    grid-template-columns:minmax(132px,1.25fr) 72px 62px 60px 58px;
    column-gap:7px;
  }
  .heures-day-head{font-size:9px;}
  .heures-day-row{font-size:10.5px;}
  .heures-day-date{gap:3px;}
  .chantier-code-btn-day{padding:2px 5px !important;font-size:9.5px !important;}
}
@media (max-width:480px){
  .heures-day-head{
    display:none;
  }
  .heures-day-row{
    grid-template-columns:minmax(125px,1fr) 66px 54px 54px;
    column-gap:6px;
  }
  .heures-day-row .heures-day-chantiers{
    grid-column:2;
  }
  .heures-day-row .heures-normal-cell{grid-column:3;}
  .heures-day-row .heures-sup-cell{grid-column:4;}
  .heures-day-row .heures-total-cell{
    grid-column:3 / 5;
    grid-row:2;
    text-align:right;
    font-size:10px;
    color:#4A5561;
  }
}

/* Guides : vert = JDC / sous-traitants, bleu = Direction */
.guide-choice-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}
.guide-choice-card{
  position:relative;
  min-width:0;
  min-height:86px;
  padding:14px 16px !important;
  display:grid !important;
  grid-template-columns:48px minmax(0,1fr) 20px !important;
  align-items:center !important;
  gap:13px !important;
  border-radius:12px !important;
  text-align:left !important;
  box-shadow:0 2px 6px rgba(20,28,36,.10) !important;
}
.guide-choice-jdc{
  background:linear-gradient(180deg,#F5FCF7,#EAF7ED) !important;
  border:1.5px solid #4CAF65 !important;
  color:#138A37 !important;
}
.guide-choice-direction{
  background:linear-gradient(180deg,#F5F9FF,#EAF2FF) !important;
  border:1.5px solid #3B82F6 !important;
  color:#1664D9 !important;
}
.guide-choice-icon{
  width:44px;
  height:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:currentColor;
  color:#fff;
  box-shadow:0 2px 5px rgba(20,28,36,.14);
}
.guide-choice-icon svg{
  stroke:#fff !important;
}
.guide-choice-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.guide-choice-text strong{
  color:currentColor;
  font-size:14.5px;
  font-weight:850;
}
.guide-choice-text small{
  color:#4E5965 !important;
  font-size:11.5px;
  line-height:1.35;
  font-weight:600;
}
.guide-choice-arrow{
  font-size:30px;
  line-height:1;
  font-weight:400;
  color:currentColor;
}
.guide-choice-unseen{
  position:absolute;
  top:8px;
  right:9px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#EF4444;
  box-shadow:0 0 0 2px #fff;
}
@media (max-width:620px){
  .guide-choice-grid{
    grid-template-columns:minmax(0,1fr);
  }
}


/* ===== TRACÉO 2.9.60 — horaire de pointage prérempli ===== */
.pointage-default-note{
  padding:7px 9px;
  border-radius:8px;
  background:#F5F8F6;
  border:1px solid #C4D2C7;
  color:#405047 !important;
  font-weight:700;
  line-height:1.35;
}


/* =====================================================================
   TRACÉO 2.9.60 — uniquement le logo de connexion + effet lumineux
   Aucun autre élément de la page de connexion n'est modifié.
   ===================================================================== */
.traceo-login-logo-zone{
  position:relative;
  width:clamp(235px,34vw,310px);
  min-height:clamp(155px,20vw,205px);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:18px;
  padding:0 8px 20px;
  box-sizing:border-box;
  overflow:visible;
}
.traceo-login-logo-original{
  position:relative;
  z-index:2;
  display:block;
  width:100%;
  height:auto;
  max-height:190px;
  object-fit:contain;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  filter:none !important;
}
.traceo-login-logo-halo{
  position:absolute;
  z-index:0;
  left:50%;
  top:48%;
  width:68%;
  height:48%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:radial-gradient(circle,rgba(0,198,72,.12) 0%,rgba(0,198,72,.055) 34%,transparent 72%);
  filter:blur(13px);
  pointer-events:none;
}
.traceo-login-neon-line{
  position:absolute;
  z-index:3;
  left:7%;
  right:7%;
  bottom:7px;
  height:16px;
  pointer-events:none;
}
.traceo-login-neon-line::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:1px;
  transform:translateY(-50%);
  background:linear-gradient(90deg,
    transparent 0%,
    rgba(0,188,66,.15) 12%,
    rgba(0,205,72,.7) 38%,
    rgba(59,255,119,.95) 50%,
    rgba(0,205,72,.7) 62%,
    rgba(0,188,66,.15) 88%,
    transparent 100%);
  box-shadow:
    0 0 3px rgba(0,210,75,.42),
    0 0 7px rgba(0,210,75,.26);
}
.traceo-login-neon-core{
  position:absolute;
  left:50%;
  top:50%;
  width:8px;
  height:8px;
  transform:translate(-50%,-50%) rotate(45deg);
  background:#EFFFF2;
  border-radius:1px;
  box-shadow:
    0 0 3px #fff,
    0 0 6px rgba(90,255,140,.95),
    0 0 12px rgba(0,225,85,.8),
    0 0 24px rgba(0,205,72,.38);
}
.traceo-login-neon-core::before,
.traceo-login-neon-core::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%) rotate(-45deg);
  border-radius:999px;
}
.traceo-login-neon-core::before{
  width:34px;
  height:2px;
  background:linear-gradient(90deg,transparent,#62FF93,transparent);
}
.traceo-login-neon-core::after{
  width:2px;
  height:18px;
  background:linear-gradient(180deg,transparent,#DFFFF0,transparent);
}
@media (max-width:540px){
  .traceo-login-logo-zone{
    width:clamp(230px,76vw,295px);
    min-height:170px;
    margin-bottom:16px;
  }
}


/* =====================================================================
   TRACÉO 2.9.60 — O officiel inspiré du logo bleu / vert
   ===================================================================== */
.traceo-brand-official{
  display:inline;
  color:inherit;
  font:inherit;
  letter-spacing:inherit;
}
.traceo-brand-official-o,
.brand-o{
  display:inline-block;
  color:transparent !important;
  background:
    linear-gradient(135deg,
      #0096FF 0%,
      #057CFF 46%,
      #7ED000 54%,
      #35A900 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  font-weight:inherit;
  font-style:inherit;
  line-height:inherit;
  vertical-align:baseline;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.22));
}

/* Petit éclat propre sur le O, sans effet flou */
.traceo-brand-official-o::after,
.brand-o::after{
  content:"";
  position:absolute;
  pointer-events:none;
}

/* Le traitement bleu/vert reste réservé aux O des textes TRACÉO. */
.traceo-brand-official-o,
.brand-o{
  color:transparent !important;
  background:
    linear-gradient(135deg,
      #0096FF 0%,
      #057CFF 46%,
      #7ED000 54%,
      #35A900 100%) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  -webkit-text-fill-color:transparent !important;
}


/* =====================================================================
   TRACÉO 2.9.60 — correction ciblée du logo de connexion uniquement
   ===================================================================== */
.traceo-login-logo-zone{
  width:clamp(170px,24vw,220px) !important;
  min-height:clamp(120px,16vw,155px) !important;
  padding:0 !important;
  margin-bottom:16px !important;
  background:transparent !important;
}
.traceo-login-logo-original{
  width:100% !important;
  max-width:220px !important;
  max-height:155px !important;
  height:auto !important;
  object-fit:contain !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  filter:none !important;
  -webkit-filter:none !important;
  mix-blend-mode:normal !important;
}
.traceo-login-logo-halo,
.traceo-login-neon-line,
.traceo-login-neon-core{
  display:none !important;
}
@media (max-width:540px){
  .traceo-login-logo-zone{
    width:clamp(155px,45vw,190px) !important;
    min-height:115px !important;
    margin-bottom:14px !important;
  }
  .traceo-login-logo-original{
    max-width:190px !important;
    max-height:135px !important;
  }
}

/* =====================================================================
   TRACÉO 2.9.60 — correction affichage titre liste Autocontrôle
   Supprime le flou / franges colorées sans modifier la mise en page.
   ===================================================================== */
.ac-model-list-card > h2{
  text-shadow:none !important;
  filter:none !important;
  -webkit-filter:none !important;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-weight:800 !important;
  letter-spacing:.15px !important;
}


/* =====================================================================
   TRACÉO 2.9.60 — icônes Aide / Guides
   ===================================================================== */
.guide-choice-icon{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  border-radius:50% !important;
  color:#FFFFFF !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
  -webkit-filter:none !important;
}
.guide-choice-jdc .guide-choice-icon,
.guide-choice-icon-jdc{
  background:#169447 !important;
}
.guide-choice-direction .guide-choice-icon,
.guide-choice-icon-direction{
  background:#256FD7 !important;
}
.guide-choice-icon svg{
  display:block !important;
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  stroke:#FFFFFF !important;
  color:#FFFFFF !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
  -webkit-filter:none !important;
}
.guide-import-btn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
}
.guide-import-btn svg,
#newUserOpenGuide svg{
  display:block !important;
  flex:0 0 auto !important;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
  -webkit-filter:none !important;
}


/* TRACÉO 2.9.60 — série rapide 30 feuilles optionnelles */
.ac-series-counter{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin:10px 0 8px;
}
.ac-series-counter>div{
  border:1px solid var(--c-border);
  border-radius:11px;
  padding:10px 12px;
  background:var(--c-soft);
}
.ac-series-counter b{
  display:block;
  font-size:21px;
  line-height:1;
  color:var(--c-primary);
}
.ac-series-counter span{
  display:block;
  margin-top:4px;
  font-size:10.5px;
  font-weight:750;
  color:var(--c-muted);
}
.ac-series-progress{
  height:7px;
  border-radius:999px;
  overflow:hidden;
  background:#E2E7EA;
  margin:0 0 10px;
}
.ac-series-progress span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:#43A047;
}
.ac-series-finish-btn{
  background:#1C2027 !important;
}
@media(max-width:520px){
  .ac-series-counter{grid-template-columns:1fr 1fr;gap:7px}
  .ac-series-counter b{font-size:18px}
}


/* =====================================================================
   TRACÉO 2.9.60 — en-tête liste Autocontrôle harmonisé avec le hub
   ===================================================================== */
.ac-model-list-card{
  overflow:hidden !important;
}
.ac-model-list-card > h2{
  display:none !important;
}
.ac-list-hero{
  min-height:82px;
  margin:-16px -16px 14px !important;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  background:#1C2027;
  border-bottom:1px solid #343B43;
  color:#FFFFFF;
}
.ac-list-hero-icon{
  width:48px;
  height:48px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 48px;
  background:#43B657;
  color:#FFFFFF;
  box-shadow:none;
}
.ac-list-hero-icon svg{
  width:23px !important;
  height:23px !important;
  display:block !important;
  stroke:#FFFFFF !important;
  filter:none !important;
  -webkit-filter:none !important;
}
.ac-list-hero-text{
  min-width:0;
  text-align:left;
}
.ac-list-hero-text h2{
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#FFFFFF !important;
  font-size:22px !important;
  line-height:1.08 !important;
  font-weight:850 !important;
  letter-spacing:-.015em !important;
  text-transform:none !important;
  text-shadow:none !important;
  filter:none !important;
  -webkit-filter:none !important;
}
.ac-list-hero-text h2::before,
.ac-list-hero-text h2::after{
  display:none !important;
  content:none !important;
}
.ac-list-hero-text p{
  margin:3px 0 0;
  color:#D1D6DB !important;
  font-size:11px;
  line-height:1.2;
  font-weight:500;
}
@media(max-width:599px){
  .ac-list-hero{
    min-height:72px;
    margin:-11px -11px 12px !important;
    padding:12px 14px;
  }
  .ac-list-hero-icon{
    width:42px;
    height:42px;
    flex-basis:42px;
  }
  .ac-list-hero-icon svg{
    width:21px !important;
    height:21px !important;
  }
  .ac-list-hero-text h2{
    font-size:19px !important;
  }
  .ac-list-hero-text p{
    font-size:10px;
  }
}


/* =====================================================================
   TRACÉO 2.9.70 — BANDEAU AUTOCONTRÔLE : RÈGLE UNIQUE
   Le thème sombre historique inverse tout <html>. Le bandeau est donc
   contre-inversé une seule fois en sombre pour garder exactement le
   même rendu qu'en clair.
   ===================================================================== */
.ac-model-list-card{
  overflow:hidden !important;
}
.ac-model-list-card > h2{
  display:none !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero{
  min-height:82px !important;
  margin:-16px -16px 14px !important;
  padding:14px 18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:11px !important;
  background:#1C2027 !important;
  background-image:none !important;
  border-bottom:1px solid #343B43 !important;
  color:#FFFFFF !important;
  box-shadow:none !important;
  opacity:1 !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-icon{
  width:48px !important;
  height:48px !important;
  flex:0 0 48px !important;
  border-radius:50% !important;
  display:grid !important;
  place-items:center !important;
  background:#43B657 !important;
  color:#FFFFFF !important;
  border:0 !important;
  box-shadow:none !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-icon svg{
  width:23px !important;
  height:23px !important;
  display:block !important;
  stroke:#FFFFFF !important;
  color:#FFFFFF !important;
  fill:none !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-text{
  min-width:0 !important;
  text-align:left !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-text h2{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF !important;
  font-size:22px !important;
  line-height:1.08 !important;
  font-weight:850 !important;
  letter-spacing:-.015em !important;
  text-transform:none !important;
  text-shadow:none !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-text h2::before,
.ac-model-list-card.ac-home-style .ac-list-hero-text h2::after{
  display:none !important;
  content:none !important;
}
.ac-model-list-card.ac-home-style .ac-list-hero-text p{
  margin:3px 0 0 !important;
  color:#D1D6DB !important;
  -webkit-text-fill-color:#D1D6DB !important;
  font-size:11px !important;
  line-height:1.2 !important;
  font-weight:500 !important;
}

@media(max-width:599px){
  .ac-model-list-card.ac-home-style .ac-list-hero{
    min-height:72px !important;
    margin:-11px -11px 12px !important;
    padding:12px 14px !important;
  }
  .ac-model-list-card.ac-home-style .ac-list-hero-icon{
    width:42px !important;
    height:42px !important;
    flex-basis:42px !important;
  }
  .ac-model-list-card.ac-home-style .ac-list-hero-icon svg{
    width:21px !important;
    height:21px !important;
  }
  .ac-model-list-card.ac-home-style .ac-list-hero-text h2{
    font-size:19px !important;
  }
  .ac-model-list-card.ac-home-style .ac-list-hero-text p{
    font-size:10px !important;
  }
}

/* =====================================================================
   TRACÉO 2.9.80 — STATISTIQUES
   ===================================================================== */
.stats-page{display:grid;gap:14px;}
.stats-page-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:18px 20px;border:1px solid var(--c-border);border-radius:16px;
  background:var(--c-surface);box-shadow:var(--shadow);
}
.stats-page-title{display:flex;align-items:center;gap:12px;min-width:0;}
.stats-title-icon{
  width:46px;height:46px;flex:0 0 46px;border-radius:14px;
  display:grid;place-items:center;background:#EAF8EE;color:#159447;border:1px solid #BDE5C6;
}
.stats-page-title h2{margin:0!important;font-size:21px!important;text-transform:none!important;letter-spacing:0!important;color:var(--c-text)!important;}
.stats-page-title h2::before{display:none!important;}
.stats-page-title p{margin:3px 0 0;font-size:12px;color:var(--c-muted);}
.stats-refresh-btn{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;white-space:nowrap;}
.stats-periods{display:flex;gap:7px;flex-wrap:wrap;}
.stats-period-btn{
  border:1px solid var(--c-border);background:var(--c-surface);color:var(--c-text);
  padding:8px 14px;border-radius:999px;font-size:12px;font-weight:800;min-width:64px;
}
.stats-period-btn.active{background:var(--c-accent)!important;border-color:var(--c-accent)!important;color:#fff!important;}
.stats-state-card{
  min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:9px;text-align:center;border:1px solid var(--c-border);border-radius:16px;padding:24px;background:var(--c-surface);
}
.stats-state-card.error{border-color:#F1B5B5;background:#FFF6F6;color:#9B2C2C;}
.stats-state-card .btn-primary{margin-top:6px;}
.stats-loader{width:26px;height:26px;border:3px solid var(--c-border);border-top-color:var(--c-accent);border-radius:50%;animation:spin .8s linear infinite;}
.stats-live-banner{
  display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:15px;
  background:#F1FFF4;border:1px solid #B8E8C3;
}
.stats-live-dot{width:11px;height:11px;border-radius:50%;background:#20B958;box-shadow:0 0 0 5px rgba(32,185,88,.13);flex:0 0 11px;}
.stats-live-main{display:flex;flex-direction:column;gap:2px;min-width:0;}
.stats-live-main b{font-size:16px;color:#137B37;}
.stats-live-main span{font-size:11px;color:#3A7C4D;}
.stats-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.stats-kpi{
  position:relative;overflow:hidden;min-width:0;padding:16px;border:1px solid var(--c-border);
  border-radius:15px;background:var(--c-surface);box-shadow:0 4px 14px rgba(16,20,24,.05);
}
.stats-kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#64748B;}
.stats-kpi.green::before{background:#20B958}.stats-kpi.blue::before{background:#3B82F6}.stats-kpi.teal::before{background:#0FA7A0}.stats-kpi.slate::before{background:#64748B}
.stats-kpi-label{display:block;font-size:11px;font-weight:800;color:var(--c-muted);text-transform:uppercase;letter-spacing:.45px;}
.stats-kpi strong{display:block;margin-top:8px;font-size:30px;line-height:1;color:var(--c-text);}
.stats-kpi small{display:block;margin-top:7px;color:var(--c-muted);font-size:11px;}
.stats-highlight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.stats-highlight{
  padding:14px 16px;border:1px solid var(--c-border);border-radius:14px;background:var(--c-surface);
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:center;
}
.stats-highlight>span{font-size:11px;font-weight:800;color:var(--c-muted);text-transform:uppercase;}
.stats-highlight>b{font-size:16px;color:var(--c-text);grid-row:1/span 2;grid-column:2;align-self:center;}
.stats-highlight>small{font-size:11px;color:var(--c-muted);}
.stats-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.stats-panel{padding:17px;border:1px solid var(--c-border);border-radius:16px;background:var(--c-surface);box-shadow:var(--shadow);min-width:0;}
.stats-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px;}
.stats-panel-head h3{margin:0;color:var(--c-text);font-size:15px;}
.stats-panel-head p{margin:3px 0 0;color:var(--c-muted);font-size:11px;line-height:1.35;}
.stats-chart-wrap{overflow-x:auto;min-height:145px;}
.stats-doc-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px;}
.stats-doc-summary>div{padding:9px 11px;border-radius:10px;background:var(--c-bg);border:1px solid var(--c-border);display:flex;justify-content:space-between;gap:8px;}
.stats-doc-summary span{font-size:11px;color:var(--c-muted)}.stats-doc-summary b{color:var(--c-text)}
.stats-daily-head,.stats-daily-row{display:grid;grid-template-columns:minmax(120px,1.5fr) repeat(3,minmax(90px,1fr));gap:8px;align-items:center;}
.stats-daily-head{padding:0 10px 8px;color:var(--c-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;}
.stats-daily-list{display:grid;gap:6px;}
.stats-daily-row{padding:10px;border:1px solid var(--c-border);border-radius:11px;background:var(--c-bg);}
.stats-daily-row.empty{opacity:.58;}
.stats-daily-date{font-weight:800;color:var(--c-text);font-size:12px;}
.stats-daily-row>div:not(.stats-daily-date){display:flex;align-items:baseline;gap:5px;}
.stats-daily-row b{font-size:14px;color:var(--c-text)}.stats-daily-row span{font-size:10px;color:var(--c-muted)}
.stats-info-note{display:flex;align-items:flex-start;gap:8px;padding:11px 13px;border-radius:12px;background:#F5F8FA;border:1px solid var(--c-border);font-size:11px;color:var(--c-muted);}
.stats-info-note svg{flex:0 0 auto;margin-top:1px;}.stats-live-main span{}

@media(max-width:850px){
  .stats-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .stats-chart-grid{grid-template-columns:1fr;}
}
@media(max-width:560px){
  .stats-page-head{align-items:flex-start;padding:14px;}
  .stats-page-title{align-items:flex-start}.stats-title-icon{width:40px;height:40px;flex-basis:40px;}
  .stats-page-title h2{font-size:18px!important}.stats-page-title p{font-size:10.5px;}
  .stats-refresh-btn{padding:8px!important;font-size:0!important}.stats-refresh-btn svg{width:17px;height:17px;}
  .stats-kpi-grid{grid-template-columns:1fr 1fr;gap:7px}.stats-kpi{padding:13px}.stats-kpi strong{font-size:25px;}
  .stats-highlight-grid{grid-template-columns:1fr;}
  .stats-daily-head{display:none;}
  .stats-daily-row{grid-template-columns:1fr 1fr;gap:7px;}
  .stats-daily-date{grid-column:1/-1;border-bottom:1px solid var(--c-border);padding-bottom:6px;}
  .stats-daily-row>div:not(.stats-daily-date){justify-content:space-between;}
}


/* =====================================================================
   TRACÉO 2.9.80 — VRAI MODE SOMBRE
   Une seule source de vérité. Aucune inversion globale.
   Palette :
   fond principal  #0D1318
   fond application #10171D
   carte           #171F26
   carte secondaire #121A20
   bordure         #35434E
   texte           #F3F6F8
   texte secondaire #AAB7C2
   vert TRACÉO      #4CAF50
   ===================================================================== */

html[data-theme="dark"]{
  color-scheme:dark;
  --c-primary:#161D23;
  --c-primary-2:#202A32;
  --c-accent:#4CAF50;
  --c-accent-dark:#3F9447;
  --c-bg:#0D1318;
  --c-surface:#171F26;
  --c-text:#F3F6F8;
  --c-muted:#AAB7C2;
  --c-border:#35434E;
  --c-danger:#F06A70;
  --c-warn:#E6AC4B;
  --shadow:0 1px 2px rgba(0,0,0,.34),0 5px 16px rgba(0,0,0,.20);
  background:#0D1318 !important;
  color:#F3F6F8 !important;
  filter:none !important;
}

html[data-theme="dark"] body{
  background:#0D1318 !important;
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .app-shell{
  background:#10171D !important;
  color:#F3F6F8 !important;
  border-color:#2E3A43 !important;
}
@media(min-width:900px){
  html[data-theme="dark"] body{
    background:linear-gradient(180deg,#090E12 0%,#0D1318 100%) !important;
  }
  html[data-theme="dark"] .app-shell{
    box-shadow:0 10px 36px rgba(0,0,0,.42) !important;
  }
}

/* ----- Barre haute / navigation ----- */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] #redacteurBar{
  background:#151C22 !important;
  color:#FFFFFF !important;
  border-color:#2D3942 !important;
  filter:none !important;
}
html[data-theme="dark"] .topbar *,
html[data-theme="dark"] #redacteurBar *{
  color:inherit;
}
html[data-theme="dark"] .bottomnav{
  background:#11181E !important;
  border-color:#2F3B44 !important;
  box-shadow:0 -5px 18px rgba(0,0,0,.28) !important;
}
html[data-theme="dark"] .bottomnav button,
html[data-theme="dark"] .navbtn{
  color:#9FACB7 !important;
  background:transparent !important;
}
html[data-theme="dark"] .bottomnav button.active,
html[data-theme="dark"] .navbtn.active{
  color:#FFFFFF !important;
}
html[data-theme="dark"] .bottomnav button.active svg,
html[data-theme="dark"] .navbtn.active svg{
  color:#6FD37B !important;
  stroke:currentColor !important;
}

/* ----- Texte ----- */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] strong,
html[data-theme="dark"] b{
  color:#F3F6F8;
  text-shadow:none !important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] .section-note,
html[data-theme="dark"] .muted,
html[data-theme="dark"] small{
  color:#AAB7C2;
}
html[data-theme="dark"] a{color:#82B6FF;}

/* ----- Cartes / blocs ----- */
html[data-theme="dark"] .card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .home-metric,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .fiche-item,
html[data-theme="dark"] .ac-section-card,
html[data-theme="dark"] .ac-point-card,
html[data-theme="dark"] .ac-review-item,
html[data-theme="dark"] .ac-recent-card,
html[data-theme="dark"] .my-pdf-month-folder,
html[data-theme="dark"] [class*="panel"],
html[data-theme="dark"] [class*="summary-card"]{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
  box-shadow:var(--shadow) !important;
}
html[data-theme="dark"] .card h2{
  color:#B9C4CD !important;
}
html[data-theme="dark"] .card h2::before{
  background:#4CAF50 !important;
}

/* ----- Formulaires ----- */
html[data-theme="dark"] label{color:#B3C0C9 !important;}
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=date],
html[data-theme="dark"] input[type=time],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=search],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .csel-display,
html[data-theme="dark"] .native-date-time{
  background:#10171D !important;
  color:#F3F6F8 !important;
  border-color:#466051 !important;
  box-shadow:none !important;
  -webkit-text-fill-color:#F3F6F8 !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#81909C !important;
  -webkit-text-fill-color:#81909C !important;
}
html[data-theme="dark"] option{
  background:#121A20 !important;
  color:#F3F6F8 !important;
}
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled{
  background:#1B242B !important;
  color:#8997A2 !important;
  opacity:1 !important;
}

/* ----- Boutons ----- */
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light{
  background:#202A32 !important;
  color:#F2F5F7 !important;
  border-color:#4A5A65 !important;
}
html[data-theme="dark"] .btn-dark{
  background:#0F151A !important;
  color:#FFFFFF !important;
  border-color:#394650 !important;
}
html[data-theme="dark"] .btn-primary{
  color:#FFFFFF !important;
}
html[data-theme="dark"] .btn-icon{
  color:#C7D1D8;
}
html[data-theme="dark"] button:disabled{opacity:.52;}

/* ----- ACCUEIL ----- */
html[data-theme="dark"] .home-dashboard,
html[data-theme="dark"] .home-today-grid,
html[data-theme="dark"] .home-metrics,
html[data-theme="dark"] .home-actions{
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .home-greeting{color:#F3F6F8 !important;}
html[data-theme="dark"] .home-date{color:#AAB7C2 !important;}
html[data-theme="dark"] .home-today-item,
html[data-theme="dark"] .home-result,
html[data-theme="dark"] .home-report-row,
html[data-theme="dark"] .home-assistant-detail{
  background:#121A20 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .home-search-box,
html[data-theme="dark"] .home-search-results{
  background:#171F26 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .home-chip{
  background:#202B33 !important;
  border-color:#40505B !important;
  color:#C9D2D9 !important;
}
html[data-theme="dark"] .home-action.secondary{
  background:#222C34 !important;
  color:#FFFFFF !important;
  border-color:#4A5964 !important;
}
html[data-theme="dark"] .home-progress{
  background:#29353E !important;
}
html[data-theme="dark"] .home-progress > *{
  background:#4CAF50 !important;
}

/* ----- FICHE / BASE VIE ----- */
html[data-theme="dark"] .fiche-hub-card,
html[data-theme="dark"] .fiche-hub-option{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .fiche-hub-desc{color:#AAB7C2 !important;}
html[data-theme="dark"] .fiche-hub-heading,
html[data-theme="dark"] .fiche-pro-hero{
  background:#1A2128 !important;
  color:#FFFFFF !important;
  border-color:#394650 !important;
  filter:none !important;
}
html[data-theme="dark"] .fiche-hub-heading *,
html[data-theme="dark"] .fiche-pro-hero *{
  color:#FFFFFF !important;
}
html[data-theme="dark"] .fiche-hub-info,
html[data-theme="dark"] .fiche-photo-suggestion{
  background:#132019 !important;
  border-color:#315A3B !important;
  color:#BFE8C8 !important;
}
html[data-theme="dark"] .fiche-pro-state{
  background:#202A32 !important;
  border-color:#46555F !important;
  color:#D3DBE1 !important;
}

/* ----- AUTOCONTRÔLE ----- */
html[data-theme="dark"] .ac-model-list-card,
html[data-theme="dark"] .ac-model-row,
html[data-theme="dark"] .ac-kpi,
html[data-theme="dark"] .ac-review-dialog,
html[data-theme="dark"] .ac-rapid-sheet-card{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .ac-list-hero,
html[data-theme="dark"] .ac-pro-top,
html[data-theme="dark"] .ac-home-style .fiche-hub-heading{
  background:#1A2128 !important;
  color:#FFFFFF !important;
  border-color:#394650 !important;
  filter:none !important;
}
html[data-theme="dark"] .ac-list-hero *,
html[data-theme="dark"] .ac-pro-top *,
html[data-theme="dark"] .ac-home-style .fiche-hub-heading *{
  color:#FFFFFF !important;
}
html[data-theme="dark"] .ac-search{
  background:#10171D !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .ac-answer-row,
html[data-theme="dark"] .ac-corrective,
html[data-theme="dark"] .ac-help-content,
html[data-theme="dark"] .ac-series-counter>div{
  background:#121A20 !important;
  border-color:#35434E !important;
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .ac-progress,
html[data-theme="dark"] .ac-series-progress{
  background:#29353E !important;
}
html[data-theme="dark"] .ac-progress > *,
html[data-theme="dark"] .ac-series-progress span{
  background:#4CAF50 !important;
}

/* ----- HISTORIQUE / LISTES ----- */
html[data-theme="dark"] .fiche-item,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] [class*="history-"]{
  color:#F3F6F8;
}
html[data-theme="dark"] .fiche-item{
  background:#171F26 !important;
}
html[data-theme="dark"] .fiche-item .meta,
html[data-theme="dark"] .fiche-item small{
  color:#AAB7C2 !important;
}
html[data-theme="dark"] .subtabs{
  background:#10171D !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .subtabs button{
  color:#B5C0C9 !important;
}
html[data-theme="dark"] .subtabs button.active{
  background:#27323A !important;
  color:#FFFFFF !important;
}

/* ----- HEURES ----- */
html[data-theme="dark"] .heures-synthese-grid,
html[data-theme="dark"] .hours-dashboard{
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .heures-synthese-grid > *,
html[data-theme="dark"] .hours-card,
html[data-theme="dark"] .hours-summary,
html[data-theme="dark"] .hours-person-card,
html[data-theme="dark"] .hours-info-panel,
html[data-theme="dark"] [class*="heures-"] .stat-box{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .hbar-track{
  background:#29353E !important;
}
html[data-theme="dark"] .hbar-fill{
  background:#4CAF50 !important;
}
html[data-theme="dark"] .hours-person-card small,
html[data-theme="dark"] .hours-info-panel p{
  color:#AAB7C2 !important;
}

/* ----- ADMINISTRATION ----- */
html[data-theme="dark"] .admin-hub-grid > *,
html[data-theme="dark"] .admin-hub-card,
html[data-theme="dark"] [data-adminsub]{
  color:#F3F6F8;
}
html[data-theme="dark"] .admin-hub-grid > .card,
html[data-theme="dark"] .admin-hub-card{
  background:#171F26 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .admin-hub-grid strong,
html[data-theme="dark"] .admin-hub-grid b,
html[data-theme="dark"] .admin-hub-grid h3,
html[data-theme="dark"] .admin-hub-grid h4{
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .admin-hub-grid small,
html[data-theme="dark"] .admin-hub-grid p{
  color:#AAB7C2 !important;
}
html[data-theme="dark"] .admin-backbar{
  background:#151C22 !important;
  color:#FFFFFF !important;
  border-color:#35434E !important;
}

/* ----- STATISTIQUES ----- */
html[data-theme="dark"] .stats-page-head,
html[data-theme="dark"] .stats-kpi,
html[data-theme="dark"] .stats-highlight,
html[data-theme="dark"] .stats-panel,
html[data-theme="dark"] .stats-state-card{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .stats-title-icon{
  background:#15331E !important;
  border-color:#2E6740 !important;
  color:#74DA8A !important;
}
html[data-theme="dark"] .stats-live-banner{
  background:#132219 !important;
  border-color:#2D5A39 !important;
}
html[data-theme="dark"] .stats-live-main b{color:#82DF96 !important;}
html[data-theme="dark"] .stats-live-main span{color:#A8CDB1 !important;}
html[data-theme="dark"] .stats-period-btn{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#465661 !important;
}
html[data-theme="dark"] .stats-period-btn.active{
  background:#4CAF50 !important;
  border-color:#4CAF50 !important;
  color:#FFFFFF !important;
}
html[data-theme="dark"] .stats-doc-summary>div,
html[data-theme="dark"] .stats-daily-row{
  background:#10171D !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .stats-info-note{
  background:#121A20 !important;
  border-color:#35434E !important;
  color:#AAB7C2 !important;
}
html[data-theme="dark"] .stats-state-card.error{
  background:#2A181B !important;
  border-color:#713A3F !important;
  color:#FFB9BE !important;
}

/* ----- AIDE / GUIDES ----- */
html[data-theme="dark"] .guide-choice-card{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] .guide-choice-text strong,
html[data-theme="dark"] .guide-choice-text b{
  color:#F3F6F8 !important;
}
html[data-theme="dark"] .guide-choice-text p,
html[data-theme="dark"] .guide-choice-text small{
  color:#AAB7C2 !important;
}
html[data-theme="dark"] .guide-choice-arrow{color:#AAB7C2 !important;}

/* ----- TABLEAUX ----- */
html[data-theme="dark"] table{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}
html[data-theme="dark"] th{
  background:#202A32 !important;
  color:#E8EDF0 !important;
  border-color:#3A4852 !important;
}
html[data-theme="dark"] td{
  background:#151D23 !important;
  color:#E4E9EC !important;
  border-color:#34414B !important;
}
html[data-theme="dark"] tr:nth-child(even) td{
  background:#121A20 !important;
}

/* ----- MODALES / POPUPS / OVERLAYS ----- */
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] .popup-card,
html[data-theme="dark"] [role="dialog"],
html[data-theme="dark"] .ac-review-dialog,
html[data-theme="dark"] .chantier-name-dialog{
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#40505B !important;
}
html[data-theme="dark"] .overlay{
  background:rgba(0,0,0,.66) !important;
}

/* ----- Toasts / messages : garder les couleurs d'état ----- */
html[data-theme="dark"] #toast,
html[data-theme="dark"] .toast,
html[data-theme="dark"] #updateBanner,
html[data-theme="dark"] #syncBanner{
  filter:none !important;
}

/* ----- Logos / images / signature ----- */
html[data-theme="dark"] img,
html[data-theme="dark"] svg,
html[data-theme="dark"] canvas,
html[data-theme="dark"] #signatureCanvasEl,
html[data-theme="dark"] .logo-preview img{
  filter:none !important;
  -webkit-filter:none !important;
}
html[data-theme="dark"] svg{
  color:inherit;
  text-shadow:none !important;
}
html[data-theme="dark"] .traceo-login-logo-original{
  filter:none !important;
  -webkit-filter:none !important;
}
html[data-theme="dark"] .traceo-login-logo-halo{
  background:radial-gradient(circle,rgba(0,255,92,.20) 0%,rgba(0,225,80,.08) 38%,transparent 74%) !important;
  filter:blur(16px) !important;
}
html[data-theme="dark"] .traceo-login-neon-core{
  box-shadow:0 0 4px #fff,0 0 8px #7DFFAA,0 0 16px rgba(0,255,95,.82),0 0 28px rgba(0,230,85,.52) !important;
}

/* ----- Logo O officiel ----- */
html[data-theme="dark"] .traceo-brand-official-o,
html[data-theme="dark"] .brand-o{
  background:linear-gradient(135deg,#20A8FF 0%,#1487FF 46%,#9BE117 54%,#41BF16 100%) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  -webkit-text-fill-color:transparent !important;
  filter:none !important;
}

/* ----- Focus / accessibilité ----- */
html[data-theme="dark"] :focus-visible{
  outline:2px solid #62C96E !important;
  outline-offset:2px !important;
}
html[data-theme="dark"] ::selection{
  background:#2F7D42;
  color:#FFFFFF;
}


/* ----- Rattrapage des anciens styles inline clairs ----- */
html[data-theme="dark"] [style*="background:#fff"]:not(canvas):not(#updateBanner button),
html[data-theme="dark"] [style*="background: #fff"]:not(canvas):not(#updateBanner button),
html[data-theme="dark"] [style*="background:#FFF"]:not(canvas):not(#updateBanner button),
html[data-theme="dark"] [style*="background:#f4f5f6"]:not(canvas),
html[data-theme="dark"] [style*="background:#F4F5F6"]:not(canvas),
html[data-theme="dark"] [style*="background:#f8faf9"]:not(canvas),
html[data-theme="dark"] [style*="background:#f7f8f8"]:not(canvas),
html[data-theme="dark"] [style*="background:#F0F7F1"]:not(canvas),
html[data-theme="dark"] [style*="background:#f0f7f1"]:not(canvas),
html[data-theme="dark"] [style*="background:#f1fbf3"]:not(canvas),
html[data-theme="dark"] [style*="background:#F5F8F6"]:not(canvas),
html[data-theme="dark"] [style*="background:#f8fafc"]:not(canvas),
html[data-theme="dark"] [style*="background:#F8FAFC"]:not(canvas){
  background:#171F26 !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
}

/* Textes sombres codés en dur dans d'anciens dialogues */
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color: #111827"],
html[data-theme="dark"] [style*="color:#1C2027"],
html[data-theme="dark"] [style*="color:#0F172A"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color:#374151"]{
  color:#F3F6F8 !important;
  -webkit-text-fill-color:#F3F6F8 !important;
}

/* Le pavé de signature reste volontairement blanc pour conserver un contraste naturel. */
html[data-theme="dark"] #signatureCanvasEl,
html[data-theme="dark"] #acSignatureCanvasEl{
  background:#FFFFFF !important;
  border-color:#66737C !important;
  filter:none !important;
}

/* Le bouton blanc du bandeau de mise à jour reste volontairement blanc. */
html[data-theme="dark"] #updateBanner button{
  background:#FFFFFF !important;
  color:#167A3A !important;
  -webkit-text-fill-color:#167A3A !important;
}

/* Champs natifs date/heure : icône lisible sans inversion. */
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"]{
  color-scheme:dark;
}

/* Séparateurs, règles et bordures discrètes */
html[data-theme="dark"] hr{
  border-color:#35434E !important;
}
html[data-theme="dark"] fieldset{
  border-color:#35434E !important;
}


/* =====================================================================
   TRACÉO 2.9.80 — CORRECTIONS ISSUES DE LA SIMULATION LOCALE
   Tests effectués en 390 px, 820 px et 1280 px.
   ===================================================================== */
html[data-theme="dark"] .fiche-home-style,
html[data-theme="dark"] .ac-home-style{
  background:#10171D !important;
  color:#F3F6F8 !important;
  border-color:#35434E !important;
  box-shadow:none !important;
}

html[data-theme="dark"] .home-metric-value{
  color:#F3F6F8 !important;
  -webkit-text-fill-color:#F3F6F8 !important;
}

html[data-theme="dark"] .home-metric-sub,
html[data-theme="dark"] .home-metric-foot,
html[data-theme="dark"] .home-today-item .home-metric-sub,
html[data-theme="dark"] .stat-box small,
html[data-theme="dark"] .stats-kpi small{
  color:#AAB7C2 !important;
  -webkit-text-fill-color:#AAB7C2 !important;
}


/* TRACÉO 2.9.80 — contraste final icône Autocontrôle */
html[data-theme="dark"] .ac-list-hero-icon{
  background:#2E7D32 !important;
  color:#FFFFFF !important;
}

/* =====================================================================
   TRACÉO 2.9.83 — MODE SOMBRE HARMONISÉ
   Finitions communes téléphone, tablette et ordinateur.
   ===================================================================== */
html[data-theme="dark"]{
  --c-primary:#171D24;
  --c-primary-2:#222B35;
  --c-accent:#4CAF50;
  --c-accent-dark:#72D47C;
  --c-bg:#10151B;
  --c-surface:#1B232C;
  --c-text:#F4F7F9;
  --c-muted:#AEB9C3;
  --c-border:#35424E;
  --c-soft:#202A33;
  --c-danger:#FF747B;
  --c-warn:#F0B85A;
  --dark-bg:#10151B;
  --dark-shell:#141B22;
  --dark-card:#1B232C;
  --dark-card-raised:#202A34;
  --dark-field:#141B22;
  --dark-border:#35424E;
  --dark-border-soft:#2A3540;
  --dark-text:#F4F7F9;
  --dark-muted:#AEB9C3;
  --dark-green-soft:#183221;
  --dark-green-border:#356B41;
  --shadow:0 1px 2px rgba(0,0,0,.28),0 8px 24px rgba(0,0,0,.16);
  background:var(--dark-bg) !important;
  color:var(--dark-text) !important;
}

html[data-theme="dark"] body{
  background:var(--dark-bg) !important;
  color:var(--dark-text) !important;
}
html[data-theme="dark"] .app-shell{
  background:var(--dark-shell) !important;
  color:var(--dark-text) !important;
  border-color:var(--dark-border-soft) !important;
}
@media(min-width:900px){
  html[data-theme="dark"] body{
    background:linear-gradient(180deg,#0B1015 0%,#111820 100%) !important;
  }
  html[data-theme="dark"] .app-shell{
    box-shadow:0 12px 42px rgba(0,0,0,.36) !important;
  }
}

/* En-tête et navigation : lisibles sans devenir noirs. */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] #redacteurBar{
  background:#171E26 !important;
  border-color:#34414C !important;
}
html[data-theme="dark"] .topbar .ticket-tab,
html[data-theme="dark"] #darkModeToggle,
html[data-theme="dark"] .header-logout-btn{
  background:#242E38 !important;
  border-color:#465563 !important;
  color:#F7FAFB !important;
  box-shadow:none !important;
}
html[data-theme="dark"] #darkModeToggle:hover,
html[data-theme="dark"] .header-logout-btn:hover{
  background:#2C3843 !important;
}
html[data-theme="dark"] .bottomnav{
  background:rgba(20,27,34,.98) !important;
  border-color:#34414C !important;
  box-shadow:0 -7px 22px rgba(0,0,0,.24) !important;
}
html[data-theme="dark"] .bottomnav button,
html[data-theme="dark"] .navbtn{
  color:#AAB6C0 !important;
}
html[data-theme="dark"] .bottomnav button.active,
html[data-theme="dark"] .navbtn.active{
  color:#F6F9FA !important;
  background:rgba(76,175,80,.08) !important;
}
html[data-theme="dark"] .bottomnav button svg > rect:first-child,
html[data-theme="dark"] .navbtn svg > rect:first-child{
  fill:#202A34 !important;
  stroke:#43515D !important;
}
html[data-theme="dark"] .bottomnav button.active svg > rect:first-child,
html[data-theme="dark"] .navbtn.active svg > rect:first-child{
  fill:#183622 !important;
  stroke:#4CAF50 !important;
}

/* Surfaces : trois niveaux maximum pour garder un rendu calme. */
html[data-theme="dark"] .card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .home-metric,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .fiche-item,
html[data-theme="dark"] .ac-section-card,
html[data-theme="dark"] .ac-point-card,
html[data-theme="dark"] .ac-review-item,
html[data-theme="dark"] .ac-recent-card,
html[data-theme="dark"] .my-pdf-month-folder,
html[data-theme="dark"] .stats-page-head,
html[data-theme="dark"] .stats-kpi,
html[data-theme="dark"] .stats-highlight,
html[data-theme="dark"] .stats-panel,
html[data-theme="dark"] .stats-state-card,
html[data-theme="dark"] .guide-choice-card,
html[data-theme="dark"] .admin-hub-card{
  background:var(--dark-card) !important;
  color:var(--dark-text) !important;
  border-color:var(--dark-border) !important;
  box-shadow:var(--shadow) !important;
}
html[data-theme="dark"] .home-today-item,
html[data-theme="dark"] .home-result,
html[data-theme="dark"] .home-report-row,
html[data-theme="dark"] .home-assistant-detail,
html[data-theme="dark"] .ac-answer-row,
html[data-theme="dark"] .ac-help-content,
html[data-theme="dark"] .ac-series-counter>div,
html[data-theme="dark"] .stats-doc-summary>div,
html[data-theme="dark"] .stats-daily-row,
html[data-theme="dark"] .status-track,
html[data-theme="dark"] .subrow{
  background:var(--dark-shell) !important;
  color:var(--dark-text) !important;
  border-color:var(--dark-border-soft) !important;
}
html[data-theme="dark"] .home-card-head,
html[data-theme="dark"] .home-report-row,
html[data-theme="dark"] .home-today-item + .home-today-item,
html[data-theme="dark"] .ac-section-card>h2{
  border-color:var(--dark-border-soft) !important;
}

/* Textes : blancs adoucis et secondaires suffisamment contrastés. */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] .home-greeting,
html[data-theme="dark"] .home-metric-value{
  color:var(--dark-text) !important;
  -webkit-text-fill-color:var(--dark-text) !important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] label,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .section-note,
html[data-theme="dark"] .home-date,
html[data-theme="dark"] .home-metric-sub,
html[data-theme="dark"] .home-metric-foot,
html[data-theme="dark"] .fiche-hub-desc,
html[data-theme="dark"] .status-label{
  color:var(--dark-muted) !important;
  -webkit-text-fill-color:var(--dark-muted) !important;
}
html[data-theme="dark"] .home-date,
html[data-theme="dark"] .home-result-type,
html[data-theme="dark"] .home-progress-pct,
html[data-theme="dark"] .ac-pro-percent{
  color:#77D982 !important;
  -webkit-text-fill-color:#77D982 !important;
}

/* Champs : contour neutre, contour vert uniquement au focus. */
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=date],
html[data-theme="dark"] input[type=time],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=search],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .csel-display,
html[data-theme="dark"] .native-date-time{
  background:var(--dark-field) !important;
  color:var(--dark-text) !important;
  -webkit-text-fill-color:var(--dark-text) !important;
  border-color:#43515D !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.015) !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .csel-display:focus-within{
  border-color:#63C86E !important;
  box-shadow:0 0 0 3px rgba(76,175,80,.16) !important;
  outline:none !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#82909B !important;
  -webkit-text-fill-color:#82909B !important;
  opacity:1;
}
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled{
  background:#202932 !important;
  color:#8F9CA7 !important;
  -webkit-text-fill-color:#8F9CA7 !important;
}

/* Boutons et onglets. */
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .icon-row-btn,
html[data-theme="dark"] .stats-period-btn{
  background:var(--dark-card-raised) !important;
  color:#F1F5F7 !important;
  -webkit-text-fill-color:#F1F5F7 !important;
  border-color:#495966 !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .icon-row-btn:hover{
  background:#293540 !important;
  border-color:#627381 !important;
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .home-action.primary,
html[data-theme="dark"] .stats-period-btn.active{
  background:#43A84B !important;
  border-color:#43A84B !important;
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF !important;
}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .home-action.primary:hover{
  background:#4DB956 !important;
  border-color:#4DB956 !important;
}
html[data-theme="dark"] .home-action.secondary{
  background:#252F39 !important;
  border-color:#485763 !important;
  color:#F5F8FA !important;
}
html[data-theme="dark"] .subtabs{
  background:#11181F !important;
  border-color:var(--dark-border) !important;
}
html[data-theme="dark"] .subtabs button.active{
  background:#25312A !important;
  color:#83DF8D !important;
  box-shadow:inset 0 -2px 0 #4CAF50 !important;
}

/* Accueil et états colorés : couleurs discrètes, jamais de pavés blancs. */
html[data-theme="dark"] .home-assistant-head{
  background:#2C271D !important;
  border-color:#62502D !important;
}
html[data-theme="dark"] .home-assistant.ok .home-assistant-head,
html[data-theme="dark"] .home-assistant.ok .home-chip,
html[data-theme="dark"] .fiche-hub-info,
html[data-theme="dark"] .fiche-photo-suggestion,
html[data-theme="dark"] .stats-live-banner{
  background:var(--dark-green-soft) !important;
  border-color:var(--dark-green-border) !important;
  color:#C9F0D0 !important;
}
html[data-theme="dark"] .home-chip{
  background:#30291D !important;
  border-color:#675635 !important;
  color:#E8D6B4 !important;
}
html[data-theme="dark"] .home-progress,
html[data-theme="dark"] .ac-progress,
html[data-theme="dark"] .ac-series-progress,
html[data-theme="dark"] .hbar-track{
  background:#2B3741 !important;
}

/* Hubs Fiche et Autocontrôle : tuiles foncées, icônes colorées conservées. */
html[data-theme="dark"] .fiche-home-style,
html[data-theme="dark"] .ac-home-style,
html[data-theme="dark"] .fiche-home-style .fiche-hub-option,
html[data-theme="dark"] .ac-home-style .fiche-hub-option,
html[data-theme="dark"] .ac-model-row,
html[data-theme="dark"] .ac-model-list-card,
html[data-theme="dark"] .ac-kpi,
html[data-theme="dark"] .ac-rapid-sheet-card{
  background:var(--dark-card) !important;
  color:var(--dark-text) !important;
  border-color:var(--dark-border) !important;
}
html[data-theme="dark"] .fiche-home-style .fiche-hub-option:hover,
html[data-theme="dark"] .ac-home-style .fiche-hub-option:hover{
  background:#202B34 !important;
  border-color:#5C7161 !important;
}
html[data-theme="dark"] .fiche-hub-heading,
html[data-theme="dark"] .fiche-pro-hero,
html[data-theme="dark"] .ac-list-hero,
html[data-theme="dark"] .ac-pro-top,
html[data-theme="dark"] .ac-home-style .fiche-hub-heading{
  background:linear-gradient(135deg,#1A222A 0%,#222D37 100%) !important;
  border-color:#3A4955 !important;
  color:#FFFFFF !important;
}
html[data-theme="dark"] .fiche-home-style .fiche-hub-icon,
html[data-theme="dark"] .ac-home-style .fiche-hub-icon{
  box-shadow:none !important;
}
html[data-theme="dark"] .ac-pro-summary>div{
  background:#26313B !important;
  border-color:#43515D !important;
}
html[data-theme="dark"] .ac-point-card[data-status="oui"]{
  background:#17291C !important;
  border-color:#3C7047 !important;
}
html[data-theme="dark"] .ac-point-card[data-status="non"],
html[data-theme="dark"] .ac-review-item.bad,
html[data-theme="dark"] .ac-corrective,
html[data-theme="dark"] .ac-nc-summary{
  background:#301D21 !important;
  border-color:#784149 !important;
  color:#FFD2D5 !important;
}
html[data-theme="dark"] .ac-point-card[data-status="na"]{
  background:#202831 !important;
  border-color:#53616D !important;
}
html[data-theme="dark"] .ac-sticky-actions{
  background:rgba(27,35,44,.96) !important;
  border-color:#3E4C58 !important;
  border-top-color:#4CAF50 !important;
  box-shadow:0 -8px 24px rgba(0,0,0,.22) !important;
}
html[data-theme="dark"] .ac-model-row .chip{
  background:#193522 !important;
  border-color:#3F744A !important;
  color:#92E29C !important;
}
html[data-theme="dark"] .ac-help,
html[data-theme="dark"] .ac-note-toggle,
html[data-theme="dark"] .ac-custom-create,
html[data-theme="dark"] .fiche-pro .empty-note{
  background:#182129 !important;
  border-color:#46545F !important;
  color:var(--dark-muted) !important;
}
html[data-theme="dark"] .fiche-pro .card>h2{
  color:var(--dark-text) !important;
  -webkit-text-fill-color:var(--dark-text) !important;
  border-color:var(--dark-border-soft) !important;
}
html[data-theme="dark"] .fiche-pro .field label{
  color:#B9C3CB !important;
  -webkit-text-fill-color:#B9C3CB !important;
}

/* Administration et enquête de satisfaction. */
html[data-theme="dark"] .admin-hub-grid>[data-adminsub],
html[data-theme="dark"] .sat-dialog,
html[data-theme="dark"] .sat-admin-question,
html[data-theme="dark"] .sat-admin-status>div,
html[data-theme="dark"] .sat-choice-row button{
  background:var(--dark-card) !important;
  color:var(--dark-text) !important;
  border-color:var(--dark-border) !important;
}
html[data-theme="dark"] .admin-hub-grid>[data-adminsub]:hover{
  background:#202B34 !important;
  border-color:#52616D !important;
}
html[data-theme="dark"] .sat-choice-row button.selected{
  background:#183522 !important;
  border-color:#4CAF50 !important;
  color:#91E19B !important;
}
html[data-theme="dark"] .sat-question.sat-missing{
  background:#301D21 !important;
}

/* Tableaux, dialogues et aide. */
html[data-theme="dark"] table{background:var(--dark-card) !important;}
html[data-theme="dark"] th{
  background:#26313B !important;
  color:#EEF3F6 !important;
  border-color:#46545F !important;
}
html[data-theme="dark"] td{
  background:#1B232C !important;
  color:#E7ECF0 !important;
  border-color:#33404B !important;
}
html[data-theme="dark"] tr:nth-child(even) td{background:#171F27 !important;}
html[data-theme="dark"] .heures-chantier-head,
html[data-theme="dark"] .heures-day-head{
  color:#B5C0C9 !important;
  border-color:#46545F !important;
}
html[data-theme="dark"] .heures-chantier-row,
html[data-theme="dark"] .heures-day-row{
  border-color:#3B4853 !important;
}
html[data-theme="dark"] .heures-sup-cell{
  color:#82B6FF !important;
}
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] .popup-card,
html[data-theme="dark"] [role="dialog"],
html[data-theme="dark"] .chantier-name-dialog{
  background:#1C252E !important;
  color:var(--dark-text) !important;
  border-color:#465560 !important;
  box-shadow:0 24px 70px rgba(0,0,0,.48) !important;
}
html[data-theme="dark"] .overlay,
html[data-theme="dark"] .ac-review-overlay{
  background:rgba(4,7,10,.72) !important;
}

/* Conserver une zone blanche uniquement là où l'utilisateur signe. */
html[data-theme="dark"] .signature-box,
html[data-theme="dark"] #signatureCanvasEl,
html[data-theme="dark"] #acSignatureCanvasEl{
  background:#FFFFFF !important;
  border-color:#6C7A84 !important;
}

/* Réduction des effets pour les personnes sensibles à l'animation. */
@media(prefers-reduced-motion:reduce){
  html[data-theme="dark"] *,
  html[data-theme="dark"] *::before,
  html[data-theme="dark"] *::after{
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
  }
}

/* =====================================================================
   TRACÉO 2.9.84 — MODE SOMBRE CONFORME AU VISUEL DE RÉFÉRENCE
   Priorité finale : aucun texte noir ni panneau blanc en thème sombre.
   ===================================================================== */
html[data-theme="dark"]{
  --c-primary:#11181E;
  --c-primary-2:#182129;
  --c-bg:#090E12;
  --c-surface:#0E1419;
  --c-surface-2:#121A20;
  --c-text:#F5F7F8;
  --c-muted:#98A5AF;
  --c-border:#28343D;
  --c-soft:#121A20;
  --dark-bg:#090E12;
  --dark-shell:#0B1116;
  --dark-card:#0E1419;
  --dark-card-raised:#131B21;
  --dark-field:#0B1116;
  --dark-border:#2A363F;
  --dark-border-soft:#202B33;
  --dark-text:#F5F7F8;
  --dark-muted:#98A5AF;
  --shadow:0 1px 2px rgba(0,0,0,.34);
}
html[data-theme="dark"] body{background:#090E12 !important;}
html[data-theme="dark"] .app-shell{background:#0B1116 !important;}
@media(min-width:900px){
  html[data-theme="dark"] body{background:#070B0E !important;}
  html[data-theme="dark"] .app-shell{box-shadow:0 0 0 1px #1F2A31,0 14px 44px rgba(0,0,0,.42) !important;}
}

/* Les anciens titres utilisaient --c-primary, désormais réservé aux fonds. */
html[data-theme="dark"] [style*="color:var(--c-primary)"],
html[data-theme="dark"] [style*="color: var(--c-primary)"],
html[data-theme="dark"] .csel-group-label,
html[data-theme="dark"] .empty-note-title,
html[data-theme="dark"] .status-label.active,
html[data-theme="dark"] .fiche-hub-option,
html[data-theme="dark"] .home-assistant-toggle,
html[data-theme="dark"] .home-link{
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
}

/* Textes foncés historiques écrits directement dans les écrans. */
html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: #000"],
html[data-theme="dark"] [style*="color:black"],
html[data-theme="dark"] [style*="color: black"],
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color: #111827"],
html[data-theme="dark"] [style*="color:#1C2027"],
html[data-theme="dark"] [style*="color:#1c2027"],
html[data-theme="dark"] [style*="color:#26313d"],
html[data-theme="dark"] [style*="color:#374151"],
html[data-theme="dark"] [style*="color:#4b5560"],
html[data-theme="dark"] [style*="color:#4b5563"],
html[data-theme="dark"] [style*="color:#4A5561"],
html[data-theme="dark"] [style*="color:#525C68"],
html[data-theme="dark"] [style*="color:#56616c"],
html[data-theme="dark"] [style*="color:#5b6470"],
html[data-theme="dark"] [style*="color:#64707b"],
html[data-theme="dark"] [style*="color:#64748b"],
html[data-theme="dark"] [style*="color:#64748B"],
html[data-theme="dark"] [style*="color:#66717c"],
html[data-theme="dark"] [style*="color:#66717d"],
html[data-theme="dark"] [style*="color:#6b7280"]{
  color:#AAB5BE !important;
  -webkit-text-fill-color:#AAB5BE !important;
}

/* Toute ancienne surface claire devient noire, sauf éléments techniques. */
html[data-theme="dark"] [style*="background:#fff"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background: #fff"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background:#FFF"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background: #FFF"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background:white"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background: white"]:not(#updateBanner button):not(.logo-preview):not(img),
html[data-theme="dark"] [style*="background:#faf"],
html[data-theme="dark"] [style*="background:#FAF"],
html[data-theme="dark"] [style*="background:#fbf"],
html[data-theme="dark"] [style*="background:#FBF"],
html[data-theme="dark"] [style*="background:#f8f"],
html[data-theme="dark"] [style*="background:#F8F"],
html[data-theme="dark"] [style*="background:#f7f"],
html[data-theme="dark"] [style*="background:#F7F"],
html[data-theme="dark"] [style*="background:#f5f"],
html[data-theme="dark"] [style*="background:#F5F"],
html[data-theme="dark"] [style*="background:#f4f"],
html[data-theme="dark"] [style*="background:#F4F"],
html[data-theme="dark"] [style*="background:#f3f"],
html[data-theme="dark"] [style*="background:#F3F"],
html[data-theme="dark"] [style*="background:#f2f"],
html[data-theme="dark"] [style*="background:#F2F"],
html[data-theme="dark"] [style*="background:#f1f"],
html[data-theme="dark"] [style*="background:#F1F"],
html[data-theme="dark"] [style*="background:#f0f"],
html[data-theme="dark"] [style*="background:#F0F"],
html[data-theme="dark"] [style*="background:#edf"],
html[data-theme="dark"] [style*="background:#EDF"],
html[data-theme="dark"] [style*="background:#eef"],
html[data-theme="dark"] [style*="background:#EEF"]{
  background:#10171C !important;
  border-color:#2B3740 !important;
}
html[data-theme="dark"] [style*="background:#FFF7E6"],
html[data-theme="dark"] [style*="background:#fff7e6"],
html[data-theme="dark"] [style*="background:#FEF3E2"],
html[data-theme="dark"] [style*="background:#fef3e2"]{
  background:#2A2111 !important;
  border-color:#5B4820 !important;
}
html[data-theme="dark"] [style*="background:#E9F9EE"],
html[data-theme="dark"] [style*="background:#e9f9ee"],
html[data-theme="dark"] [style*="background:#ECFDF5"],
html[data-theme="dark"] [style*="background:#ecfdf5"],
html[data-theme="dark"] [style*="background:#F0F7F1"],
html[data-theme="dark"] [style*="background:#f0f7f1"],
html[data-theme="dark"] [style*="background:#f0f8f2"]{
  background:#102B18 !important;
  border-color:#2E633A !important;
}
html[data-theme="dark"] [style*="background:#F1ECFF"],
html[data-theme="dark"] [style*="background:#f1ecff"],
html[data-theme="dark"] [style*="background:#F5F2FF"],
html[data-theme="dark"] [style*="background:#f5f2ff"]{
  background:#21182B !important;
  border-color:#49355D !important;
}

/* Cartes et formulaires : rendu presque noir identique à la référence. */
html[data-theme="dark"] .card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .home-metric,
html[data-theme="dark"] .fiche-item,
html[data-theme="dark"] .fiche-pro .card,
html[data-theme="dark"] .fiche-home-style,
html[data-theme="dark"] .ac-home-style,
html[data-theme="dark"] .ac-section-card,
html[data-theme="dark"] .ac-model-list-card,
html[data-theme="dark"] .ac-model-row,
html[data-theme="dark"] .admin-hub-grid>[data-adminsub],
html[data-theme="dark"] .stats-page-head,
html[data-theme="dark"] .stats-panel,
html[data-theme="dark"] .stats-kpi,
html[data-theme="dark"] .stats-highlight,
html[data-theme="dark"] .guide-choice-card{
  background:#0E1419 !important;
  color:#F5F7F8 !important;
  border-color:#2A363F !important;
  box-shadow:0 1px 2px rgba(0,0,0,.34) !important;
}
html[data-theme="dark"] .fiche-pro .subrow,
html[data-theme="dark"] .status-track,
html[data-theme="dark"] .ac-point-card,
html[data-theme="dark"] .home-today-item,
html[data-theme="dark"] .home-report-row,
html[data-theme="dark"] .stats-daily-row,
html[data-theme="dark"] .stats-doc-summary>div{
  background:#0B1116 !important;
  border-color:#253039 !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .csel-display,
html[data-theme="dark"] .native-date-time{
  background:#090F13 !important;
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
  border-color:#34424C !important;
}

/* Signature sombre à l'écran ; l'inversion CSS garde le tracé noir dans le PDF. */
html[data-theme="dark"] .signature-box,
html[data-theme="dark"] .fiche-pro .signature-box{
  background:#11181E !important;
  border-color:#44535D !important;
}
html[data-theme="dark"] #signatureCanvasEl,
html[data-theme="dark"] #acSignatureCanvasEl{
  background:transparent !important;
  border-color:#44535D !important;
  filter:invert(1) !important;
  -webkit-filter:invert(1) !important;
}

/* Administration / sondage : ces écrans contenaient encore le plus de blanc. */
html[data-theme="dark"] .sat-maq-side,
html[data-theme="dark"] .sat-maq-setting,
html[data-theme="dark"] .sat-maq-muted,
html[data-theme="dark"] .sat-maq-question,
html[data-theme="dark"] .sat-maq-qbody,
html[data-theme="dark"] .sat-maq-stats>div,
html[data-theme="dark"] .sat-preview-card,
html[data-theme="dark"] .sat-user-card,
html[data-theme="dark"] .sat-selectcards button,
html[data-theme="dark"] .sat-nps button,
html[data-theme="dark"] .sat-faces button,
html[data-theme="dark"] .sat-rating-buttons button,
html[data-theme="dark"] .sat-dialog{
  background:#0E1419 !important;
  color:#F5F7F8 !important;
  border-color:#2A363F !important;
}
html[data-theme="dark"] .sat11-mode-btn,
html[data-theme="dark"] .sat11-preview,
html[data-theme="dark"] .sat11-number>b,
html[data-theme="dark"] .sat12-phone-card,
html[data-theme="dark"] .sat12-question textarea,
html[data-theme="dark"] .sat12-choice-row button,
html[data-theme="dark"] .sat12-actions button,
html[data-theme="dark"] .sat12-preview-stars span,
html[data-theme="dark"] .sat12-preview-buttons span,
html[data-theme="dark"] .sat12-nps span{
  background:#0E1419 !important;
  color:#F5F7F8 !important;
  border-color:#2F3B44 !important;
}
html[data-theme="dark"] .sat11-preview-item small,
html[data-theme="dark"] .sat12-phone-card>p,
html[data-theme="dark"] .sat12-question>small,
html[data-theme="dark"] .sat12-preview-face-item small,
html[data-theme="dark"] .sat12-preview-note{
  color:#9EABB5 !important;
  -webkit-text-fill-color:#9EABB5 !important;
}
html[data-theme="dark"] .sat12-preview-note{
  background:#102318 !important;
}
html[data-theme="dark"] .sat11-mode-btn.is-active{
  background:#102B18 !important;
  border-color:#20A43D !important;
  color:#8DE49B !important;
}
html[data-theme="dark"] .sat-user-sub,
html[data-theme="dark"] .sat-user-qcount,
html[data-theme="dark"] .sat-user-hint,
html[data-theme="dark"] .sat-thanks p,
html[data-theme="dark"] .sat-qmain small,
html[data-theme="dark"] .sat-maq-muted{
  color:#9EABB5 !important;
  -webkit-text-fill-color:#9EABB5 !important;
}
html[data-theme="dark"] .sat-selectcards button.selected,
html[data-theme="dark"] .sat-nps button.selected{
  background:#102B18 !important;
  border-color:#218D36 !important;
  color:#8CE39A !important;
}

/* Barre et héros, conformément au visuel : noir avec ligne verte discrète. */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] #redacteurBar,
html[data-theme="dark"] .fiche-hub-heading,
html[data-theme="dark"] .fiche-pro-hero,
html[data-theme="dark"] .ac-list-hero,
html[data-theme="dark"] .ac-pro-top,
html[data-theme="dark"] .ac-home-style .fiche-hub-heading{
  background:#0B1116 !important;
  background-image:none !important;
  color:#FFFFFF !important;
  border-color:#29363E !important;
}
html[data-theme="dark"] .card>h2,
html[data-theme="dark"] .section-card>h2,
html[data-theme="dark"] .fiche-pro .card>h2{
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
  border-color:#2A363F !important;
}
html[data-theme="dark"] .card>h2::before,
html[data-theme="dark"] .section-card>h2::before{
  background:#20B445 !important;
}

/* Boutons secondaires presque noirs ; actions principales vertes et nettes. */
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .icon-row-btn,
html[data-theme="dark"] .home-action.secondary{
  background:#141B20 !important;
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
  border-color:#303C45 !important;
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .home-action.primary,
html[data-theme="dark"] .stats-period-btn.active{
  background:linear-gradient(180deg,#10A832 0%,#087D25 100%) !important;
  border-color:#119F31 !important;
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF !important;
  box-shadow:none !important;
}

/* Les aperçus de logo restent blancs uniquement pour préserver les logos noirs. */
html[data-theme="dark"] .logo-preview,
html[data-theme="dark"] .logo-preview img{
  background:#FFFFFF !important;
}

/* Fenêtres secondaires qui avaient leur fond clair dans la feuille historique. */
html[data-theme="dark"] .traceo-time-dialog,
html[data-theme="dark"] .success-anim-card,
html[data-theme="dark"] .success-anim-close{
  background:#0E1419 !important;
  color:#F5F7F8 !important;
  border-color:#34414B !important;
}
html[data-theme="dark"] .success-anim-text,
html[data-theme="dark"] .app-footer-global,
html[data-theme="dark"] .fiche-item .meta,
html[data-theme="dark"] table td,
html[data-theme="dark"] table th{
  color:#AAB5BE !important;
  -webkit-text-fill-color:#AAB5BE !important;
}

/* =====================================================================
   TRACÉO 2.9.85 — FINITIONS SOMBRES D'APRÈS LES CAPTURES TERRAIN
   ===================================================================== */

/* Photos : les deux emplacements d'ajout ne doivent jamais redevenir blancs. */
html[data-theme="dark"] .photo-add{
  background:#0B1116 !important;
  color:#9AA7B1 !important;
  border-color:#52616C !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .photo-add:hover{
  background:#111A20 !important;
  border-color:#6B7A84 !important;
}

/* Mail et WhatsApp : cartes foncées avec leur couleur d'identification. */
html[data-theme="dark"] .share-action-card{
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .share-action-mail{
  background:#0C1622 !important;
  border-color:#176FCE !important;
}
html[data-theme="dark"] .share-action-mail:hover{
  background:#102033 !important;
  border-color:#2F8AF0 !important;
}
html[data-theme="dark"] .share-action-whatsapp{
  background:#0C1B12 !important;
  border-color:#15923D !important;
}
html[data-theme="dark"] .share-action-whatsapp:hover{
  background:#102719 !important;
  border-color:#25B751 !important;
}
html[data-theme="dark"] .share-action-text strong{
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
}
html[data-theme="dark"] .share-action-text small{
  color:#96A4AE !important;
  -webkit-text-fill-color:#96A4AE !important;
}

/* Pastilles de statut et de pointage. */
html[data-theme="dark"] .chip,
html[data-theme="dark"] .send-chip{
  background:#102819 !important;
  color:#84DB91 !important;
  -webkit-text-fill-color:#84DB91 !important;
  border:1px solid #28663A !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .chip.warn,
html[data-theme="dark"] .subrow .chip[style*="#7A6520"]{
  background:#2A2111 !important;
  color:#F2C768 !important;
  -webkit-text-fill-color:#F2C768 !important;
  border-color:#6A5423 !important;
}
html[data-theme="dark"] .subrow .chip[style*="color:#fff"]{
  background:#1E1930 !important;
  color:#C7B6FF !important;
  -webkit-text-fill-color:#C7B6FF !important;
  border-color:#514279 !important;
}
html[data-theme="dark"] .chip.danger{
  background:#2A1518 !important;
  color:#FF858A !important;
  -webkit-text-fill-color:#FF858A !important;
  border-color:#6E3036 !important;
}

/* Tous les boutons Supprimer / Retirer / × restent rouges mais deviennent sombres. */
html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] button.btn-danger,
html[data-theme="dark"] .subrow .rm.btn-danger{
  background:#2A1518 !important;
  background-image:none !important;
  color:#FF7B82 !important;
  -webkit-text-fill-color:#FF7B82 !important;
  border-color:#713239 !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .btn-danger:hover,
html[data-theme="dark"] button.btn-danger:hover{
  background:#381A1F !important;
  border-color:#914049 !important;
}
html[data-theme="dark"] .btn-danger svg{
  color:#FF8A90 !important;
  stroke:currentColor !important;
}
html[data-theme="dark"] .link-danger-btn{
  color:#FF747B !important;
  -webkit-text-fill-color:#FF747B !important;
}

/* Météo et note d'horaires. */
html[data-theme="dark"] .weather-bulletin{
  background:#0C151C !important;
  border-color:#2C4658 !important;
  color:#EAF2F7 !important;
}
html[data-theme="dark"] .wb-icon,
html[data-theme="dark"] .wb-right{
  border-color:#2C4658 !important;
}
html[data-theme="dark"] .wb-cond,
html[data-theme="dark"] .wb-row b{
  color:#F3F7FA !important;
  -webkit-text-fill-color:#F3F7FA !important;
}
html[data-theme="dark"] .wb-line,
html[data-theme="dark"] .wb-row span{
  color:#A7B6C1 !important;
  -webkit-text-fill-color:#A7B6C1 !important;
}
html[data-theme="dark"] .pointage-default-note{
  background:#171A11 !important;
  border-color:#4D5328 !important;
  color:#C9D29A !important;
  -webkit-text-fill-color:#C9D29A !important;
}

/* Éditeur d'apparence : seules les vignettes de logo gardent un fond blanc. */
html[data-theme="dark"] .logo-preview{
  background:transparent !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .logo-preview img{
  background:#FFFFFF !important;
  border-color:#59656E !important;
}
html[data-theme="dark"] .preset-card,
html[data-theme="dark"] .appearance-presets .preset-card,
html[data-theme="dark"] .appearance-control-grid label{
  background:#0E1419 !important;
  background-image:none !important;
  color:#F5F7F8 !important;
  -webkit-text-fill-color:#F5F7F8 !important;
  border-color:#34414B !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .preset-card:hover{
  background:#141D23 !important;
  border-color:#52616C !important;
}

/* L'aperçu reflète maintenant aussi le mode sombre actif. */
html[data-theme="dark"] .appearance-preview-app{
  --pv-bg:#090E12 !important;
  --pv-card:#0E1419 !important;
  --pv-nav:#0B1116 !important;
  background:#090E12 !important;
  color:#F5F7F8 !important;
}
html[data-theme="dark"] .appearance-preview-content,
html[data-theme="dark"] .appearance-preview-search,
html[data-theme="dark"] .appearance-preview-stats>div,
html[data-theme="dark"] .appearance-preview-card{
  background:#0E1419 !important;
  color:#E9EEF1 !important;
  border-color:#2A363F !important;
}
html[data-theme="dark"] .appearance-preview-stats span,
html[data-theme="dark"] .appearance-preview-card span,
html[data-theme="dark"] .appearance-preview-search{
  color:#96A4AE !important;
  -webkit-text-fill-color:#96A4AE !important;
}
html[data-theme="dark"] .appearance-preview-nav{
  background:#0B1116 !important;
  border-color:#2A363F !important;
}
html[data-theme="dark"] .appearance-preview-nav span{
  color:#DCE4E9 !important;
}

/* Lecture renforcée en plein jour : contraste, contours et texte légèrement agrandis. */
.header-mode-btn{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:8px;width:34px;height:34px;flex:0 0 34px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:900;line-height:1}
.header-mode-btn.active{background:#F5C84C;color:#111827;border-color:#FFE38A;box-shadow:0 0 0 2px rgba(255,255,255,.18)}
html[data-outdoor="true"]{--theme-font-scale:1.06!important}
html[data-outdoor="true"] .card,html[data-outdoor="true"] input,html[data-outdoor="true"] select,html[data-outdoor="true"] textarea,html[data-outdoor="true"] button{border-width:2px!important}
html[data-outdoor="true"] .section-note,html[data-outdoor="true"] .field label,html[data-outdoor="true"] small{color:var(--c-text)!important}
html[data-outdoor="true"] .topbar,html[data-outdoor="true"] .bottomnav{box-shadow:0 2px 0 var(--c-accent)!important}
.pdf-preview-btn{width:100%;margin-bottom:8px;display:flex;align-items:center;justify-content:center;gap:7px}
.draft-autosave-state{margin-top:9px;text-align:center;color:var(--c-muted);font-size:11px;font-weight:700}
.pdf-preview-modal{width:min(960px,96vw)!important;max-width:960px!important;height:min(88vh,900px);display:flex;flex-direction:column;gap:10px}
.pdf-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.pdf-preview-head h2{margin:0}
.pdf-preview-modal iframe{width:100%;flex:1;min-height:420px;border:1px solid var(--c-border);border-radius:10px;background:#fff}
.pdf-preview-open{display:flex;align-items:center;justify-content:center;text-decoration:none;flex:1}
.diagnostic-summary{display:flex;align-items:center;gap:11px;border:1px solid var(--c-border);border-radius:12px;padding:12px;background:var(--c-soft)}
.diagnostic-summary>span{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px;font-weight:900;background:#D97706}.diagnostic-summary.ok>span{background:#22A447}.diagnostic-summary b,.diagnostic-summary small{display:block}.diagnostic-summary small{margin-top:2px;color:var(--c-muted)}
.history-filter-bar{display:flex;align-items:center;gap:9px;margin:12px 0;flex-wrap:wrap}.history-filter-bar input{flex:1 1 270px}.history-filter-bar>div{display:flex;gap:5px}.history-filter-bar button{border:1px solid var(--c-border);background:var(--c-surface);color:var(--c-text);border-radius:999px;padding:7px 10px;font-size:11px;font-weight:800}.history-filter-bar button.active{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
.fiche-tool-row{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:9px}.fiche-tool-row button{flex:1 1 150px;font-size:11.5px}.btn-validation{width:100%;border:1px solid #75C786;background:#EAF8EE;color:#176A2B;border-radius:10px;padding:10px;font-weight:850;margin-bottom:8px}.fiche-validation-state{border:1px solid #75C786;background:#EAF8EE;color:#176A2B;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:800;margin-bottom:8px}
.audit-list,.template-list,.trash-list{display:grid;gap:7px;margin-top:12px;max-height:52vh;overflow:auto}.audit-list>div,.trash-list>div,.template-list>div{display:flex;align-items:center;gap:9px;border:1px solid var(--c-border);border-radius:10px;padding:9px;background:var(--c-soft)}.audit-list>div{display:block}.audit-list b,.audit-list span,.trash-list b,.trash-list small,.template-list b,.template-list small{display:block}.audit-list span,.trash-list small,.template-list small{font-size:11px;color:var(--c-muted);margin-top:2px}.trash-list>div>span,.template-list>div>.icon-row-btn{flex:1;min-width:0;text-align:left}
.photo-editor-item{border:1px solid var(--c-border);border-radius:10px;padding:6px;background:var(--c-soft);min-width:0}.photo-editor-item .photo-thumb{width:100%;height:118px}.photo-editor-item>input[type=text]{width:100%;margin-top:6px;padding:7px;font-size:11px}.photo-editor-item>label{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;margin-top:5px}.photo-editor-item>label input{width:15px;height:15px}
.notification-center-list{border-top:1px solid var(--c-border);padding:9px 14px;display:grid;gap:6px}.notification-center-list>div{display:flex;gap:8px;padding:8px;border-radius:9px;background:var(--c-soft)}.notification-center-list>div.unread{border-left:3px solid var(--c-accent)}.notification-center-list b,.notification-center-list small{display:block}.notification-center-list b{font-size:12px}.notification-center-list small{font-size:10.5px;color:var(--c-muted);margin-top:2px}
.weekly-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:12px}.weekly-summary-grid>div{text-align:center;border:1px solid var(--c-border);border-radius:10px;padding:9px 5px;background:var(--c-soft)}.weekly-summary-grid b,.weekly-summary-grid span{display:block}.weekly-summary-grid b{font-size:16px}.weekly-summary-grid span{font-size:10px;color:var(--c-muted);margin-top:3px}
html[data-theme="dark"] .btn-validation,html[data-theme="dark"] .fiche-validation-state{background:#102D1B;color:#A9E9B6;border-color:#287B3A}
@media(max-width:599px){.weekly-summary-grid{grid-template-columns:repeat(2,1fr)}.photo-editor-item .photo-thumb{height:105px}}
@media(max-width:599px){.header-mode-btn{width:29px;height:29px;flex-basis:29px;font-size:15px}.pdf-preview-modal{height:92vh}.pdf-preview-modal iframe{min-height:280px}.pdf-preview-head{align-items:center}}

/* Administration du sondage : aucun bandeau clair. */
html[data-theme="dark"] .sat-live-status.active{
  background:#102819 !important;
  border-color:#2C6C3C !important;
  color:#BDEBC5 !important;
}
html[data-theme="dark"] .sat-live-status.inactive{
  background:#2A1518 !important;
  border-color:#713239 !important;
  color:#FFB5B9 !important;
}
html[data-theme="dark"] .sat-save-hint{
  background:#0D1B28 !important;
  border-color:#294D70 !important;
  color:#AACAE7 !important;
}
html[data-theme="dark"] .sat-maq-nav{
  color:#9EABB5 !important;
}
html[data-theme="dark"] .sat-maq-nav.active{
  background:#102819 !important;
  color:#91DF9C !important;
}

/* Zone propriétaire : avertissement rouge sombre, jamais rose. */
html[data-theme="dark"] .card[style*="border-color:#FCA5A5"]{
  background:#160E10 !important;
  border-color:#673137 !important;
}
html[data-theme="dark"] .card[style*="border-color:#FCA5A5"] .section-note{
  color:#DDA7AA !important;
  -webkit-text-fill-color:#DDA7AA !important;
}

/* =====================================================================
   TRACÉO 2.9.88 — ABSENCES SANS HORAIRES
   ===================================================================== */
.pointage-absence-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
  gap:8px 14px;
  margin-top:10px;
}
.pointage-absence-choice{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:22px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--c-text);
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  min-width:0;
}
.pointage-absence-choice input{width:14px;height:14px;flex:0 0 auto;margin:0;accent-color:var(--c-accent);}
.pointage-absence-choice span{display:block;line-height:1.25;min-width:0;}
.pointage-absence-choice.is-justified.active{
  background:transparent;
  color:#9A6B12;
  font-weight:700;
}
.pointage-absence-choice.is-unjustified.active{
  background:transparent;
  color:var(--c-danger);
  font-weight:700;
}
.pointage-absence-choice.is-delay.active{color:#8A6514;font-weight:700;}
@media(min-width:700px){
  .pointage-status-options{grid-template-columns:repeat(3,max-content);column-gap:24px;}
}
.pointage-absence-state{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:66px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid;
}
.pointage-absence-state.is-justified{background:#FFF8E8;border-color:#E8AF3A;color:#805A09;}
.pointage-absence-state.is-unjustified{background:#FFF0F1;border-color:#E36B73;color:#9A2931;}
.pointage-absence-icon{
  width:34px;height:34px;flex:0 0 34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:18px;font-weight:900;
}
.pointage-absence-state.is-justified .pointage-absence-icon{background:#D99813;}
.pointage-absence-state.is-unjustified .pointage-absence-icon{background:#D94B55;}
.pointage-absence-state strong{display:block;font-size:14px;line-height:1.2;}
.pointage-absence-state span{display:block;margin-top:3px;font-size:11.5px;opacity:.82;}
html[data-theme="dark"] .pointage-absence-choice{background:transparent;border:0;color:#D7E0E5;}
html[data-theme="dark"] .pointage-absence-state.is-justified{background:#241D0D;border-color:#8D681E;color:#F1D48A;}
html[data-theme="dark"] .pointage-absence-state.is-unjustified{background:#281214;border-color:#853B41;color:#F3A4AA;}
html[data-theme="dark"] .pointage-absence-choice.is-justified.active{color:#E1B950;}
html[data-theme="dark"] .pointage-absence-choice.is-unjustified.active{color:#F07C84;}
html[data-theme="dark"] .pointage-absence-choice.is-delay.active{color:#E1B950;}

/* Notifications reçues : heures, absence justifiée ou injustifiée. */
.pointage-notification-message{
  display:flex;
  align-items:center;
  gap:11px;
  padding:13px 14px;
  border-radius:12px;
  border:1px solid var(--c-border);
  background:var(--c-surface-2);
  color:var(--c-primary);
  font-size:15px;
  font-weight:750;
  line-height:1.4;
  text-align:left;
}
.pointage-notification-message-icon{
  width:32px;height:32px;flex:0 0 32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--c-accent);color:#fff;font-weight:900;
}
.pointage-notification-message.is-absence-justified{
  background:#FFF8E8;border-color:#E8AF3A;color:#805A09;
}
.pointage-notification-message.is-absence-justified .pointage-notification-message-icon{background:#D99813;}
.pointage-notification-message.is-absence-unjustified{
  background:#FFF0F1;border-color:#E36B73;color:#9A2931;
}
.pointage-notification-message.is-absence-unjustified .pointage-notification-message-icon{background:#D94B55;}
html[data-theme="dark"] #pointageNotificationCard{background:#0E151A !important;border-color:#34414B !important;}
html[data-theme="dark"] #pointageNotificationTitle{color:#F3F6F7 !important;}
html[data-theme="dark"] .pointage-notification-message.is-hours{background:#111A20;border-color:#34414B;color:#E9EEF1;}
html[data-theme="dark"] .pointage-notification-message.is-absence-justified{background:#241D0D;border-color:#8D681E;color:#F1D48A;}
html[data-theme="dark"] .pointage-notification-message.is-absence-unjustified{background:#281214;border-color:#853B41;color:#F3A4AA;}

/* 2.9.90 : une confirmation fermée ne doit jamais conserver une couche
   invisible au-dessus des boutons de l'application. */
#successAnimOverlay:not(.show),
#pointageNotifOverlay:not(.show){
  pointer-events:none !important;
  visibility:hidden !important;
  opacity:0 !important;
}
#successAnimOverlay.show,
#pointageNotifOverlay.show{
  pointer-events:auto !important;
  visibility:visible !important;
  opacity:1 !important;
}
.success-anim-ok,
.success-anim-close{
  position:relative;
  z-index:2;
  pointer-events:auto !important;
  touch-action:manipulation;
  cursor:pointer;
}

/* 2.9.91 : boutons de statut réellement tactiles dans le détail des heures. */
.pointage-status-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:36px;
  min-height:34px;
  margin:0;
  padding:5px 6px;
  border:1px solid var(--c-border);
  border-radius:9px;
  background:var(--c-surface);
  color:var(--c-text);
  font-size:12.5px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
}
.pointage-status-icon:active{transform:scale(.94);}
.pointage-status-icon:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;}
html[data-theme="dark"] .pointage-status-icon{
  background:#111A20;
  border-color:#34414B;
  color:#E9EEF1;
}

/* 2.9.101 — Détail des heures compact sur petits écrans Android.
   La date et les deux statuts disposent de toute la largeur sur la première
   ligne. Chantier, heures normales, supplémentaires et total restent alignés
   sur une seconde ligne au lieu de se disperser verticalement. */
@media (max-width:480px){
  .heures-day-row{
    grid-template-columns:minmax(88px,1fr) repeat(3,minmax(46px,54px));
    grid-template-rows:auto auto;
    column-gap:5px;
    row-gap:8px;
    min-height:0;
    padding:10px 0 11px;
    align-items:end;
  }
  .heures-day-row .heures-day-date{
    grid-column:1 / -1;
    grid-row:1;
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
    gap:5px;
    min-width:0;
    font-size:12px;
    white-space:nowrap;
  }
  .heures-day-row .heures-day-date > span:first-child{
    font-weight:800;
    margin-right:1px;
  }
  .heures-day-row .pointage-status-icon{
    min-width:36px;
    width:36px;
    min-height:34px;
    height:34px;
    padding:4px;
    flex:0 0 36px;
  }
  .heures-day-row .heures-day-chantiers{
    grid-column:1;
    grid-row:2;
    align-self:center;
    min-width:0;
    flex-wrap:nowrap;
    overflow:hidden;
  }
  .heures-day-row .chantier-code-btn-day{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .heures-day-row .heures-normal-cell,
  .heures-day-row .heures-sup-cell,
  .heures-day-row .heures-total-cell{
    grid-row:2;
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:flex-end;
    gap:2px;
    font-size:11px;
    line-height:1.1;
    white-space:nowrap;
  }
  .heures-day-row .heures-normal-cell{grid-column:2;}
  .heures-day-row .heures-sup-cell{grid-column:3;}
  .heures-day-row .heures-total-cell{
    grid-column:4;
    grid-row:2;
    color:var(--c-text);
    font-size:11px;
    text-align:right;
  }
  .heures-day-row .heures-normal-cell::before,
  .heures-day-row .heures-sup-cell::before,
  .heures-day-row .heures-total-cell::before{
    color:var(--c-muted);
    font-size:8px;
    font-weight:700;
    line-height:1;
  }
  .heures-day-row .heures-normal-cell::before{content:"Normal";}
  .heures-day-row .heures-sup-cell::before{content:"Sup.";}
  .heures-day-row .heures-total-cell::before{content:"Total";}
}
.pointage-status-mark{
  display:inline-block;
  margin-left:1px;
  font-family:Arial,Helvetica,sans-serif;
  font-size:1.28em;
  font-weight:900;
  line-height:1;
  text-shadow:none;
}
.pointage-status-mark.is-unknown{color:#1683E6 !important;}
.pointage-status-mark.is-valid{color:#4CAF50 !important;}

/* Le bouton de déconnexion reste rouge dans les deux thèmes. */
.header-logout-btn,
html[data-theme="dark"] .header-logout-btn{
  background:#D92F3A !important;
  border-color:#F06A72 !important;
  color:#FFFFFF !important;
  box-shadow:0 3px 10px rgba(217,47,58,.34) !important;
}
.header-logout-btn:hover,
html[data-theme="dark"] .header-logout-btn:hover{
  background:#B91F2A !important;
  border-color:#EF5661 !important;
}

/* TRACÉO 2.9.122 — Connexion centrée */
body.login-mode .view{
  padding-left:0!important;
  padding-right:0!important;
}
body.login-mode #viewRoot{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
body.login-mode .login-screen-bg{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  overflow-x:hidden;
}
