/* =========================================================
   AGENDA — PWA personnelle (iPad mini paysage)
   ========================================================= */

/* ---------- RESET / VERROU ZOOM ---------- */
:root{
  --ink:#171717;
  --muted:#777;
  --soft:#f6f6f3;
  --line:#e6e6e3;
  --line-dark:#c9c9c4;
  --side:212px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  color-scheme:light;
}
*{box-sizing:border-box; min-width:0}
html,body{
  margin:0; height:100%; width:100%;
  overflow:hidden;                 /* AUCUN scroll page */
  overscroll-behavior:none;
  touch-action:pan-x pan-y;        /* pas de pinch-zoom */
  -webkit-text-size-adjust:100%;
  background:#fff; color:var(--ink); font-size:14px;
}
button,input{font:inherit; color:inherit}
button{cursor:pointer; -webkit-tap-highlight-color:transparent; background:none; border:0}
input{border-radius:0}
button:focus-visible,input:focus-visible{outline:2px solid #111; outline-offset:2px}
i.bi{line-height:1}
[hidden]{display:none!important}

/* ---------- LAYOUT ---------- */
.app{
  display:grid; grid-template-columns:minmax(0,1fr);
  height:100dvh; width:100vw;
  overflow:hidden;
}
body.auth-pending .app,body.is-auth-locked .app{filter:blur(9px);opacity:.24;pointer-events:none;user-select:none;transition:filter .2s ease,opacity .2s ease}
.auth-curtain{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(255,255,255,.76);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.auth-curtain[hidden]{display:none}
.auth-curtain{overflow-y:auto;place-items:stretch;padding:0;background:#f7f7f5;backdrop-filter:none;-webkit-backdrop-filter:none}
.welcome-page{width:min(1220px,100%);min-height:100dvh;margin:auto;padding:24px clamp(22px,5vw,68px) 18px;display:flex;flex-direction:column;color:#171717}
.welcome-top{display:flex;align-items:center;justify-content:space-between;min-height:43px}
.welcome-brand{display:flex;align-items:center;gap:11px;color:#171717;text-decoration:none;font-size:10px;font-weight:800;letter-spacing:.12em}
.welcome-brand>span:last-child{display:grid;gap:4px}.welcome-brand small{color:#888;font-size:7px;font-weight:600;letter-spacing:.17em}
.welcome-mark{width:38px;height:38px;display:grid;place-items:center;background:#171717;color:#fff;font-size:13px;letter-spacing:-.08em}.welcome-mark span{display:contents}
.welcome-private{display:flex;align-items:center;gap:7px;color:#777;font-size:8px;font-weight:750;letter-spacing:.13em}.welcome-private i{font-size:13px;color:#171717}
.welcome-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(240px,.55fr);align-items:center;gap:clamp(30px,7vw,100px);padding:clamp(35px,6vh,66px) 0 34px}
.welcome-copy .eyebrow{font-size:9px;letter-spacing:.18em}
.welcome-copy h1{margin:14px 0 15px;font-size:clamp(43px,6.3vw,76px);line-height:.98;font-weight:520;letter-spacing:-.075em}
.welcome-copy h1 .welcome-line{display:block;line-height:1.12}
.welcome-copy h1 .welcome-line+.welcome-line{margin-top:.035em}
.welcome-copy h1 em{font-family:Georgia,serif;font-weight:400}
.welcome-lead{max-width:530px;margin:0;color:#686868;font-size:clamp(13px,1.5vw,16px);line-height:1.65}
.welcome-login{display:inline-flex;align-items:center;gap:25px;min-height:48px;margin-top:22px;padding:0 18px;background:#171717;color:#fff;font-size:11px}
.welcome-login i{font-size:15px;transition:transform .2s}.welcome-login:hover i{transform:translateX(3px)}
.welcome-hint{display:flex;align-items:center;gap:7px;margin:11px 0 0;color:#888;font-size:9px}.welcome-hint i{font-size:12px}
.welcome-note{position:relative;min-height:245px;padding:27px 25px;background:#171717;color:#fff;overflow:hidden}
.welcome-note:after{content:"";position:absolute;width:190px;height:190px;right:-96px;bottom:-112px;border:1px solid #ffffff23;border-radius:50%;box-shadow:0 0 0 25px #ffffff08,0 0 0 50px #ffffff05}
.welcome-note-icon{display:grid;place-items:center;width:34px;height:34px;margin-bottom:22px;border:1px solid #ffffff55;font-size:15px}
.welcome-note .eyebrow{color:#aaa;font-size:8px}
.welcome-note>p:not(.eyebrow){margin:12px 0 17px;font-size:clamp(19px,2.4vw,28px);line-height:1.18;letter-spacing:-.04em}
.welcome-note-line{display:block;width:32px;height:1px;margin-bottom:12px;background:#aaa}
.welcome-note small{display:block;max-width:220px;color:#aaa;font-size:9px;line-height:1.5}
.welcome-benefits{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #dededb;border-bottom:1px solid #dededb}
.welcome-benefits article{position:relative;min-height:145px;padding:17px 18px 18px 0}
.welcome-benefits article+article{padding-left:18px;border-left:1px solid #dededb}
.welcome-benefits article>span{position:absolute;right:12px;top:18px;color:#aaa;font-size:8px;font-variant-numeric:tabular-nums}
.welcome-benefits article>i{display:block;margin:3px 0 15px;font-size:16px}
.welcome-benefits h2{font-size:12px;font-weight:700;letter-spacing:-.02em}
.welcome-benefits p{max-width:215px;margin:7px 0 0;color:#777;font-size:9px;line-height:1.55}
.welcome-footer{display:flex;justify-content:space-between;gap:16px;margin-top:auto;padding-top:17px;color:#999;font-size:7px;font-weight:700;letter-spacing:.12em}
.welcome-why{display:grid;grid-template-columns:155px minmax(0,1fr) 220px;gap:clamp(18px,4vw,52px);align-items:start;padding:42px 0;border-top:1px solid #dededb}
.welcome-section-label{display:flex;align-items:center;gap:9px;padding-top:7px}
.welcome-section-label>span{display:grid;place-items:center;width:22px;height:22px;border:1px solid #ccc;color:#777;font-size:8px;font-variant-numeric:tabular-nums}
.welcome-section-label .eyebrow{font-size:7px;letter-spacing:.12em}
.welcome-why-copy h2,.welcome-process-head h2{margin:0;font-size:clamp(21px,3vw,34px);line-height:1.2;font-weight:520;letter-spacing:-.055em}
.welcome-why-copy h2 em{font-family:Georgia,serif;font-weight:400}
.welcome-why-copy p{max-width:650px;margin:15px 0 0;color:#707070;font-size:11px;line-height:1.75}
.welcome-why-aside{display:flex;flex-direction:column;gap:12px;padding:18px;background:#efefec}
.welcome-why-aside i{font-size:18px}
.welcome-why-aside strong{font-size:11px;line-height:1.55;font-weight:600}
.welcome-why-aside span{margin-top:4px;color:#888;font-size:6px;font-weight:750;letter-spacing:.13em}
.welcome-process{padding:38px 0 34px;border-top:1px solid #dededb}
.welcome-process-head{display:grid;grid-template-columns:155px 1fr;gap:clamp(18px,4vw,52px);align-items:start;margin-bottom:24px}
.welcome-process-head>div:last-child>p{margin:7px 0 0;color:#777;font-size:10px}
.welcome-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.welcome-step{position:relative;min-height:190px;padding:17px 17px 19px;border:1px solid #dededb;background:rgba(255,255,255,.42);transition:transform .28s,border-color .28s,background .28s}
.welcome-step:hover{transform:translateY(-3px);border-color:#aaa;background:#fff}
.welcome-step-number{display:block;color:#888;font-size:7px;font-weight:750;letter-spacing:.13em}
.welcome-step>i{display:block;margin:19px 0 14px;font-size:18px}
.welcome-step h3{font-size:13px;font-weight:700}
.welcome-step p{margin:8px 0 0;color:#777;font-size:9px;line-height:1.6}
.welcome-offline-note{display:flex;align-items:flex-start;gap:12px;margin-top:15px;padding:14px 16px;background:#efefec}
.welcome-offline-note>i{margin-top:1px;font-size:15px}
.welcome-offline-note p{margin:0;color:#666;font-size:9px;line-height:1.6}
.welcome-offline-note strong{color:#171717}
.welcome-final{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:30px;padding:24px 27px;background:#171717;color:#fff}
.welcome-final .eyebrow{color:#aaa;font-size:7px}
.welcome-final h2{margin:6px 0 0;font-size:20px;font-weight:550;letter-spacing:-.04em}
.welcome-final>div>p:last-child{margin:6px 0 0;color:#aaa;font-size:9px}
.welcome-final .welcome-login{flex:0 0 auto;margin:0;background:#fff;color:#171717}
.welcome-disclaimer{margin:12px 0 0;color:#888;font-size:8px;line-height:1.5;text-align:center}
/* Le halo décoratif déborde volontairement du contenu : le cadrer sans couper le scroll vertical. */
.auth-curtain{overflow-x:hidden;overflow-x:clip}
.welcome-page{max-width:100%;overflow-x:clip}
@media(max-width:850px){.welcome-page{padding-inline:24px}.welcome-hero{gap:28px;padding-top:35px}.welcome-benefits{grid-template-columns:repeat(2,minmax(0,1fr))}.welcome-benefits article{padding-left:0!important;border-left:0!important}.welcome-benefits article:nth-child(even){padding-left:18px!important;border-left:1px solid #dededb!important}.welcome-benefits article:nth-child(n+3){border-top:1px solid #dededb}}
@media(max-width:850px){.welcome-why{grid-template-columns:120px 1fr}.welcome-why-aside{grid-column:2}.welcome-process-head{grid-template-columns:120px 1fr}}
@media(max-width:560px){.auth-curtain{display:block}.welcome-page{min-height:100dvh;padding:17px 18px}.welcome-private{font-size:7px}.welcome-hero{grid-template-columns:1fr;padding:38px 0 24px}.welcome-copy h1{font-size:48px}.welcome-note{min-height:185px}.welcome-note-icon{margin-bottom:14px}.welcome-note>p:not(.eyebrow){font-size:22px}.welcome-benefits article{min-height:155px;padding-right:9px}.welcome-benefits article:nth-child(even){padding-left:12px!important}.welcome-footer{padding-bottom:5px;font-size:6px}.welcome-why{grid-template-columns:1fr;gap:14px;padding:30px 0}.welcome-why-aside{grid-column:auto}.welcome-process-head{grid-template-columns:1fr;gap:12px}.welcome-steps{grid-template-columns:1fr}.welcome-step{min-height:0;padding:15px}.welcome-step>i{margin:12px 0 10px}.welcome-final{align-items:flex-start;flex-direction:column;padding:20px}.welcome-final .welcome-login{min-height:44px}}
:root[data-theme="dark"] .auth-curtain{background:#050505}
:root[data-theme="dark"] .welcome-page{color:#f5f5f5}
:root[data-theme="dark"] .welcome-brand,:root[data-theme="dark"] .welcome-private i{color:#f5f5f5}
:root[data-theme="dark"] .welcome-mark{background:#f5f5f5;color:#111}
:root[data-theme="dark"] .welcome-lead,:root[data-theme="dark"] .welcome-benefits p{color:#aaa}
:root[data-theme="dark"] .welcome-benefits,:root[data-theme="dark"] .welcome-benefits article+article{border-color:#333}
:root[data-theme="dark"] .welcome-note{background:#f5f5f5;color:#111}
:root[data-theme="dark"] .welcome-note .eyebrow,:root[data-theme="dark"] .welcome-note small{color:#555}
:root[data-theme="dark"] .welcome-note-line{background:#555}
:root[data-theme="dark"] .welcome-login{background:#f5f5f5;color:#111}
:root[data-theme="dark"] .welcome-why{border-color:#333}
:root[data-theme="dark"] .welcome-why-copy p,:root[data-theme="dark"] .welcome-process-head>div:last-child>p,:root[data-theme="dark"] .welcome-step p,:root[data-theme="dark"] .welcome-offline-note p{color:#aaa}
:root[data-theme="dark"] .welcome-why-aside,:root[data-theme="dark"] .welcome-offline-note{background:#151515}
:root[data-theme="dark"] .welcome-why-aside span{color:#999}
:root[data-theme="dark"] .welcome-step{border-color:#333;background:#0d0d0d}
:root[data-theme="dark"] .welcome-step:hover{border-color:#666;background:#151515}
:root[data-theme="dark"] .welcome-offline-note strong{color:#fff}
:root[data-theme="dark"] .welcome-final{background:#f5f5f5;color:#111}
:root[data-theme="dark"] .welcome-final .eyebrow,:root[data-theme="dark"] .welcome-final>div>p:last-child{color:#555}
/* Accueil déconnecté : animations courtes, contrôlées en JavaScript */
.welcome-page{position:relative;isolation:isolate}
.welcome-page:before{content:"";position:absolute;z-index:-1;top:8%;right:-14%;width:55vw;height:55vw;max-width:700px;max-height:700px;border-radius:50%;background:radial-gradient(circle,rgba(0,0,0,.035),transparent 68%);pointer-events:none}
.welcome-mark{position:relative;overflow:hidden;transition:transform .35s cubic-bezier(.2,.8,.2,1),background .25s,color .25s}
.welcome-mark:after{content:"";position:absolute;inset:-40% auto -40% -60%;width:35%;transform:rotate(20deg);background:linear-gradient(90deg,transparent,#ffffff80,transparent);transition:left .65s cubic-bezier(.2,.8,.2,1)}
.welcome-brand:hover .welcome-mark{transform:rotate(-5deg) scale(1.06)}
.welcome-brand:hover .welcome-mark:after{left:130%}
.welcome-note{translate:var(--note-shift-x,0px) var(--note-shift-y,0px);transition:translate .22s ease,box-shadow .3s;box-shadow:0 18px 55px #00000012}
.welcome-note:before{content:"";position:absolute;z-index:0;inset:0;pointer-events:none;background:radial-gradient(240px circle at var(--note-x,50%) var(--note-ypos,50%),#ffffff17,transparent 72%)}
.welcome-note:after{animation:welcome-orbit 10s ease-in-out infinite}
.welcome-note-icon{position:relative;z-index:1;transition:transform .45s cubic-bezier(.2,.8,.2,1),background .3s}
.welcome-note:hover .welcome-note-icon{transform:translateY(-3px) rotate(-7deg);background:#ffffff12}
.welcome-benefits article{transition:background .28s ease,transform .28s cubic-bezier(.2,.8,.2,1)}
.welcome-benefits article:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;background:radial-gradient(180px circle at var(--mx,50%) var(--my,50%),rgba(0,0,0,.045),transparent 75%);transition:opacity .25s}
.welcome-benefits article:after{content:"";position:absolute;left:0;bottom:0;width:0;height:2px;background:#171717;transition:width .35s cubic-bezier(.2,.8,.2,1)}
.welcome-benefits article:hover{transform:translateY(-3px)}
.welcome-benefits article:hover:before{opacity:1}
.welcome-benefits article:hover:after{width:32px}
.welcome-benefits article>i{transition:transform .3s,color .3s}
.welcome-benefits article:hover>i{transform:translateY(-3px) scale(1.08)}
.welcome-login{position:relative;overflow:hidden;transition:transform .2s,box-shadow .25s,background .25s}
.welcome-login:after{content:"";position:absolute;inset:0;transform:translateX(-120%);background:linear-gradient(100deg,transparent,#ffffff20,transparent);transition:transform .65s}
.welcome-login:hover{transform:translateY(-2px);box-shadow:0 10px 24px #0002}
.welcome-login:hover:after{transform:translateX(120%)}
.welcome-login:active{transform:translateY(0) scale(.98)}
.welcome-motion .welcome-brand,.welcome-motion .welcome-private,.welcome-motion .welcome-copy>.eyebrow,.welcome-motion .welcome-line,.welcome-motion .welcome-lead,.welcome-motion .welcome-login,.welcome-motion .welcome-hint,.welcome-motion .welcome-note,.welcome-motion .welcome-footer{opacity:0;transform:translateY(16px)}
.welcome-motion .welcome-brand{animation:welcome-in .55s .04s both}
.welcome-motion .welcome-private{animation:welcome-in .5s .1s both}
.welcome-motion .welcome-copy>.eyebrow{animation:welcome-in .55s .12s both}
.welcome-motion .welcome-line{animation:welcome-in .72s cubic-bezier(.2,.8,.2,1) both}
.welcome-motion .welcome-line:first-of-type{animation-delay:.2s}
.welcome-motion .welcome-line:nth-of-type(2){animation-delay:.32s}
.welcome-motion .welcome-lead{animation:welcome-in .65s .46s both}
.welcome-motion .welcome-login{animation:welcome-in .6s .55s both}
.welcome-motion .welcome-hint{animation:welcome-in .55s .64s both}
.welcome-motion .welcome-note{transform:translate3d(0,18px,0) scale(.975);animation:welcome-note-in .8s .25s cubic-bezier(.2,.8,.2,1) both}
.welcome-motion .welcome-footer{animation:welcome-in .6s .8s both}
.welcome-motion .welcome-benefits article{opacity:0;transform:translateY(16px)}
.welcome-motion .welcome-benefits article.is-visible{opacity:1;transform:translateY(0);transition:opacity .55s,transform .55s cubic-bezier(.2,.8,.2,1)}
.welcome-motion .welcome-reveal{opacity:0;transform:translateY(18px)}
.welcome-motion .welcome-reveal.is-visible{opacity:1;transform:translateY(0);transition:opacity .6s,transform .6s cubic-bezier(.2,.8,.2,1)}
.welcome-motion .welcome-benefits article.is-visible:nth-child(2){transition-delay:.08s}
.welcome-motion .welcome-benefits article.is-visible:nth-child(3){transition-delay:.16s}
.welcome-motion .welcome-benefits article.is-visible:nth-child(4){transition-delay:.24s}
@keyframes welcome-in{to{opacity:1;transform:translateY(0)}}
@keyframes welcome-note-in{to{opacity:1;transform:perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1)}}
@keyframes welcome-orbit{0%,100%{transform:translate(0,0)}50%{transform:translate(-13px,-9px)}}
:root[data-theme="dark"] .welcome-page:before{background:radial-gradient(circle,rgba(255,255,255,.045),transparent 68%)}
:root[data-theme="dark"] .welcome-benefits article:before{background:radial-gradient(180px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.06),transparent 75%)}
:root[data-theme="dark"] .welcome-benefits article:after{background:#f5f5f5}
@media(prefers-reduced-motion:reduce){.welcome-note:after{animation:none!important}.welcome-motion .welcome-brand,.welcome-motion .welcome-private,.welcome-motion .welcome-copy>.eyebrow,.welcome-motion .welcome-line,.welcome-motion .welcome-lead,.welcome-motion .welcome-login,.welcome-motion .welcome-hint,.welcome-motion .welcome-note,.welcome-motion .welcome-footer,.welcome-motion .welcome-benefits article,.welcome-motion .welcome-reveal{opacity:1!important;transform:none!important;animation:none!important}.welcome-brand:hover .welcome-mark,.welcome-benefits article:hover,.welcome-note:hover .welcome-note-icon,.welcome-step:hover{transform:none}}
.side{
  display:flex; flex-direction:column;
  position:fixed; z-index:60; top:14px; bottom:14px; left:14px;
  width:min(228px, calc(100vw - 28px)); height:auto; padding:18px 13px 13px;
  border:1px solid var(--line); border-radius:14px; background:#fff;
  box-shadow:0 16px 48px rgba(0,0,0,.14); overflow:hidden;
  transform:translateX(calc(-100% - 22px)); visibility:hidden; opacity:0;
  transition:transform .24s cubic-bezier(.2,.75,.25,1), opacity .18s ease, visibility .24s;
  padding-top:max(18px, env(safe-area-inset-top));
}
.side.is-open{transform:translateX(0); visibility:visible; opacity:1}
.dock-backdrop{display:none}
.top-left{display:flex; align-items:center; gap:14px; min-width:0}
.dock-toggle{flex:0 0 32px}
.dock-toggle i{font-size:17px}
.dock-toggle:hover{background:var(--soft); border-color:var(--line-dark)}
.dock-backdrop.is-visible{display:block; position:fixed; z-index:55; inset:0; width:100%; height:100%; background:rgba(20,20,20,.18); border:0; backdrop-filter:blur(1px)}
.side .nav{gap:4px}
.side .nav-btn{min-height:42px; font-size:12px}
.side .brand{padding-bottom:18px}
.side .side-foot{padding-bottom:env(safe-area-inset-bottom)}
.main{
  display:flex; flex-direction:column;
  min-width:0; height:100dvh; overflow:hidden;
}

/* ---------- SIDEBAR ---------- */
.brand{display:flex; align-items:center; gap:10px; padding:0 6px 22px; border-bottom:1px solid var(--line)}
.brand-mark{
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--ink); font-size:19px; font-weight:650; letter-spacing:-2px;
}
.brand-mark span{font-weight:400}
.brand-txt{font-size:10px; font-weight:750; letter-spacing:.16em; line-height:1.1}
.brand-txt small{display:block; margin-top:4px; color:#888; font-size:7px; font-weight:500; letter-spacing:.13em}

.nav{display:grid; gap:2px; margin-top:18px}
.nav-btn{
  display:flex; align-items:center; gap:10px;
  min-height:38px; padding:0 9px;
  border:1px solid transparent; color:#555; font-size:11px; text-align:left;
}
.nav-btn i{width:16px; font-size:14px; color:#444; text-align:center}
.nav-btn:hover{background:var(--soft); color:var(--ink)}
.nav-btn.is-active{background:#f3f3f0; border-color:var(--line); color:var(--ink); font-weight:650}
.nav-btn.is-active i{color:var(--ink)}

.side-foot{margin-top:auto}
.status{display:flex; gap:8px; padding:10px 6px; border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.dot{width:6px; height:6px; margin-top:4px; border-radius:50%; background:#999; flex:0 0 auto}
.status strong{display:block; font-size:10px; font-weight:650}
.status small{display:block; margin-top:2px; color:#999; font-size:9px}
.nav-settings{margin-top:8px}
.ver{margin:14px 6px 0; color:#bbb; font-size:8px; letter-spacing:.12em}

/* ---------- TOPBAR ---------- */
.top{
  flex:0 0 54px; display:flex; align-items:center; justify-content:space-between;
  padding:0 26px; border-bottom:1px solid var(--line);
}
.crumb{display:flex; align-items:center; gap:8px; color:#888; font-size:8px; letter-spacing:.12em}
.crumb i{font-style:normal; color:#c5c5c0}
.crumb strong{color:#222}
.top-right{display:flex; align-items:center; gap:12px}
.sync{display:flex; align-items:center; gap:6px; color:#777; font-size:9px}
.sync i{width:6px; height:6px; border-radius:50%; background:#aaa}
.sync.connected i{background:#3f7b54}
.sync.error i{background:#b34a42}
.sync.offline{color:#9a6a27}
.sync.offline i{background:#c58b34}
.icon-btn{
  display:grid; place-items:center; width:32px; height:32px;
  border:1px solid var(--line); font-size:14px;
}
.icon-btn:hover{background:var(--soft); border-color:var(--line-dark)}

/* ---------- VIEW BASE ---------- */
.view{
  flex:1 1 auto; min-height:0;
  padding:0 26px 18px;
  overflow:hidden;                 /* scroll interne uniquement */
  display:flex; flex-direction:column;
}
.eyebrow{margin:0; color:#777; font-size:8px; font-weight:700; letter-spacing:.16em}
h1{margin:0; font-size:clamp(26px,3vw,38px); line-height:1.05; font-weight:550; letter-spacing:-.06em}
h1 span{color:#aaa}
h2{margin:0; font-size:17px; font-weight:550; letter-spacing:-.045em}
h3{margin:0; font-size:14px; font-weight:550; letter-spacing:-.03em}

/* ---------- HOME ---------- */
.view-home{justify-content:flex-start; padding-top:clamp(24px,5vh,54px)}
.home-title{margin-bottom:clamp(18px,3vh,34px)}
.home-title h1{font-size:clamp(34px,4.2vw,52px)}
.home-title .eyebrow{margin-bottom:10px}

.shelf{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  grid-template-rows:repeat(2, minmax(0,1fr));
  gap:12px;
  flex:1 1 auto;
  min-height:0;
}
.card{
  position:relative; display:flex; flex-direction:column; justify-content:flex-end;
  min-height:0; padding:18px 20px;
  border:1px solid #dcdcd7; background:#fff; text-align:left;
  overflow:hidden; transition:background .14s, border-color .14s;
}
.card::before{
  content:""; position:absolute; inset:0 0 auto; height:3px;
  background:#171717; transform:scaleX(0); transform-origin:left;
  transition:transform .16s;
}
.card:hover, .card:focus-visible{background:#f8f8f5; border-color:#171717}
.card:hover::before, .card:focus-visible::before{transform:scaleX(1)}
.card-top{
  position:absolute; top:14px; left:20px; right:20px;
  display:flex; align-items:center; justify-content:space-between;
  color:#777; font-size:8px; letter-spacing:.1em;
}
.card-top i{font-size:20px; color:#171717}
.card strong{font-size:clamp(20px,2vw,26px); font-weight:550; letter-spacing:-.05em}
.card small{margin-top:4px; color:#777; font-size:10px; line-height:1.5}
.card-arrow{position:absolute; right:20px; bottom:18px; font-size:18px}

/* ---------- VIEW HEAD ---------- */
.view-head{
  flex:0 0 auto;
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  padding:20px 0 14px; border-bottom:1px solid var(--line);
}
.view-head .eyebrow{margin-bottom:8px}
.view-head .stamp{
  width:92px; height:92px; flex:0 0 92px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  border:1px solid var(--line);
}
.stamp span{font-size:7px; font-weight:700; letter-spacing:.13em; color:#777}
.stamp strong{font-size:34px; line-height:1; font-weight:500; letter-spacing:-.07em}

/* ---------- AGENDA ---------- */
.view-agenda{overflow:hidden}
.rail-head{
  flex:0 0 auto;
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  padding:14px 0 10px;
}
.rail-head .eyebrow{margin-bottom:4px}
.rail-head h2{font-size:15px}
.rail-ctrl{display:flex; align-items:center; gap:12px}
.txt-btn{padding:4px 0; color:#777; font-size:9px}
.txt-btn:hover, .txt-btn.strong{color:#111}

.rail{
  flex:0 0 auto;
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr));
  border-top:1px solid var(--line-dark); border-bottom:1px solid var(--line-dark);
}
.day-tile{
  display:flex; flex-direction:column; min-height:88px; padding:10px 12px 8px;
  border-right:1px solid var(--line); background:#fff; text-align:left;
}
.day-tile:last-child{border-right:0}
.day-tile:hover{background:#fafaf8}
.day-tile.active{background:#f1f1ee; box-shadow:inset 0 3px 0 #171717}
.tile-top, .tile-bottom{display:flex; justify-content:space-between; align-items:center; gap:4px}
.tile-wd{color:#777; font-size:8px; letter-spacing:.1em; text-transform:uppercase}
.tile-dot{width:4px; height:4px; background:#bbb}
.day-tile.active .tile-dot{background:#171717}
.tile-date{margin-top:10px; font-size:26px; font-weight:500; letter-spacing:-.07em; line-height:1}
.tile-mo{margin-left:4px; color:#888; font-size:9px}
.tile-bottom{margin-top:auto; padding-top:8px; color:#777; font-size:7px; letter-spacing:.04em}
.day-tile.active .tile-bottom{color:#222}

.agenda-grid{
  flex:1 1 auto; min-height:0;
  display:grid; grid-template-columns:minmax(0,1.65fr) minmax(220px,.85fr);
  gap:12px; padding-top:12px; overflow:hidden;
}
.panel{
  border:1px solid var(--line); background:#fff;
  min-width:0; display:flex; flex-direction:column; overflow:hidden;
}
.panel-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex:0 0 auto}
.panel-head .eyebrow{margin-bottom:6px}
.panel-head.compact{align-items:center}
.panel-head.compact .eyebrow{margin:0}
.idx{color:#888; font-size:8px; letter-spacing:.1em}

.detail{padding:16px 20px 12px; min-height:0}
.detail h2{font-size:22px}
.sel-date{margin:5px 0 0; color:#777; font-size:10px; text-transform:capitalize}
.shift-box{flex:1 1 auto; min-height:0; margin-top:14px; overflow:auto}   /* scroll interne */
.empty{padding:14px 0; border-top:1px solid var(--line)}
.empty strong{font-size:12px; font-weight:600}
.empty p{margin:5px 0 0; color:#777; font-size:10px; line-height:1.55}
.shift-list{display:grid}
.shift-item{
  display:grid; grid-template-columns:78px minmax(0,1fr); gap:10px;
  padding:11px 0; border-top:1px solid var(--line);
}
.shift-time{color:#777; font-size:8px; letter-spacing:.1em}
.shift-detail strong{font-size:13px; font-weight:600; letter-spacing:-.02em; white-space:pre-line}
.rest{display:flex; align-items:center; gap:12px; padding:16px 0; border-top:1px solid var(--line)}
.rest-ico{width:32px; height:32px; display:grid; place-items:center; border:1px solid var(--line); font-size:16px}
.rest strong{font-size:18px; font-weight:550; letter-spacing:-.04em}
.rest p{margin:3px 0 0; color:#777; font-size:10px}
.rest-pill{
  display:inline-block;
  padding:4px 6px; border:1px solid var(--line); color:#777;
  font-size:7px; letter-spacing:.1em; white-space:nowrap;
  background:#fff;
}
.rest .rest-pill{margin-left:auto; align-self:flex-start}
.panel-foot{
  flex:0 0 auto; display:flex; justify-content:space-between; gap:8px;
  margin-top:10px; padding-top:8px; border-top:1px solid var(--line);
  color:#999; font-size:8px;
}

.side-col{display:grid; grid-template-rows:auto auto; align-content:start; gap:12px; min-height:0}
.metric, .next, .sync-panel{padding:12px 14px; overflow:hidden}
.metric-line{display:flex; align-items:baseline; gap:12px; margin:14px 0 8px}
.metric-line strong{font-size:38px; line-height:1; font-weight:500; letter-spacing:-.08em}
.metric-line span{color:#777; font-size:9px; line-height:1.5}
.micro{display:grid; grid-template-columns:repeat(5,1fr); gap:3px}
.micro span{height:3px; background:#eee}
.micro span.filled{background:#171717}
.next h3{margin:12px 0 5px; font-size:14px}
.next-detail{
  min-height:26px; margin:0; color:#777; font-size:10px; line-height:1.55;
  white-space:pre-line; overflow:auto; max-height:64px;
}
.inline-link{
  display:flex; justify-content:space-between; align-items:center;
  width:100%; margin-top:10px; padding:8px 0 0;
  border-top:1px solid var(--line); color:#222; font-size:9px; text-align:left;
}
.inline-link span{font-size:13px}
.sync-panel p{margin:10px 0; color:#777; font-size:9px; line-height:1.55}
.sync-panel{min-height:0}
.sync-row{
  display:flex; justify-content:space-between; gap:8px;
  padding:7px 0; border-top:1px solid var(--line);
  color:#777; font-size:9px;
}
.sync-row strong{color:#222; font-weight:600}
.outline-btn{
  display:flex; justify-content:space-between; align-items:center;
  width:100%; margin-top:8px; padding:8px 9px;
  border:1px solid #222; background:#fff; color:#222; font-size:9px;
}
.outline-btn:hover{background:#f7f7f5}

/* ---------- VUE DISPONIBLE ---------- */
#dispoContent{overflow:auto; padding:0 2px 18px 0}
.dispo-rail .tile-dot.has-team,.vehicle-rail .tile-dot.has-team{background:#49a96b}
.dispo-me{
  display:flex; flex-direction:column; gap:5px; padding:11px 13px; margin-bottom:14px;
  border:1px solid var(--line); background:#fafaf8;
}
.dispo-me span,.dispo-sec h3{font-size:8px; letter-spacing:.12em; text-transform:uppercase; color:#777}
.dispo-me strong{font-size:12px; white-space:pre-line; font-weight:600}
.dispo-sec{margin:0 0 18px}
.dispo-sec h3{display:flex; align-items:center; gap:8px; margin:0 0 8px}
.dispo-count{display:grid; place-items:center; min-width:19px; height:19px; border:1px solid var(--line); color:#555; font-size:9px; letter-spacing:0}
.dispo-grid{
  display:flex; gap:12px; overflow-x:auto; overflow-y:hidden; padding:2px 2px 10px;
  scroll-snap-type:x proximity; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.dispo-grid::-webkit-scrollbar{display:none; width:0; height:0}
.dispo-grid.is-static{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:visible; padding-bottom:2px}
.dispo-grid.is-static .dispo-loop-set{display:contents}
.dispo-grid.is-static .dcard{width:100%; min-width:0; height:136px; min-height:136px; flex:initial}
.dispo-loop-set{display:flex; flex:0 0 auto; gap:12px}
.dcard{
  position:relative; display:flex; flex:0 0 190px; flex-direction:column; width:190px; height:136px; min-height:136px; padding:12px 14px;
  border:1px solid var(--line); background:#fff; overflow:hidden;
  scroll-snap-align:start;
}
.dcard::before{content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#b9dfc6}
.dcard.status-soon::before{background:#f3ae52}
.dcard.status-off::before{background:#e47b76}
.dcard.is-you{background:#fafaf8}
.dcard.is-you .dcard-first{color:#171717}
.dcard-top{display:flex; justify-content:space-between; align-items:center; min-height:14px; margin-bottom:9px}
.dcard-state{display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#548365; font-size:8px; font-weight:650}
.dcard-state i{width:8px; height:8px; border-radius:2px; background:#49a96b}
.status-soon .dcard-state{color:#b47720}
.status-soon .dcard-state i{background:#f0a33b}
.status-off .dcard-state{color:#b34e4b}
.status-off .dcard-state i{background:#d95d57}
.dcard-night{color:#777; font-size:7px; letter-spacing:.1em}
.dcard-first,.dcard-last{display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.dcard-first{font-size:15px; line-height:1.15; font-weight:650; letter-spacing:-.03em}
.dcard-last{margin-top:2px; color:#777; font-size:9px; letter-spacing:.03em}
.dcard-hours{display:-webkit-box; margin-top:auto; padding-top:9px; overflow:hidden; color:#555; font-size:9px; line-height:1.45; white-space:pre-line; -webkit-box-orient:vertical; -webkit-line-clamp:2}
.dcard-together{margin-top:7px; padding-top:6px; border-top:1px solid var(--line); color:#777; font-size:8px}
.dispo-none{margin:0; color:#888; font-size:10px}

/* ---------- TOOLS (vehicle / badge) ---------- */
.view-tool{overflow:hidden}
.view-tools{display:flex; align-items:flex-end; justify-content:flex-end; gap:8px; flex-wrap:wrap}
.access-code{
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px;
  min-height:36px; padding:3px 10px; border:1px solid var(--line); background:#fff; text-align:left;
}
.access-code span{color:#777; font-size:7px; font-weight:700; letter-spacing:.12em}
.access-code strong{font-size:12px; line-height:1; font-weight:650; letter-spacing:.12em; font-variant-numeric:tabular-nums}
.access-code:hover{background:#f7f7f5; border-color:var(--line-dark)}
.date-lbl{display:flex; flex-direction:column; gap:4px; color:#777; font-size:7px; font-weight:700; letter-spacing:.1em}
.date-lbl input{
  width:148px; min-height:36px; padding:0 8px;
  border:1px solid var(--line-dark); background:#fff; color:#171717; font-size:11px;
}
.date-lbl input:focus{outline:1px solid #171717; outline-offset:0}
.back{
  display:inline-flex; align-items:center; gap:6px; flex:0 0 auto;
  min-height:36px; padding:0 10px;
  border:1px solid var(--line-dark); background:#fff; color:#171717; font-size:10px;
}
.back:hover{background:#f4f4f1}

.tool{
  flex:1 1 auto; min-height:0; margin-top:14px;
  padding:18px 22px; overflow:auto; max-width:760px;
}
.tool-head{display:flex; align-items:center; gap:10px}
.tool-ico{width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--line); font-size:15px}
.tool-head .eyebrow{margin:0 0 4px}
.tool-head h2{font-size:18px}
.tool-head .idx{margin-left:auto; align-self:flex-start}
.badge-layout{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(360px,1.1fr) minmax(280px,.9fr);gap:14px;margin-top:14px;overflow:hidden}
.badge-entry,.badge-history{min-height:0;margin:0;max-width:none;padding:18px 20px;overflow:auto}
.badge-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}
.badge-action{min-height:54px;justify-content:center;gap:9px;font-size:12px;touch-action:manipulation}
.badge-action i{font-size:16px}
.badge-action:disabled{opacity:.35;cursor:not-allowed}
.badge-history .panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.badge-event-list{list-style:none;margin:0;padding:0}
.badge-event{display:grid;grid-template-columns:52px 1fr;gap:10px;padding:12px 4px;border-bottom:1px solid var(--line)}
.badge-event time{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.badge-event strong{display:block;font-size:11px;font-weight:650}
.badge-event a,.badge-event small{display:block;margin-top:3px;color:#777;font-size:9px;text-decoration:none}
.badge-event-empty{padding:20px 4px;color:#888;font-size:11px}
.badge-location-hint{margin:14px 0 0;color:#999;font-size:9px;line-height:1.5}
.tool-intro{margin:12px 0 14px; color:#777; font-size:10px; line-height:1.55}

.vehicle-layout{
  flex:1 1 auto; min-height:0; display:grid; grid-template-columns:minmax(260px,.82fr) minmax(0,1.5fr);
  gap:12px; margin-top:14px; overflow:hidden;
}
.vehicle-entry,.vehicle-log{min-height:0; padding:16px; overflow:hidden}
.vehicle-entry .tool-intro{margin:10px 0 14px}
.vehicle-form{grid-template-columns:repeat(2,minmax(0,1fr)); max-width:none}
.vehicle-form .full{grid-column:1/-1}
.vehicle-entry .summary{max-width:none; margin-top:14px}
.vehicle-entry .tool-actions{max-width:none; margin-top:auto; padding-top:14px; flex-wrap:wrap}
.vehicle-log{display:flex; flex-direction:column}
.vehicle-log-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex:0 0 auto}
.vehicle-log-head h2{margin-top:5px; font-size:17px; text-transform:capitalize}
.vehicle-log-actions{display:flex; align-items:center; gap:10px; padding-top:3px}
.vehicle-table-head,.vehicle-trip-row{display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr) minmax(0,.9fr); align-items:center; gap:10px}
.vehicle-table-head{flex:0 0 auto; margin-top:14px; padding:8px 10px; background:#f7f7f5; color:#777; font-size:7px; font-weight:700; letter-spacing:.1em}
.vehicle-trips{flex:1 1 auto; min-height:60px; overflow:auto}
.vehicle-trip-row{position:relative; min-height:55px; padding:9px 10px 17px; border-bottom:1px solid var(--line); font-size:10px; font-variant-numeric:tabular-nums}
.vehicle-trip-row strong{font-size:11px; font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.vehicle-trip-row small{position:absolute; bottom:3px; left:10px; color:#999; font-size:7px; letter-spacing:.08em}
.vehicle-empty{padding:18px 10px; color:#888; font-size:10px}
.vehicle-days-wrap{flex:0 0 auto; margin-top:12px; padding-top:10px; border-top:1px solid var(--line)}
.vehicle-days-wrap>.eyebrow{margin-bottom:7px}
.vehicle-rail{grid-template-columns:repeat(5,minmax(0,1fr))}
.vehicle-rail .day-tile{min-height:66px; padding:7px 8px 6px}
.vehicle-rail .tile-date{margin-top:5px; font-size:21px}
.vehicle-rail .tile-bottom{font-size:6px; padding-top:5px}

.form{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-width:600px}
.f{display:block; color:#555; font-size:9px; font-weight:650}
.f.full{grid-column:1/-1}
.f input{
  display:block; width:100%; height:38px; margin-top:6px; padding:0 9px;
  border:1px solid var(--line-dark); background:#fff; color:#171717;
  font-size:12px; font-weight:500; font-variant-numeric:tabular-nums;
}
.f input::placeholder{color:#b3b3ad}
.f input:disabled,.f input:read-only{background:#f7f7f5; color:#777}
.f input:focus{outline:1px solid #171717; outline-offset:0}

.summary{
  max-width:600px; margin-top:14px; padding:11px 0 10px;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.s-label{display:block; color:#777; font-size:7px; font-weight:700; letter-spacing:.13em}
.summary strong{
  display:block; margin-top:6px; font-size:26px; line-height:1.1;
  font-weight:500; letter-spacing:-.06em; font-variant-numeric:tabular-nums;
}
.summary p{margin:6px 0 0; color:#777; font-size:9px; line-height:1.55; white-space:pre-line}
.summary.is-invalid{border-color:#a34b42}
.summary.is-invalid strong{color:#a34b42}

.tool-actions{display:flex; align-items:center; justify-content:space-between; gap:10px; max-width:600px; margin-top:10px}
.save-status{color:#888; font-size:8px; line-height:1.4}
.primary{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 12px; border:1px solid #171717; background:#171717; color:#fff; font-size:10px;
}
.primary:hover{background:#333}
.primary i{font-size:12px}

/* ---------- ASTREINTE ---------- */
.view-astreinte{overflow:hidden}
.astreinte-tools{align-items:flex-end}
.astreinte-layout{flex:1 1 auto; min-height:0; display:grid; grid-template-columns:minmax(0,1.18fr) minmax(300px,.82fr); gap:12px; padding-top:12px; overflow:hidden}
.astreinte-main{display:flex; flex-direction:column; gap:12px; min-height:0; overflow:auto; padding-right:2px}
.astreinte-meta,.astreinte-editor,.astreinte-log{padding:15px 17px; min-height:0}
.astreinte-meta{flex:0 0 auto}
.astreinte-meta .panel-head,.astreinte-editor .panel-head,.astreinte-log .panel-head{margin-bottom:12px}
.astreinte-meta-form{grid-template-columns:repeat(2,minmax(0,1fr)); max-width:none; gap:9px}
.astreinte-editor{flex:0 0 auto; overflow:visible}
.astreinte-hint{margin:-4px 0 12px; color:#888; font-size:9px; line-height:1.45}
.astreinte-form{grid-template-columns:repeat(2,minmax(0,1fr)); max-width:none; gap:9px}
.astreinte-form .f input,.astreinte-form .f select,.astreinte-form .f textarea,.astreinte-meta-form .f input{
  display:block; width:100%; min-height:36px; margin-top:5px; padding:8px 9px; border:1px solid var(--line-dark);
  border-radius:0; background:#fff; color:#171717; font-size:11px; font-weight:450;
}
.astreinte-form .f select{height:36px; padding:0 8px}
.astreinte-form .f textarea{min-height:54px; resize:vertical; line-height:1.45}
.time-field{display:flex; flex-direction:column; gap:5px; min-width:0}
.capture-btn{display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:29px; padding:5px 7px; border:1px solid var(--line-dark); background:#f7f7f5; color:#333; font-size:8px; white-space:nowrap}
.capture-btn:hover{background:#ecece8; border-color:#777}
.capture-btn:disabled{opacity:.55; cursor:wait}
.location-input-row{display:flex; align-items:stretch; gap:5px; margin-top:5px}
.astreinte-form .location-input-row input{margin-top:0; flex:1 1 auto; min-width:0}
.locate-btn{flex:0 0 auto; min-width:86px}
.geocode-credit{margin:10px 0 0; color:#999; font-size:7px; line-height:1.45}
.astreinte-form .f input:focus,.astreinte-form .f select:focus,.astreinte-form .f textarea:focus,.astreinte-meta-form .f input:focus{outline:1px solid #171717; outline-offset:0}
.astreinte-form .f.full,.astreinte-meta-form .f.full{grid-column:1/-1}
.time-pair{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px}
.requisition-fields{padding:8px 10px; border-left:2px solid #d18c35; background:#fcf8f1}
.requisition-fields .f{display:block}
.astreinte-form-actions{display:flex; align-items:center; justify-content:flex-end; gap:14px; padding-top:2px}
.astreinte-form-actions .txt-btn{font-size:9px}
.astreinte-log{display:flex; flex-direction:column}
.local-save-note{display:flex; align-items:center; gap:7px; flex:0 0 auto; margin:0 0 10px; padding:8px 9px; background:#f6f6f3; color:#72726e; font-size:8px}
.local-save-note i{font-size:12px}
.mission-list{flex:1 1 auto; min-height:80px; overflow:auto; overscroll-behavior:contain}
.mission-empty{display:flex; flex-direction:column; align-items:flex-start; gap:7px; padding:20px 12px; border:1px dashed var(--line-dark); color:#888}
.mission-empty i{font-size:18px; color:#444}
.mission-empty strong{color:#171717; font-size:12px}
.mission-empty span{max-width:220px; font-size:9px; line-height:1.5}
.mission-card{padding:12px 0; border-top:1px solid var(--line)}
.mission-card:first-child{border-top:0}
.mission-card-top{display:flex; align-items:center; gap:8px; color:#888; font-size:8px; font-variant-numeric:tabular-nums}
.mission-card-top strong{color:#171717; font-size:11px}
.mission-index{display:grid; place-items:center; width:22px; height:22px; border:1px solid var(--line); color:#777; font-size:7px}
.mission-card h3{margin-top:8px; font-size:14px; font-weight:600}
.mission-card p{margin:5px 0 0; color:#777; font-size:9px; line-height:1.45; overflow-wrap:anywhere}
.mission-card .mission-route{color:#444}
.mission-tag{display:inline-block; margin-top:7px; padding:4px 6px; background:#fcf4e8; color:#96621c; font-size:7px; font-weight:700; letter-spacing:.07em}
.mission-card-actions{display:flex; justify-content:flex-end; gap:12px; margin-top:8px}
.mission-card-actions button{padding:4px 0; color:#777; font-size:8px}
.mission-card-actions button:hover{color:#171717}
.mission-card-actions i{margin-right:3px}
.astreinte-print{display:none}
.daily-print{display:none}

/* ---------- AGENCES FUNÉRAIRES ---------- */
.view-af{padding-top:0}
.af-controls{display:grid; grid-template-columns:minmax(220px,1fr) auto; align-items:end; gap:12px 18px; padding:12px 14px; margin-bottom:12px}
.af-search{display:grid; gap:6px; min-width:0}
.af-search-box{display:flex; align-items:center; gap:9px; min-height:38px; padding:0 11px; border:1px solid var(--line); background:#fff}
.af-search-box i{color:#777; font-size:13px}
.af-search-box input{width:100%; min-width:0; border:0; outline:0; color:var(--ink); font:inherit; font-size:11px; background:transparent}
.af-actions{display:flex; align-items:center; justify-content:flex-end; gap:8px}
.af-actions button,.af-detail-actions a{min-height:38px; padding:0 12px; font-size:9px}
.af-status{grid-column:1/-1; margin:0; color:#888; font-size:8px}
.af-workspace{display:grid; grid-template-columns:minmax(270px,.78fr) minmax(0,1.45fr); gap:12px; flex:1 1 auto; min-height:0; padding-bottom:2px}
.af-results,.af-detail{display:flex; flex-direction:column; min-width:0; min-height:0; padding:14px; overflow:hidden}
.af-list{display:flex; flex-direction:column; gap:5px; min-height:0; overflow:auto; margin-top:10px; padding-right:3px}
.af-result{display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; width:100%; min-height:54px; padding:7px 8px; border:1px solid transparent; text-align:left; background:#fff}
.af-result:hover,.af-result.is-selected{border-color:var(--line); background:#f5f5f2}
.af-result.is-selected{box-shadow:inset 2px 0 #171717}
.af-result-icon{display:grid; place-items:center; width:28px; height:28px; border:1px solid var(--line); color:#555; font-size:12px}
.af-result-copy{display:grid; gap:3px; min-width:0}
.af-result-copy strong{overflow:hidden; color:#222; font-size:10px; font-weight:650; text-overflow:ellipsis; white-space:nowrap}
.af-result-copy small{overflow:hidden; color:#888; font-size:8px; text-overflow:ellipsis; white-space:nowrap}
.af-distance{color:#777; font-size:8px; white-space:nowrap}
.af-no-results{padding:14px 4px; color:#777; font-size:10px}
.af-detail{justify-content:flex-start; padding:clamp(18px,4vw,46px); overflow:auto}
.af-empty{max-width:400px; margin:auto; text-align:center}
.af-empty>i{display:block; margin-bottom:18px; color:#777; font-size:26px}
.af-empty h2{margin:8px 0; font-size:22px; font-weight:550; letter-spacing:-.04em}
.af-empty>p:last-child{max-width:330px; margin:8px auto; color:#888; font-size:10px; line-height:1.6}
.af-detail-head{display:flex; align-items:flex-start; justify-content:space-between; gap:15px; padding-bottom:22px; border-bottom:1px solid var(--line)}
.af-detail-head h2{margin:7px 0 4px; font-size:clamp(20px,2.4vw,32px); font-weight:550; letter-spacing:-.045em}
.af-detail-city{margin:0; color:#777; font-size:10px}
.af-info-block{display:grid; gap:9px; padding:20px 0; border-bottom:1px solid var(--line)}
.af-info-block>span{color:#888; font-size:8px; font-weight:700; letter-spacing:.14em}
.af-info-block strong,.af-info-block a{color:#171717; font-size:clamp(13px,1.5vw,17px); font-weight:550; line-height:1.55; text-decoration:none}
.af-info-block a{font-variant-numeric:tabular-nums}
.af-detail-meta{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin-top:14px; color:#888; font-size:8px}
.af-detail-meta i{margin-right:4px; color:#62856d}
.af-detail-actions{display:flex; flex-wrap:wrap; gap:8px; margin-top:22px}
.af-detail-actions .primary,.af-detail-actions .back{display:flex; align-items:center; justify-content:center; gap:7px; text-decoration:none}
.af-detail-actions .back{border:1px solid var(--line-dark); color:#333}
.af-detail-actions .back:hover{background:#f6f6f3}
.af-access{margin-top:20px}
.af-access-heading{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:8px}
.af-access-heading h3{margin:5px 0 0; font-size:15px; font-weight:550; letter-spacing:-.025em}
.af-source-tag{display:inline-flex; align-items:center; gap:3px; padding:5px 7px; border:1px solid var(--line); color:#777; font-size:8px; white-space:nowrap}
.af-detail .af-access-list{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; margin:0; border-top:1px solid var(--line)}
.af-access-row{display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; min-height:38px; padding:7px 0; border-bottom:1px solid var(--line)}
.af-access-row>span{overflow-wrap:anywhere; color:#666; font-size:9px; line-height:1.3}
.af-access-row strong{flex:0 0 auto; padding:4px 6px; border:1px solid #d8d8d2; background:#fafaf8; font-size:10px; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:.035em}
.af-access-row em{display:inline-flex; align-items:center; gap:4px; color:#777; font-size:9px; font-style:normal}
.af-key-note{display:flex; align-items:center; gap:9px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:#666; font-size:9px}
.af-key-note i{font-size:13px}
.af-code{display:grid; place-items:center; min-width:48px; min-height:30px; padding:0 8px; border:1px solid #171717; font-size:11px; font-variant-numeric:tabular-nums; font-weight:700}
.af-profile-note{margin:8px 0 2px; color:#888; font-size:8px; line-height:1.45}
.af-contact{display:grid; gap:0; margin:14px 0 17px; border-top:1px solid var(--line)}
.af-contact>div{display:grid; grid-template-columns:82px minmax(0,1fr); gap:10px; align-items:start; padding:10px 0; border-bottom:1px solid var(--line)}
.af-contact span,.af-access-head>span{color:#888; font-size:7px; font-weight:700; letter-spacing:.12em}
.af-contact strong,.af-contact a{font-size:10px; font-weight:550; line-height:1.55; text-decoration:none; color:#171717}
.af-contact a{font-variant-numeric:tabular-nums}
.af-access-head{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:4px}
.af-access-list{margin:0}
.af-access-list>div{display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:34px; padding:7px 0; border-bottom:1px solid var(--line)}
.af-access-list dt{color:#666; font-size:9px}
.af-access-list dd{margin:0; font-size:10px; font-weight:650; font-variant-numeric:tabular-nums; letter-spacing:.02em}
.af-map-links{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:auto; padding-top:14px}
.af-map-links a{display:flex; align-items:center; justify-content:center; gap:6px; min-height:35px; padding:7px 8px; border:1px solid var(--line-dark); color:#333; font-size:8px; text-decoration:none; white-space:nowrap}
.af-profile .panel-head h2{margin-top:5px}

/* ---------- DIALOG ---------- */
.setup{
  width:min(440px,calc(100% - 24px)); padding:0;
  border:1px solid #dcdcd7; background:#fff; color:#171717;
}
.setup::backdrop{background:rgba(0,0,0,.24)}
.dialog-close{display:flex; justify-content:flex-end; padding:10px 10px 0}
.close{font-size:20px}
.dialog-body{padding:8px 24px 22px}
.dialog-body h2{margin:8px 0 10px; font-size:24px; font-weight:550; letter-spacing:-.05em}
.dialog-body h2 span{color:#aaa}
.dialog-intro{margin:0; color:#777; font-size:10px; line-height:1.55}
.dialog-body label{display:block; margin:14px 0 6px; font-size:10px; font-weight:650}
.dialog-body input{width:100%; padding:10px; border:1px solid var(--line-dark); background:#fff; color:#111; font-size:11px}
.secret-field{position:relative;display:flex;align-items:center}
.dialog-body .secret-field input{padding-right:44px}
.reveal-url{position:absolute;right:4px;display:grid;place-items:center;width:34px;height:32px;border-radius:6px;color:#777}
.reveal-url:hover{background:var(--soft);color:var(--ink)}
.dialog-body input:focus{outline:1px solid #111; outline-offset:0}
.help{margin:6px 0 0; color:#777; font-size:9px; line-height:1.55}
.dialog-actions{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px}
.dialog-actions .primary{min-width:130px}
.server-login{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.server-login .eyebrow{margin:0;font-size:8px;letter-spacing:.12em}
.server-login .dialog-actions{margin-top:10px}
.server-login button:disabled{opacity:.45;cursor:not-allowed}
:root[data-theme="dark"] .server-login{border-color:#333}
.theme-setting{display:flex; align-items:center; justify-content:space-between; gap:14px; margin:18px 0 4px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.theme-setting strong,.theme-setting small{display:block}
.theme-setting strong{font-size:11px}
.theme-setting small{margin-top:3px; color:var(--muted); font-size:9px}
.theme-switch{position:relative; width:42px; height:24px; padding:3px; border:1px solid #bdbdb7; border-radius:99px; background:#e8e8e4; transition:background .18s,border-color .18s}
.theme-switch span{display:block; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0003; transition:transform .18s}
.theme-switch[aria-checked="true"]{border-color:#777; background:#333}
.theme-switch[aria-checked="true"] span{transform:translateX(17px)}

/* ---------- TOAST ---------- */
.toast{
  position:fixed; right:18px; bottom:18px; z-index:20;
  max-width:min(340px,calc(100vw - 28px)); padding:10px 13px;
  border:1px solid #222; background:#fff; color:#171717; font-size:11px;
  opacity:0; transform:translateY(6px); pointer-events:none;
  transition:opacity .18s, transform .18s;
}
.toast.show{opacity:1; transform:translateY(0)}

/* =========================================================
   RESPONSIVE — iPad mini paysage ≈ 1133×744
   ========================================================= */

/* Petits iPad / tablette portrait : sidebar un peu plus étroite */
@media (max-width: 1000px){
  :root{ --side:188px; }
  .view, .top{ padding-left:20px; padding-right:20px; }
  .agenda-grid{ grid-template-columns:minmax(0,1.45fr) minmax(210px,.9fr); }
  .card strong{ font-size:20px; }
}

@media (max-width: 850px) and (min-width: 721px){
  .vehicle-layout{grid-template-columns:1fr; overflow:auto}
  .vehicle-entry{min-height:330px}
  .vehicle-log{min-height:390px}
  .vehicle-entry .tool-actions{margin-top:14px}
  .astreinte-layout{grid-template-columns:1fr; overflow:auto}
  .astreinte-main{overflow:visible}
  .astreinte-editor{overflow:visible}
  .astreinte-log{min-height:300px}
  .af-workspace{grid-template-columns:1fr; overflow:auto}
  .af-results{max-height:42vh; min-height:220px}
  .af-detail{min-height:340px}
  .af-controls{grid-template-columns:1fr}
  .af-actions{justify-content:flex-start; flex-wrap:wrap}
}

/* iPad mini : garder le panneau synchro entièrement visible dans la hauteur utile */
@media (max-height: 850px) and (min-width: 721px){
  .view-head{padding-top:14px; padding-bottom:10px}
  .view-head .stamp{width:76px; height:76px; flex-basis:76px}
  .stamp strong{font-size:29px}
  .rail-head{padding-top:10px; padding-bottom:8px}
  .day-tile{min-height:76px; padding:8px 10px 7px}
  .tile-date{margin-top:7px; font-size:23px}
  .agenda-grid{gap:10px; padding-top:10px}
  .metric,.next,.sync-panel{padding:9px 11px}
  .metric-line{margin:8px 0 6px}
  .metric-line strong{font-size:32px}
  .next h3{margin:8px 0 4px}
  .sync-panel p{margin:5px 0; line-height:1.35}
  .sync-row{padding:5px 0}
  .sync-panel .outline-btn{margin-top:5px; padding:6px 8px}
}

/* Très petits écrans (téléphone) : on simplifie mais on ne casse pas la logique */
@media (max-width: 720px){
  :root{ --side:0px; }
  .app{ grid-template-columns:1fr; }
  .side{top:max(8px, env(safe-area-inset-top)); bottom:max(8px, env(safe-area-inset-bottom)); left:8px; width:min(280px, calc(100vw - 16px)); padding:16px 12px 12px}
  .side .nav{gap:5px}
  .side .nav-btn{min-height:44px}
  .top{padding-left:12px; padding-right:12px}
  .top-left{gap:9px}
  .dock-toggle{width:34px; height:34px; flex-basis:34px}
  .top-right{gap:7px}
  .sync{font-size:8px}
  .view, .top{ padding-left:14px; padding-right:14px; }
  .view-home{overflow:auto}
  .shelf{ grid-template-columns:1fr; grid-template-rows:repeat(5, minmax(96px, auto)); flex:0 0 auto; }
  .card{ min-height:96px; padding:16px 18px; }
  .card-top{ top:12px; left:18px; right:18px; }
  .agenda-grid{ grid-template-columns:1fr; overflow:auto; }
  .side-col{ grid-template-columns:1fr; }
  .view-head .stamp{ display:none; }
  .dispo-item{ grid-template-columns:1fr; gap:4px; }
  .dispo-grid.is-static{grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px}
  .dispo-grid.is-static .dcard{min-width:0; padding:10px}
  .dispo-loop-set{gap:12px}
  .vehicle-layout{grid-template-columns:1fr; overflow:auto}
  .vehicle-entry{min-height:330px}
  .vehicle-log{min-height:390px}
  .vehicle-entry .tool-actions{margin-top:14px}
  .date-lbl input{ width:130px; }
  .view-astreinte{overflow:auto}
  .view-af{overflow:auto}
  .view-af .view-head{align-items:flex-start}
  .af-workspace{grid-template-columns:1fr; flex:0 0 auto; min-height:auto; overflow:visible}
  .af-results{max-height:44vh; min-height:230px}
  .af-detail{min-height:360px}
  .af-controls{grid-template-columns:1fr}
  .af-actions{justify-content:flex-start; flex-wrap:wrap}
  .view-astreinte .view-head{align-items:flex-start; flex-wrap:wrap}
  .astreinte-tools{justify-content:flex-start; width:100%}
  .astreinte-layout{grid-template-columns:1fr; overflow:visible; min-height:auto}
  .astreinte-main{overflow:visible}
  .astreinte-log{min-height:280px; max-height:52vh}
  .astreinte-form{grid-template-columns:1fr}
  .astreinte-form .f.full{grid-column:auto}
  .astreinte-meta-form{grid-template-columns:1fr 1fr}
  .astreinte-meta-form .f.full{grid-column:1/-1}
}

@media print{
  @page{size:A4 landscape; margin:12mm}
  html,body{width:auto; height:auto; overflow:visible; background:#fff!important; color:#111!important}
  body *{visibility:hidden!important}
  #astreintePrint,#astreintePrint *{visibility:visible!important}
  #astreintePrint{display:block!important; position:absolute; inset:0 auto auto 0; width:100%; color:#111; font:9pt Arial,sans-serif}
  .print-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; padding-bottom:10px; border-bottom:2px solid #171717}
  .print-head p{margin:0 0 5px; color:#666; font-size:8pt; font-weight:bold; letter-spacing:.14em}
  .print-head h1{margin:0 0 4px; font-size:22pt; font-weight:600; letter-spacing:-.04em}
  .print-head span{font-size:9pt; color:#555; text-transform:capitalize}
  .print-person{min-width:190px; padding:8px 10px; border:1px solid #bbb}
  .print-person small,.print-signatures span{display:block; margin-bottom:5px; color:#666; font-size:7pt; font-weight:bold; letter-spacing:.1em}
  .print-person strong{font-size:11pt}
  #astreintePrint table{width:100%; border-collapse:collapse; table-layout:fixed}
  #astreintePrint th,#astreintePrint td{padding:6px 5px; border:1px solid #aaa; text-align:left; vertical-align:top; overflow-wrap:anywhere}
  #astreintePrint th{background:#f0f0ee; font-size:7pt; line-height:1.3}
  #astreintePrint td{font-size:7.5pt; line-height:1.35}
  #astreintePrint th:nth-child(1){width:7%} #astreintePrint th:nth-child(2){width:8%} #astreintePrint th:nth-child(3){width:9%} #astreintePrint th:nth-child(4){width:13%} #astreintePrint th:nth-child(5){width:13%} #astreintePrint th:nth-child(6){width:11%} #astreintePrint th:nth-child(7){width:12%} #astreintePrint th:nth-child(8){width:5%} #astreintePrint th:nth-child(9){width:10%} #astreintePrint th:nth-child(10){width:12%}
  .print-empty{text-align:center!important; color:#777}
  .print-signatures{display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:15px}
  .print-signatures div{min-height:54px; padding:7px 8px; border:1px solid #aaa}
  .print-signatures strong{font-size:9pt}
  .print-legend{margin-top:9px; color:#555; font-size:7pt}
  body.printing-daily *{visibility:hidden!important}
  body.printing-daily #astreintePrint,body.printing-daily #astreintePrint *{visibility:hidden!important}
  body.printing-daily #dailyPrint,body.printing-daily #dailyPrint *{visibility:visible!important}
  body.printing-daily #dailyPrint{display:block!important;position:absolute;inset:0 auto auto 0;width:100%;color:#111;font:9pt Arial,sans-serif}
  #dailyPrint .print-head{margin-bottom:10px}
  #dailyPrint .daily-print-meta{display:grid;gap:4px;min-width:150px;padding:8px 10px;border:1px solid #bbb;text-align:right}
  #dailyPrint .daily-print-meta small{color:#666;font-size:7pt;font-weight:bold;letter-spacing:.1em}
  #dailyPrint .daily-print-meta strong{font-size:9pt}
  #dailyPrint section{margin:12px 0;break-inside:avoid}
  #dailyPrint h2{margin:0 0 6px;font-size:11pt;font-weight:700}
  #dailyPrint p{margin:4px 0;font-size:9pt}
  #dailyPrint table{width:100%;border-collapse:collapse;table-layout:auto}
  #dailyPrint th,#dailyPrint td{padding:5px 6px;border:1px solid #aaa;text-align:left;vertical-align:top;overflow-wrap:anywhere}
  #dailyPrint th{background:#f0f0ee;font-size:7.5pt}
  #dailyPrint td{font-size:8pt;line-height:1.3}
  #dailyPrint .daily-ticket-list{display:flex;flex-wrap:wrap;gap:10px}
  #dailyPrint .daily-ticket{display:grid;grid-template-columns:24mm 1fr;align-items:center;gap:8px;max-width:100mm;margin:0;padding:6px;border:1px solid #bbb;break-inside:avoid}
  #dailyPrint .daily-ticket img{width:24mm;height:20mm;object-fit:cover}
  #dailyPrint .daily-ticket figcaption{font-size:7pt;line-height:1.35}
  #dailyPrint .daily-print-foot{margin-top:14px;padding-top:7px;border-top:1px solid #aaa;color:#555;font-size:7pt}
}

/* Réduction des animations pour accessibilité */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ transition:none!important; animation:none!important; }
}

/* Mode nuit réellement global : surfaces noires, textes blancs, contrôles assortis */
:root[data-theme="dark"]{--ink:#f5f5f5;--muted:#aaa;--soft:#202020;--line:#333;--line-dark:#505050;color-scheme:dark;background:#050505;color:#f5f5f5}
:root[data-theme="dark"] body,:root[data-theme="dark"] .app,:root[data-theme="dark"] .main,:root[data-theme="dark"] .view{background:#050505;color:#f5f5f5}
:root[data-theme="dark"] .app *{border-color:#333}
:root[data-theme="dark"] .app :is(p,span,strong,small,em,b,label,dt,dd,h1,h2,h3,h4,button,a,i){color:#f2f2f2}
:root[data-theme="dark"] .side,:root[data-theme="dark"] .top,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .card,:root[data-theme="dark"] .day-tile,:root[data-theme="dark"] .dcard,:root[data-theme="dark"] .vehicle-entry,:root[data-theme="dark"] .vehicle-log,:root[data-theme="dark"] .astreinte-editor,:root[data-theme="dark"] .astreinte-log,:root[data-theme="dark"] .af-results,:root[data-theme="dark"] .af-detail,:root[data-theme="dark"] .af-result,:root[data-theme="dark"] .rest-ico,:root[data-theme="dark"] .tool-ico,:root[data-theme="dark"] .summary{background:#111;color:#f5f5f5;border-color:#333}
:root[data-theme="dark"] .nav-btn.is-active,:root[data-theme="dark"] .day-tile.active,:root[data-theme="dark"] .dcard.is-you,:root[data-theme="dark"] .vehicle-table-head,:root[data-theme="dark"] .capture-btn,:root[data-theme="dark"] .local-save-note,:root[data-theme="dark"] .af-result:hover,:root[data-theme="dark"] .af-result.is-selected,:root[data-theme="dark"] .nav-btn:hover,:root[data-theme="dark"] .card:hover,:root[data-theme="dark"] .day-tile:hover{background:#242424;color:#fff}
:root[data-theme="dark"] .card::before{background:#f5f5f5}
:root[data-theme="dark"] .micro span,:root[data-theme="dark"] .tile-dot{background:#444}
:root[data-theme="dark"] .micro span.filled,:root[data-theme="dark"] .day-tile.active .tile-dot{background:#fff}
:root[data-theme="dark"] .setup,:root[data-theme="dark"] .dialog-body input,:root[data-theme="dark"] .af-search-box,:root[data-theme="dark"] input,:root[data-theme="dark"] textarea,:root[data-theme="dark"] select,:root[data-theme="dark"] .capture-input,:root[data-theme="dark"] .mission-input{background:#0b0b0b!important;color:#fff!important;border-color:#484848!important;color-scheme:dark}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#888!important}
:root[data-theme="dark"] input:disabled,:root[data-theme="dark"] input:read-only,:root[data-theme="dark"] select:disabled{background:#1b1b1b!important;color:#aaa!important}
:root[data-theme="dark"] .setup::backdrop{background:#000c}
:root[data-theme="dark"] .auth-curtain{background:rgba(0,0,0,.78)}
:root[data-theme="dark"] .auth-card{background:#111;color:#f2f2f0;border-color:#333}
:root[data-theme="dark"] .auth-lock{border-color:#444}
:root[data-theme="dark"] .auth-card p:not(.eyebrow){color:#aaa}
:root[data-theme="dark"] .primary{background:#f2f2f2;color:#080808;border-color:#f2f2f2}
:root[data-theme="dark"] .primary:hover{background:#d8d8d8;color:#000}
:root[data-theme="dark"] .outline-btn,:root[data-theme="dark"] .back,:root[data-theme="dark"] .access-code,:root[data-theme="dark"] .af-map-links a,:root[data-theme="dark"] .icon-btn{background:#111;color:#fff;border-color:#555}
:root[data-theme="dark"] .toast{background:#111;color:#fff;border-color:#555}
:root[data-theme="dark"] .crumb,:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .panel-foot,:root[data-theme="dark"] .dialog-intro,:root[data-theme="dark"] .help,:root[data-theme="dark"] .af-access-list dt,:root[data-theme="dark"] .idx,:root[data-theme="dark"] .af-status,:root[data-theme="dark"] .tool-intro,:root[data-theme="dark"] .save-status,:root[data-theme="dark"] .mission-card p,:root[data-theme="dark"] .af-distance{color:#aaa!important}
:root[data-theme="dark"] .dcard-state.status-soon,:root[data-theme="dark"] .status-soon .dcard-state{color:#f2b45e!important}
:root[data-theme="dark"] .status-off .dcard-state{color:#f18c86!important}
:root[data-theme="dark"] .theme-switch{background:#333}
:root[data-theme="dark"] .theme-switch span{background:#f2d47a}
:root[data-theme="dark"] .shift-box,:root[data-theme="dark"] .rest-pill,:root[data-theme="dark"] .af-result-icon,:root[data-theme="dark"] .af-access-row strong,:root[data-theme="dark"] .mission-empty,:root[data-theme="dark"] .mission-index{background:#111;color:#f2f2f2;border-color:#444}
:root[data-theme="dark"] .requisition-fields,:root[data-theme="dark"] .mission-tag{background:#1a1a1a;color:#f2f2f2;border-color:#444}
:root[data-theme="dark"] .dcard-night,:root[data-theme="dark"] .dcard-last,:root[data-theme="dark"] .dcard-hours,:root[data-theme="dark"] .tile-wd,:root[data-theme="dark"] .tile-mo,:root[data-theme="dark"] .tile-bottom,:root[data-theme="dark"] .shift-time,:root[data-theme="dark"] .rest p,:root[data-theme="dark"] .f,:root[data-theme="dark"] .date-lbl,:root[data-theme="dark"] .vehicle-empty,:root[data-theme="dark"] .vehicle-trip-row small,:root[data-theme="dark"] .astreinte-hint,:root[data-theme="dark"] .geocode-credit,:root[data-theme="dark"] .mission-card-top,:root[data-theme="dark"] .mission-card .mission-route,:root[data-theme="dark"] .mission-card-actions button,:root[data-theme="dark"] .af-result-copy small,:root[data-theme="dark"] .af-detail-city,:root[data-theme="dark"] .af-info-block>span,:root[data-theme="dark"] .af-contact span,:root[data-theme="dark"] .af-access-row>span,:root[data-theme="dark"] .af-key-note{color:#aaa!important}
:root[data-theme="dark"] .dcard-state:not(.status-soon):not(.status-off){color:#d5eadb!important}
:root[data-theme="dark"] .status-soon .dcard-state{color:#f2b45e!important}
:root[data-theme="dark"] .status-off .dcard-state{color:#f18c86!important}
:root[data-theme="dark"] ::selection{background:#fff;color:#000}

/* ---------- INTERFACE TERRAIN · PREMIUM SOBRE ---------- */
:root{--ink:#151515;--muted:#737373;--line:#e7e7e5;--line-dark:#d2d2cf;--soft:#f5f5f3}
button{touch-action:manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #777;outline-offset:2px}
.top{height:58px;flex-basis:58px;padding-inline:clamp(16px,3vw,38px)}
.top-left{display:flex;align-items:center;gap:13px}
.dock-toggle{flex:0 0 42px}
.crumb{font-size:9px;letter-spacing:.14em}
.icon-btn{width:42px;height:42px;border-radius:10px;font-size:16px}
.side{border-radius:18px;box-shadow:0 24px 70px #0002}
.brand-mark{border-radius:9px}
.nav-btn{min-height:46px;border-radius:10px;font-size:13px}
.nav-btn i{font-size:16px}
.view{padding-inline:clamp(16px,3vw,42px);padding-bottom:24px}

/* AF : adresse à gauche, appel rapide à droite */
.af-detail-body{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px}
.af-detail-body .af-info-block{min-width:0;padding:17px 0;border-bottom:1px solid var(--line)}
.af-phone-link{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:0 15px;border:1px solid #171717;border-radius:11px;background:#171717;color:#fff;text-decoration:none;font-size:clamp(12px,1.3vw,15px);font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;transition:background .18s ease,color .18s ease}
.af-phone-link i{font-size:14px}
.af-phone-link:hover{background:#333;color:#fff}
:root[data-theme="dark"] .af-phone-link,:root[data-theme="dark"] .af-phone-link span,:root[data-theme="dark"] .af-phone-link i{background:#f2f2f2;color:#080808;border-color:#f2f2f2}
:root[data-theme="dark"] .af-phone-link:hover{background:#d8d8d8;color:#000}
@media(max-width:560px){.af-detail-body{gap:9px}.af-phone-link{gap:6px;min-height:42px;padding-inline:10px;font-size:11px}.af-detail-body .af-info-block{padding-block:14px}}
.view-home{gap:0;padding-top:clamp(20px,4vh,42px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.home-dashboard-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.58fr);align-items:stretch;gap:clamp(18px,4vw,54px);margin-bottom:clamp(24px,4vh,42px)}
.home-title{display:flex;flex-direction:column;justify-content:center;margin:0;min-height:150px}
.home-title .eyebrow{display:flex;align-items:center;gap:12px;margin-bottom:15px}
.home-title h1{font-size:clamp(36px,5vw,62px);font-weight:570;letter-spacing:-.065em}
.home-title h1 span{color:#aaa}
.home-subtitle{margin:12px 0 0;color:#777;font-size:14px;text-transform:capitalize}
.home-live{display:inline-flex;align-items:center;gap:6px;color:#777;font-size:8px;letter-spacing:.12em}
.home-live i{width:7px;height:7px;border-radius:50%;background:#222}
.today-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:158px;padding:22px 24px;border:1px solid #dededb;border-radius:16px;background:#f7f7f5}
.today-card-label{display:flex;align-items:center;gap:8px;color:#777;font-size:9px;font-weight:700;letter-spacing:.14em}
.today-card-label i{font-size:15px;color:#222}
.today-card>strong{margin-top:15px;font-size:clamp(21px,2.4vw,29px);font-weight:570;letter-spacing:-.05em;line-height:1.08}
.today-card>span{margin-top:6px;color:#777;font-size:12px}
.today-link{display:inline-flex;align-items:center;gap:9px;min-height:42px;margin-top:14px;padding:0;color:#222;font-size:12px;font-weight:650}
.today-link i{transition:transform .18s}
.today-link:hover i{transform:translateX(3px)}
.quick-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.quick-heading .eyebrow{margin-bottom:5px}
.quick-heading h2{font-size:20px;font-weight:570;letter-spacing:-.045em}
.quick-heading>span{padding-bottom:2px;color:#888;font-size:11px}
.quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:clamp(24px,4vh,40px)}
.quick-card{position:relative;display:flex;align-items:center;gap:14px;min-height:88px;padding:16px;border:1px solid #dededb;border-radius:14px;background:#fff;text-align:left;transition:transform .16s,border-color .16s,background .16s}
.quick-card:hover{transform:translateY(-2px);border-color:#888;background:#fafaf9}
.quick-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid #e5e5e2;border-radius:12px;background:#f6f6f4;font-size:18px}
.quick-card>span:nth-child(2){display:grid;gap:5px;padding-right:18px}
.quick-card strong{font-size:14px;font-weight:650;letter-spacing:-.02em}
.quick-card small{color:#777;font-size:11px;line-height:1.35}
.quick-arrow{position:absolute;top:15px;right:15px;color:#888;font-size:13px}
.quick-primary{border-color:#191919;background:#191919;color:#fff}
.quick-primary .quick-icon{border-color:#555;background:#292929;color:#fff}
.quick-primary small,.quick-primary .quick-arrow{color:#c8c8c8}
.quick-primary:hover{border-color:#333;background:#292929}
.module-heading{margin-bottom:12px}
.shelf{flex:0 0 auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto;gap:10px;margin-bottom:8px}
.card{min-height:128px;padding:17px 18px;border-color:#e2e2df;border-radius:13px}
.card-top{top:13px;left:17px;right:17px}
.card-top i{font-size:17px}
.card-top em{font-style:normal;font-weight:650;font-size:8px;letter-spacing:.12em}
.card strong{font-size:17px;font-weight:620}
.card small{font-size:11px}
.card-arrow{right:16px;bottom:15px;color:#777;font-size:15px}
.card:hover,.card:focus-visible{border-color:#888;background:#fafaf9}
.view-head{padding-top:18px}
.view-head .stamp{border-radius:14px}
.panel,.dcard,.vehicle-entry,.astreinte-editor,.astreinte-log,.af-results,.af-detail{border-radius:12px}
.day-tile{min-height:98px;padding:12px 14px;transition:background .16s}
.day-tile.active{box-shadow:inset 0 3px #171717}
.txt-btn,.outline-btn,.primary,.back,.capture-btn,.tool-actions button{min-height:42px}
.primary,.back{border-radius:9px;padding:0 15px}
.f input,.f select,.f textarea,.date-lbl input{min-height:46px;border-radius:9px;padding-inline:12px}
.capture-btn{border-radius:9px}
.toast{border-radius:12px;box-shadow:0 12px 40px #0002}

@media(max-width:900px){
  .home-dashboard-head{grid-template-columns:minmax(0,1fr) minmax(245px,.8fr);gap:16px}
  .quick-actions{gap:8px}
  .quick-card{gap:10px;padding:13px}
  .quick-icon{flex-basis:38px;width:38px;height:38px}
}
@media(max-width:720px){
  .top{flex-basis:52px;height:52px;padding-inline:15px}
  .view-home{padding-top:18px}
  .home-dashboard-head{grid-template-columns:1fr;gap:15px;margin-bottom:23px}
  .home-title{min-height:0}
  .home-title h1{font-size:clamp(35px,9vw,48px)}
  .home-title .eyebrow{margin-bottom:12px}
  .today-card{min-height:148px;padding:18px;border-radius:13px}
  .today-card>strong{margin-top:12px}
  .quick-heading h2{font-size:18px}
  .quick-heading>span{font-size:10px}
  .quick-actions{grid-template-columns:1fr;gap:8px;margin-bottom:25px}
  .quick-card{min-height:72px;padding:11px 13px;border-radius:12px}
  .quick-icon{width:40px;height:40px;flex-basis:40px}
  .quick-card strong{font-size:13px}
  .quick-card small{font-size:10px}
  .shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .card{min-height:120px;padding:14px}
  .card-top{left:14px;right:14px;top:12px}
  .card strong{font-size:15px}
  .card small{max-width:85%;font-size:10px}
}
@media(max-height:740px) and (min-width:721px){
  .view-home{padding-top:14px}
  .home-dashboard-head{margin-bottom:15px}
  .home-title{min-height:122px}
  .today-card{min-height:128px;padding:15px 20px}
  .today-card>strong{margin-top:9px;font-size:23px}
  .today-link{min-height:34px;margin-top:7px}
  .quick-actions{margin-bottom:17px}
  .quick-card{min-height:72px}
  .card{min-height:108px}
}

/* ---------- Refonte terrain · monochrome premium ---------- */
:root{--ink:#171717;--muted:#737373;--soft:#f4f4f2;--line:#e4e4e1;--line-dark:#c6c6c1;--side:218px;color-scheme:light}
html,body{background:#f7f7f5;color:#171717;touch-action:pan-x pan-y}
.app{grid-template-columns:var(--side) minmax(0,1fr);background:#f7f7f5}
.side{position:relative;inset:auto;z-index:1;transform:none;visibility:visible;opacity:1;width:auto;height:100dvh;padding:24px 16px 18px;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none;background:#fff}
.side .brand{padding:0 7px 24px}.brand-mark{border-radius:9px;background:#171717;color:#fff;border-color:#171717;font-size:21px}
.side .nav{gap:5px;margin-top:22px}.side .nav-btn{min-height:46px;padding:0 12px;border-radius:10px;font-size:13px}.side .nav-btn i{font-size:17px;width:20px;color:#696969}.side .nav-btn.is-active{background:#171717;border-color:#171717;color:#fff}.side .nav-btn.is-active i{color:#fff}
.side .status{padding:14px 8px}.side .dot{width:8px;height:8px;border-radius:50%;background:#171717}
.main{min-width:0;background:#f7f7f5}.top{flex-basis:58px;padding:0 30px;background:#fff;border-bottom:1px solid var(--line)}.dock-toggle{display:none}.crumb{font-size:10px;letter-spacing:.14em}.icon-btn{width:40px;height:40px;border-radius:11px;background:#fff}
.view{padding:0 30px 28px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.view-home{padding-top:clamp(22px,4vh,44px);gap:0}.home-dashboard-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.65fr);align-items:stretch;gap:18px;margin-bottom:24px}.home-title{margin:0;padding:18px 4px}.home-title .eyebrow{margin-bottom:12px}.home-title h1{font-size:clamp(34px,4vw,48px);letter-spacing:-.055em}.home-title h1 span,h1 span{color:#aaa}.home-subtitle{margin:12px 0 0;color:#737373;font-size:14px}
.today-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:160px;padding:22px 24px;border:1px solid #1d1d1d;border-radius:16px;background:#1b1b1b;color:white}.today-card-label{font-size:9px;letter-spacing:.14em;color:#c5c5c5}.today-card-label i{margin-right:7px}.today-card>strong{margin-top:16px;font-size:22px;font-weight:550;letter-spacing:-.04em}.today-card>span{margin-top:5px;color:#b8b8b8;font-size:12px}.today-link{margin-top:17px;padding:0;color:#fff;font-size:12px}.today-link i{margin-left:6px}
.quick-heading{display:flex;align-items:flex-end;justify-content:space-between;margin:4px 0 12px}.quick-heading .eyebrow{margin-bottom:5px}.quick-heading h2{font-size:18px}.quick-heading>span{color:#858585;font-size:11px}.quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.quick-card{display:flex;align-items:center;gap:13px;min-height:86px;padding:15px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;transition:transform .15s,border-color .15s,background .15s}.quick-card:active{transform:scale(.985)}.quick-card:hover{border-color:#999;background:#fbfbfa}.quick-card.quick-primary{background:#ededeb;border-color:#dcdcd9}.quick-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:12px;background:#f0f0ee;font-size:17px}.quick-card.quick-primary .quick-icon{background:#171717;color:white}.quick-card strong{display:block;font-size:13px;font-weight:650}.quick-card small{display:block;margin-top:4px;color:#777;font-size:10px}.quick-arrow{margin-left:auto;color:#888}
.module-heading{margin-top:25px}.shelf{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(116px,1fr));gap:10px;flex:0 0 auto}.card{justify-content:flex-end;min-height:116px;padding:14px 16px;border-radius:13px;border-color:var(--line);background:#fff}.card::before{display:none}.card-top{top:13px;left:16px;right:16px}.card-top i{font-size:17px}.card-top em{font-style:normal}.card strong{font-size:17px}.card small{font-size:10px}.card-arrow{right:14px;bottom:14px;font-size:14px}
.view-head{padding:20px 0 16px}.view-head h1{font-size:clamp(28px,3vw,38px)}.stamp{border-radius:14px;background:white}.panel,.card,.day-tile,.dcard,.vehicle-entry,.vehicle-log,.astreinte-editor,.astreinte-log,.af-results,.af-detail{border-radius:14px}.panel{background:#fff}
/* Véhicule: action de saisie toujours dans le premier écran, justificatif juste dessous. */
.view-tool#vehicleView{gap:14px}.view-tool#vehicleView .view-head{padding-top:14px;padding-bottom:12px}.view-tool#vehicleView .view-head h1{font-size:30px}.vehicle-layout{grid-template-columns:minmax(300px,.86fr) minmax(0,1.14fr);gap:12px;min-height:340px;flex:0 0 min(44vh,380px);overflow:visible}.vehicle-entry,.vehicle-log{padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}.vehicle-entry .tool-head{gap:12px}.vehicle-entry .tool-ico{width:42px;height:42px;border-radius:12px;background:#f0f0ee}.vehicle-entry .tool-head h2{font-size:17px}.vehicle-entry .tool-intro{margin:11px 0 14px;font-size:11px;line-height:1.45;color:#777}.vehicle-form{gap:10px}.vehicle-form .f{font-size:9px;letter-spacing:.08em}.vehicle-form input{height:48px;padding:0 13px;border:1px solid #dededb;border-radius:10px;background:#fff;font-size:18px;letter-spacing:.02em}.vehicle-form input:focus{border-color:#171717;outline:2px solid #17171722}.vehicle-entry .summary{margin-top:12px;padding:11px 13px;border-radius:11px;background:#f5f5f3}.vehicle-entry .summary strong{font-size:22px}.vehicle-entry .summary p{margin-top:4px;font-size:10px}.vehicle-entry .tool-actions{padding-top:12px}.vehicle-entry .primary{min-height:46px;border-radius:11px;background:#171717;font-size:12px}.vehicle-log-head h2{font-size:16px}.vehicle-log .day-tile{border-radius:10px}.vehicle-rail .day-tile{min-height:62px}
.fuel-section{flex:0 0 auto;margin-bottom:12px;padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:#fff}.fuel-section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:12px}.fuel-section-head .eyebrow{margin-bottom:5px}.fuel-section-head h2{font-size:16px}.fuel-date{color:#777;font-size:11px}.fuel-dropzone{display:flex;align-items:center;gap:12px;width:100%;min-height:68px;padding:10px 14px;border:1px dashed #c9c9c5;border-radius:12px;background:#fafaf9;text-align:left;transition:background .15s,border-color .15s}.fuel-dropzone.is-dragging,.fuel-dropzone:active{border-color:#171717;background:#efefed}.fuel-camera{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:11px;background:#171717;color:white;font-size:17px}.fuel-dropzone strong{display:block;font-size:12px}.fuel-dropzone small{display:block;margin-top:4px;color:#777;font-size:10px}.fuel-add{margin-left:auto;font-size:18px}.fuel-tickets{display:flex;gap:10px;overflow-x:auto;padding-top:10px}.fuel-ticket{position:relative;display:flex;align-items:center;gap:9px;flex:0 0 190px;min-height:64px;padding:7px;border:1px solid var(--line);border-radius:11px;background:white}.fuel-ticket img{width:48px;height:48px;object-fit:cover;border-radius:7px;background:#eee}.fuel-ticket strong,.fuel-ticket small{display:block}.fuel-ticket strong{font-size:10px}.fuel-ticket small{margin-top:4px;color:#777;font-size:9px}.fuel-delete{display:grid;place-items:center;width:32px;height:36px;margin-left:auto;border-radius:8px;color:#777}.fuel-delete:hover{background:#f0f0ee;color:#171717}.fuel-error{color:#777}
@media(min-width:760px) and (orientation:landscape){.dock-toggle{display:none}.side{width:auto}.view-home{overflow:auto}.view-tool#vehicleView .vehicle-layout{flex-basis:min(44vh,380px)}}
@media(max-width:900px){:root{--side:190px}.view{padding-left:20px;padding-right:20px}.top{padding-left:20px;padding-right:20px}.quick-card{padding:12px;gap:9px}.quick-icon{flex-basis:36px;height:36px}}
@media(max-width:700px){.app{grid-template-columns:1fr}.side{position:fixed;inset:10px auto 10px 10px;z-index:60;width:min(250px,calc(100vw - 20px));height:auto;padding:20px 14px;border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 48px #0002;transform:translateX(calc(-100% - 20px));visibility:hidden;opacity:0;transition:transform .22s,opacity .2s,visibility .22s}.side.is-open{transform:translateX(0);visibility:visible;opacity:1}.dock-toggle{display:grid}.view{padding-left:16px;padding-right:16px}.top{padding:0 16px}.home-dashboard-head{grid-template-columns:1fr}.today-card{min-height:140px}.quick-actions{grid-template-columns:1fr}.quick-card{min-height:72px}.shelf{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto}.card{min-height:115px}.vehicle-layout{grid-template-columns:1fr;flex-basis:auto!important;overflow:visible}.vehicle-entry{min-height:0}.vehicle-log{min-height:340px}.fuel-section{margin-bottom:18px}}
@media(max-width:420px){.home-title h1{font-size:34px}.quick-heading>span{display:none}.shelf{gap:8px}.card{padding:12px}.card strong{font-size:15px}.card small{font-size:9px}}
@media(max-width:760px){.badge-layout{grid-template-columns:1fr;overflow:auto}.badge-entry,.badge-history{min-height:280px}.badge-action{min-height:50px}}
.quick-card.quick-primary{color:#171717}.quick-card.quick-primary strong{color:#171717}.quick-card.quick-primary small{color:#666}
.shelf .card{min-height:126px;padding-top:42px}.shelf .card strong{font-size:16px;line-height:1.15}.shelf .card small{max-width:90%;line-height:1.35}
@media(min-width:701px) and (max-width:759px){.vehicle-layout{grid-template-columns:1fr;flex-basis:auto!important}.vehicle-entry{min-height:330px}.vehicle-log{min-height:370px}}
.vehicle-layout{min-height:390px;flex-basis:max(390px,min(50vh,440px))}
@media(min-width:701px) and (max-width:759px){.vehicle-layout{flex-basis:auto!important}}

/* ---------- Menu flottant qui se rétracte ---------- */
.app{grid-template-columns:minmax(0,1fr)!important}
.side{position:fixed!important;z-index:60!important;inset:14px auto 14px 14px!important;width:min(252px,calc(100vw - 28px))!important;height:auto!important;padding:22px 15px 16px!important;border:1px solid var(--line)!important;border-radius:18px!important;box-shadow:0 18px 54px #0002!important;background:#fff!important;transform:translateX(calc(-100% - 22px))!important;visibility:hidden!important;opacity:0!important;transition:transform .24s cubic-bezier(.2,.75,.25,1),opacity .18s ease,visibility .24s!important}
.side.is-open{transform:translateX(0)!important;visibility:visible!important;opacity:1!important}
.dock-toggle{display:grid!important;flex:0 0 40px!important;width:40px!important;height:40px!important;border-radius:11px!important}
.dock-backdrop{display:none}
.dock-backdrop.is-visible{display:block;position:fixed;z-index:55;inset:0;width:100%;height:100%;background:#1115;backdrop-filter:blur(2px)}
@media(max-width:700px){.side{inset:10px auto 10px 10px!important;width:min(260px,calc(100vw - 20px))!important}}

/* ---------- Mode nuit complet ---------- */
:root[data-theme="dark"]{--ink:#f2f2f0;--muted:#aaa;--soft:#1b1b1b;--line:#333;--line-dark:#555;color-scheme:dark!important;background:#080808;color:#f2f2f0}
:root[data-theme="dark"] html,:root[data-theme="dark"] body,:root[data-theme="dark"] .app,:root[data-theme="dark"] .main,:root[data-theme="dark"] .view,:root[data-theme="dark"] .top{background:#080808!important;color:#f2f2f0}
:root[data-theme="dark"] .side,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .card,:root[data-theme="dark"] .day-tile,:root[data-theme="dark"] .vehicle-entry,:root[data-theme="dark"] .vehicle-log,:root[data-theme="dark"] .astreinte-editor,:root[data-theme="dark"] .astreinte-log,:root[data-theme="dark"] .af-results,:root[data-theme="dark"] .af-detail,:root[data-theme="dark"] .af-result,:root[data-theme="dark"] .fuel-section,:root[data-theme="dark"] .fuel-ticket,:root[data-theme="dark"] .stamp,:root[data-theme="dark"] .setup{background:#111!important;color:#f2f2f0!important;border-color:#333!important}
:root[data-theme="dark"] .brand-mark,:root[data-theme="dark"] .nav-btn.is-active,:root[data-theme="dark"] .day-tile.active,:root[data-theme="dark"] .dcard.is-you,:root[data-theme="dark"] .vehicle-table-head,:root[data-theme="dark"] .summary,:root[data-theme="dark"] .tool-ico,:root[data-theme="dark"] .rest-ico{background:#ededeb!important;color:#111!important;border-color:#ededeb!important}
:root[data-theme="dark"] .brand-mark *,:root[data-theme="dark"] .nav-btn.is-active *,:root[data-theme="dark"] .day-tile.active *{color:#111!important}
:root[data-theme="dark"] .today-card{background:#eee!important;color:#111!important;border-color:#eee!important}
:root[data-theme="dark"] .today-card *,:root[data-theme="dark"] .today-link{color:#111!important}
:root[data-theme="dark"] .quick-card,:root[data-theme="dark"] .fuel-dropzone,:root[data-theme="dark"] .vehicle-table-head,:root[data-theme="dark"] .mission-empty,:root[data-theme="dark"] .shift-box,:root[data-theme="dark"] .rest-pill{background:#171717!important;color:#eee!important;border-color:#393939!important}
:root[data-theme="dark"] .quick-card *,:root[data-theme="dark"] .fuel-dropzone *{color:#eee!important}
:root[data-theme="dark"] .quick-primary{background:#eee!important;color:#111!important;border-color:#eee!important}
:root[data-theme="dark"] .quick-primary *{color:#111!important}
:root[data-theme="dark"] .quick-primary .quick-icon,:root[data-theme="dark"] .fuel-camera{background:#111!important;color:#fff!important;border-color:#444!important}
:root[data-theme="dark"] .quick-primary .quick-icon *,:root[data-theme="dark"] .fuel-camera *{color:#fff!important}
:root[data-theme="dark"] .vehicle-entry .summary,:root[data-theme="dark"] .summary,:root[data-theme="dark"] .af-access-row strong,:root[data-theme="dark"] .requisition-fields,:root[data-theme="dark"] .mission-tag{background:#1d1d1d!important;color:#f2f2f0!important;border-color:#3b3b3b!important}
:root[data-theme="dark"] input,:root[data-theme="dark"] textarea,:root[data-theme="dark"] select,:root[data-theme="dark"] .af-search-box,:root[data-theme="dark"] .dialog-body input{background:#090909!important;color:#f2f2f0!important;border-color:#484848!important;color-scheme:dark!important}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#888!important}
:root[data-theme="dark"] input:disabled,:root[data-theme="dark"] input:read-only,:root[data-theme="dark"] select:disabled{background:#191919!important;color:#aaa!important}
:root[data-theme="dark"] button,:root[data-theme="dark"] a,:root[data-theme="dark"] p,:root[data-theme="dark"] span,:root[data-theme="dark"] strong,:root[data-theme="dark"] small,:root[data-theme="dark"] em,:root[data-theme="dark"] label,:root[data-theme="dark"] h1,:root[data-theme="dark"] h2,:root[data-theme="dark"] h3,:root[data-theme="dark"] h4,:root[data-theme="dark"] i,:root[data-theme="dark"] td,:root[data-theme="dark"] th{color:inherit}
:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .idx,:root[data-theme="dark"] .save-status,:root[data-theme="dark"] .vehicle-empty,:root[data-theme="dark"] .tile-wd,:root[data-theme="dark"] .tile-mo,:root[data-theme="dark"] .tile-bottom,:root[data-theme="dark"] .shift-time,:root[data-theme="dark"] .fuel-date,:root[data-theme="dark"] .fuel-ticket small{color:#aaa!important}
:root[data-theme="dark"] .primary{background:#eee!important;color:#111!important;border-color:#eee!important}
:root[data-theme="dark"] .back,:root[data-theme="dark"] .access-code,:root[data-theme="dark"] .af-map-links a,:root[data-theme="dark"] .icon-btn,:root[data-theme="dark"] .outline-btn,:root[data-theme="dark"] .capture-btn{background:#151515!important;color:#eee!important;border-color:#555!important}
:root[data-theme="dark"] .toast{background:#111!important;color:#eee!important;border-color:#444!important}
:root[data-theme="dark"] .setup::backdrop{background:#000c}
:root[data-theme="dark"] .theme-switch{background:#333!important;border-color:#555!important}
:root[data-theme="dark"] .theme-switch span{background:#f2f2f0!important}
:root[data-theme="dark"] .dot,:root[data-theme="dark"] .tile-dot{background:#555}
:root[data-theme="dark"] .day-tile.active{box-shadow:inset 0 3px #eee}
:root[data-theme="dark"] .fuel-dropzone.is-dragging{background:#242424!important;border-color:#eee!important}
.home-subtitle{text-transform:none}
:root[data-theme="dark"] .tool-ico i,:root[data-theme="dark"] .rest-ico i{color:#111!important}
:root[data-theme="dark"] .quick-icon{background:#252525!important;color:#eee!important;border-color:#444!important}
:root[data-theme="dark"] .quick-icon i{color:#eee!important}
/* Accueil plus direct : le fil d’Ariane disparaît, les commandes restent accessibles. */
.top{height:48px;flex:0 0 48px;padding-inline:18px;border:0;background:transparent}
.crumb{display:none}
/* Résumé du jour : la date, l’horaire et le binôme sont regroupés à droite. */
.today-card{min-height:190px}
.today-card-label{text-transform:uppercase}
.today-card-label>span{font-size:11px;letter-spacing:.12em}
.today-card .today-partner-label{margin-top:14px;color:#c5c5c5;font-size:9px;font-weight:700;letter-spacing:.13em}
.today-card #homeShiftNote{margin-top:4px;font-size:14px;font-weight:600;line-height:1.25}
.shelf .card{min-height:150px}
@media(max-width:700px){.today-card{min-height:180px}.shelf .card{min-height:138px}}
:root[data-theme="dark"] .today-card .today-partner-label{color:#555!important}

/* Fiche AF sans séparateurs ni badge technique */
.af-detail-head,.af-detail-body .af-info-block,.af-detail .af-access-list,.af-detail .af-access-row,.af-detail .af-key-note{border-top:0;border-bottom:0}
.af-detail .af-source-tag{display:none}
