/* ══ polices embarquées : aucune requête réseau au démarrage ══
   Variables (wght), sous-ensembles latin + latin-ext : accents FR/ES couverts. */
@font-face{font-family:'Bricolage Grotesque'; font-style:normal; font-display:swap;
  font-weight:200 800; src:url('./polices/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Bricolage Grotesque'; font-style:normal; font-display:swap;
  font-weight:200 800; src:url('./polices/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Manrope'; font-style:normal; font-display:swap;
  font-weight:200 800; src:url('./polices/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Manrope'; font-style:normal; font-display:swap;
  font-weight:200 800; src:url('./polices/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --ink:#0A0E1C;
  --ink2:#141D3A;
  --paper:#FFFFFF;
  --wash:#F3F5FC;
  --line:#E7EBF6;
  --mute:#7C87A4;
  --soft:#A8B1C9;

  --gold:#F5B52B;
  --blue:#3B7BF6;
  --violet:#7C5CFC;
  --teal:#07C3A8;
  --coral:#FF5A5F;
  --amber:#FF9F2E;
  --mint:#2DD4A7;
  --green:#10B981;
  --red:#FF3B52;

  --r-xl:26px; --r-lg:20px; --r-md:14px; --r-sm:10px;
  --lift:0 2px 6px rgba(10,14,28,.04), 0 18px 40px -22px rgba(10,14,28,.35);
  --lift-hi:0 4px 10px rgba(10,14,28,.06), 0 30px 60px -26px rgba(10,14,28,.5);


  /* ══ mouvement : 3 durées, 4 ressorts nommés ══ */
  --d-fast:120ms; --d-base:220ms; --d-slow:320ms;
  --sp-snap:cubic-bezier(.3,.9,.3,1);
  --sp-soft:cubic-bezier(.22,.9,.36,1);
  --sp-bounce:cubic-bezier(.22,1.2,.36,1);
  --sp-exit:cubic-bezier(.4,0,.9,.4);
  --stagger:38ms;

  --display:'Bricolage Grotesque','Manrope',system-ui,sans-serif;
  --ui:'Manrope',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

/* ══ correctif : l'attribut hidden doit toujours l'emporter sur display ══
   Sans ceci, .gate{display:flex} laisse l'écran de code dans la page
   et l'application s'ouvre dessus à chaque rechargement. */
[hidden]{display:none !important}

html,body{margin:0;padding:0}
body{
  font-family:var(--ui); color:var(--ink); font-size:15px; line-height:1.5;
  font-weight:500; -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(760px 520px at 108% -6%, rgba(59,123,246,.18) 0%, transparent 68%),
    radial-gradient(640px 460px at -18% 8%, rgba(47,208,224,.14) 0%, transparent 68%),
    radial-gradient(820px 560px at 50% 106%, rgba(27,63,168,.12) 0%, transparent 72%),
    #FBFCFF;
  background-attachment:fixed;
}
.frame{
  max-width:430px; margin:0 auto; min-height:100vh; position:relative;
  background:
    radial-gradient(560px 380px at 112% -4%, rgba(124,92,252,.30) 0%, transparent 68%),
    radial-gradient(500px 360px at -20% 14%, rgba(7,195,168,.26) 0%, transparent 68%),
    radial-gradient(620px 420px at 50% 104%, rgba(59,123,246,.22) 0%, transparent 70%),
    radial-gradient(420px 300px at 90% 58%, rgba(255,159,46,.16) 0%, transparent 70%),
    linear-gradient(180deg,#F7F8FE 0%, #EEF1FB 48%, #F3F0FB 100%);
  overflow:hidden;
}
@media(min-width:680px){
  body{padding:26px 0}
  .frame{border-radius:34px; box-shadow:0 50px 110px -40px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.06);
         min-height:880px; max-height:880px; overflow-y:auto; scrollbar-width:none}
  .frame::-webkit-scrollbar{display:none}
}
.tnum{font-variant-numeric:tabular-nums}

/* ░░ BARRE DE MARQUE ░░ */
.brand{
  background:rgba(255,255,255,.82); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  padding:13px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px;
  border-bottom:1px solid rgba(231,235,246,.9); position:sticky; top:0; z-index:40;
}
.brand img{height:25px; width:auto; display:block}
.brandright{display:flex; align-items:center; gap:9px}
.who{
  font-family:var(--ui); font-size:12.5px; font-weight:800; color:#fff; border:0;
  padding:8px 14px; border-radius:999px; cursor:pointer; white-space:nowrap;
  background:linear-gradient(135deg,var(--violet),var(--blue));
  box-shadow:0 6px 16px -6px rgba(124,92,252,.8);
  transition:transform .3s cubic-bezier(.34,1.5,.4,1), background .3s, box-shadow .3s;
}
.who:active{transform:scale(.93)}
.who.enc{background:linear-gradient(135deg,var(--teal),var(--mint)); color:#06352F;
  box-shadow:0 6px 16px -6px rgba(7,195,168,.8)}
#roleNote{background:rgba(255,255,255,.7); border-radius:var(--r-md); padding:12px 14px;
  margin-top:4px !important; font-weight:600}

/* ░░ SÉLECTEUR DE LANGUE ░░ */
.langbar{
  display:flex; gap:2px; background:#EDF0FA; border:0; padding:3px; border-radius:999px;
}
.langbar button{
  font-family:var(--ui); font-size:11.5px; font-weight:800; letter-spacing:.06em;
  padding:6px 11px; border-radius:999px; border:0; cursor:pointer;
  background:transparent; color:var(--mute);
  transition:background .32s cubic-bezier(.34,1.3,.4,1), color .2s, transform .32s cubic-bezier(.34,1.5,.4,1), box-shadow .3s;
}
.langbar button.sel{
  background:linear-gradient(135deg,var(--ink2),#2B3B70); color:#fff;
  transform:scale(1.06); box-shadow:0 6px 14px -6px rgba(20,29,58,.9);
}

/* ░░ ÉCRANS ░░ */
.screen{display:none; padding:0 0 110px}
.screen.on{display:block}
.screen.on > *{animation:rise var(--d-slow) var(--sp-soft) both}
.screen.on > *:nth-child(1){animation-delay:.02s}
.screen.on > *:nth-child(2){animation-delay:.07s}
.screen.on > *:nth-child(3){animation-delay:.12s}
.screen.on > *:nth-child(4){animation-delay:.16s}
.screen.on > *:nth-child(5){animation-delay:.2s}
.screen.on > *:nth-child(6){animation-delay:.24s}
.screen.on > *:nth-child(7){animation-delay:.28s}
.screen.on > *:nth-child(n+8){animation-delay:.32s}
@keyframes rise{from{opacity:0; transform:translateY(14px) scale(.985)} to{opacity:1; transform:none}}
@media(prefers-reduced-motion:reduce){.screen.on > *{animation:none}}
.pad{padding:18px}

/* ░░ RECHERCHE ░░ */
.find{
  display:flex; align-items:center; gap:10px; background:var(--paper);
  border:1px solid var(--line); padding:14px 16px; margin:18px 18px 0;
  border-radius:999px; box-shadow:var(--lift);
}
.find span{color:var(--soft); font-size:14px; font-weight:600}
.searchbox{
  display:flex; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--line);
  padding:12px 16px; margin-bottom:14px; border-radius:999px; box-shadow:var(--lift);
}
.searchbox input{flex:1 1 auto; min-width:0; border:0; outline:0; background:none;
  font-family:var(--ui); font-size:14.5px; font-weight:600; color:var(--ink)}
.searchbox input::placeholder{color:var(--soft); font-weight:500}
.searchbox button{border:0; background:#EDF0FA; cursor:pointer; color:var(--mute); font-size:15px;
  width:24px; height:24px; border-radius:999px; display:none; line-height:1}
.searchbox.filled button{display:block}
.hits{font-size:12.5px; font-weight:700; color:var(--violet); margin:-6px 0 14px; padding-left:4px}
.nores{text-align:center; padding:36px 20px; color:var(--mute); font-size:14px; font-weight:600}
mark{background:linear-gradient(180deg,transparent 56%, rgba(245,181,43,.55) 56%); color:inherit; padding:0 1px}

/* ░░ TITRES ░░ */
.count,.eyebrow{
  font-size:12px; font-weight:800; letter-spacing:.04em; color:var(--mute);
  margin:22px 18px 12px; text-transform:none;
}
.eyebrow{margin:0 0 12px}
h2.sec{font-family:var(--display); font-weight:800; font-size:24px; letter-spacing:-.03em; margin:0 0 4px}
.note{font-size:12.5px; color:var(--mute); margin-top:14px; line-height:1.55; font-weight:500}

/* ░░ CARTE CHANTIER ░░ */
.sheet{
  display:block; text-align:left; background:var(--paper); border:0;
  border-radius:var(--r-xl); padding:20px; margin:0 18px 14px; width:calc(100% - 36px);
  cursor:pointer; font-family:var(--ui); box-shadow:var(--lift); position:relative; overflow:hidden;
  transition:transform .3s cubic-bezier(.34,1.4,.4,1), box-shadow .3s;
}
.sheet::before{
  content:''; position:absolute; inset:0 auto 0 0; width:5px;
  background:linear-gradient(180deg,var(--violet),var(--blue));
}
.sheet:nth-of-type(2)::before{background:linear-gradient(180deg,var(--teal),var(--blue))}
.sheet:nth-of-type(3)::before{background:linear-gradient(180deg,var(--amber),var(--coral))}
.sheet:active{transform:scale(.978); box-shadow:var(--lift-hi)}
.sheet .code{
  font-size:11px; font-weight:800; letter-spacing:.1em; color:var(--violet);
  background:rgba(124,92,252,.1); padding:4px 10px; border-radius:999px;
}
.sheet:nth-of-type(2) .code{color:var(--teal); background:rgba(7,195,168,.12)}
.sheet:nth-of-type(3) .code{color:var(--amber); background:rgba(255,159,46,.14)}
.sheet .state{
  float:right; font-size:11px; font-weight:800; color:var(--green);
  background:rgba(16,185,129,.12); padding:4px 11px; border-radius:999px;
}
.sheet h3{
  font-family:var(--display); font-weight:800; font-size:25px; line-height:1.05;
  letter-spacing:-.035em; margin:12px 0 5px;
}
.sheet .sub{font-size:13.5px; color:var(--mute); font-weight:600}
.sheet .foot{
  margin-top:15px; padding-top:13px; border-top:1px dashed var(--line);
  font-size:12.5px; font-weight:700; color:var(--ink2); display:flex; align-items:center; gap:8px;
}
.dot{width:8px; height:8px; border-radius:999px; background:var(--coral); flex:0 0 auto;
     box-shadow:0 0 0 4px rgba(255,90,95,.16); animation:pulse 2.4s ease-in-out infinite}
.dot.calm{background:var(--teal); box-shadow:0 0 0 4px rgba(7,195,168,.16); animation:none}
@keyframes pulse{0%,100%{box-shadow:0 0 0 4px rgba(255,90,95,.16)} 50%{box-shadow:0 0 0 7px rgba(255,90,95,.07)}}

/* ░░ EN-TÊTE ░░ */
.head{
  position:relative; padding:18px 20px 26px; color:#fff; overflow:hidden;
  background:linear-gradient(135deg,#1B2450 0%, #2A2F7A 48%, #184E7E 100%);
  border-radius:0 0 var(--r-xl) var(--r-xl);
}
.head::after{
  content:''; position:absolute; width:260px; height:260px; right:-90px; bottom:-150px;
  background:radial-gradient(circle,rgba(124,92,252,.6),transparent 68%); filter:blur(14px);
}
#s-plans .head{background:linear-gradient(135deg,#143A6B,#2F6FD0 55%,#1C9BC4)}
#s-rooms .head,#s-room .head{background:linear-gradient(135deg,#352277,#7C5CFC 60%,#B46BE8)}
#s-planning .head{background:linear-gradient(135deg,#0A4F55,#07C3A8 72%,#4FD6B5)}
#s-reserves .head{background:linear-gradient(135deg,#6B1430,#FF5A5F 72%,#FF8A64)}
#s-journal .head{background:linear-gradient(135deg,#5A3209,#FF9F2E 70%,#FFCE5C)}
#s-chat .head{background:linear-gradient(135deg,#0C4A44,#2DD4A7 68%,#7BE3C6)}
#s-client .head{background:linear-gradient(135deg,#1A1F4D,#3B7BF6 60%,#7C5CFC)}
.head .watermark{position:absolute; right:-14px; top:2px; width:150px; opacity:.2; pointer-events:none}
.head .back svg{stroke:#fff}
.head .back{
  display:flex; width:fit-content; align-items:center; gap:7px; color:#fff; font-size:12.5px; font-weight:800;
  background:rgba(255,255,255,.16); border:0; padding:7px 14px 7px 11px; border-radius:999px;
  cursor:pointer; font-family:var(--ui); margin-bottom:16px; backdrop-filter:blur(8px);
  transition:transform .25s cubic-bezier(.34,1.4,.4,1), background .25s;
}
.head .back:active{transform:scale(.94); background:rgba(255,255,255,.26)}
.head .code{
  font-size:10.5px; font-weight:800; letter-spacing:.14em; color:#fff;
  background:rgba(255,255,255,.2); padding:4px 11px; border-radius:999px; display:inline-block;
}
.head h1{
  font-family:var(--display); font-weight:800; font-size:33px; line-height:.98;
  letter-spacing:-.04em; margin:12px 0 7px; position:relative;
}
.head .sub{font-size:13px; color:rgba(255,255,255,.76); font-weight:600; position:relative}
.rule-gold{height:0}

/* ░░ DÉPARTEMENTS ░░ */
.dept{
  display:flex; align-items:center; gap:14px; width:calc(100% - 36px); text-align:left;
  background:var(--paper); border:0; border-radius:var(--r-lg); padding:16px 18px;
  margin:0 18px 11px; cursor:pointer; font-family:var(--ui); box-shadow:var(--lift);
  transition:transform .3s cubic-bezier(.34,1.4,.4,1);
}
.dept:first-of-type{margin-top:18px}
.dept:active{transform:translateX(5px) scale(.99)}
.dept .bar{
  width:42px; height:42px; border-radius:14px; flex:0 0 auto; align-self:auto;
  background:linear-gradient(135deg,var(--blue),#6FA8FF);
}
.dept:nth-of-type(2) .bar{background:linear-gradient(135deg,var(--violet),#AE8BFF)}
.dept:nth-of-type(3) .bar{background:linear-gradient(135deg,var(--teal),#5EE3CA)}
.dept:nth-of-type(4) .bar{background:linear-gradient(135deg,var(--coral),#FF9B7A)}
.dept:nth-of-type(5) .bar{background:linear-gradient(135deg,var(--amber),#FFD06B)}
.dept:nth-of-type(6) .bar{background:linear-gradient(135deg,var(--mint),#8BEBD2)}
.dept .t{flex:1 1 auto; min-width:0}
.dept .t b{display:block; font-family:var(--display); font-weight:800; font-size:18.5px;
  letter-spacing:-.025em; line-height:1.1}
.dept .t span{display:block; font-size:12.5px; color:var(--mute); margin-top:3px; font-weight:600}
.dept .n{
  font-size:13px; font-weight:800; color:var(--ink2); flex:0 0 auto;
  background:#EDF0FA; padding:5px 11px; border-radius:999px;
}
.dept .n.alert{color:#fff; background:linear-gradient(135deg,var(--coral),#FF8A64);
  box-shadow:0 6px 14px -6px rgba(255,90,95,.9)}
.chev{flex:0 0 auto; opacity:.3}

/* ░░ PLANCHES PHOTO ░░ */
.plates{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.plate{
  position:relative; aspect-ratio:4/3; border:0; border-radius:var(--r-md); overflow:hidden;
  cursor:pointer; box-shadow:var(--lift); transition:transform .3s cubic-bezier(.34,1.4,.4,1);
}
.plate:active{transform:scale(.96)}
.plate i{position:absolute; inset:0; display:block}
.p1 i{background:linear-gradient(145deg,#7C5CFC,#3B7BF6)}
.p2 i{background:linear-gradient(145deg,#FF9F2E,#FF5A5F)}
.p3 i{background:linear-gradient(145deg,#07C3A8,#3B7BF6)}
.p4 i{background:linear-gradient(145deg,#F5B52B,#FF7A3D)}
.p5 i{background:linear-gradient(145deg,#2DD4A7,#07A9C3)}
.p6 i{background:linear-gradient(145deg,#B46BE8,#FF5A8A)}
.plate.vid::after{content:''; position:absolute; left:50%; top:50%; width:44px; height:44px;
  margin:-22px 0 0 -22px; border-radius:999px; background:rgba(255,255,255,.92);
  box-shadow:0 8px 20px -8px rgba(10,14,28,.7)}
.plate.vid::before{content:''; position:absolute; left:50%; top:50%; z-index:2;
  margin:-7px 0 0 -4px; border-left:14px solid var(--ink); border-top:9px solid transparent;
  border-bottom:9px solid transparent}
.plate .dur{position:absolute; right:8px; top:8px; background:rgba(10,14,28,.6);
  backdrop-filter:blur(8px); color:#fff; font-size:10px; font-weight:700; padding:3px 8px; border-radius:999px}
.plate em{
  position:absolute; left:8px; right:8px; bottom:8px; background:rgba(10,14,28,.55);
  backdrop-filter:blur(10px); color:#fff; font-style:normal; font-size:10.5px; font-weight:700;
  padding:6px 9px; border-radius:999px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* ░░ PIÈCES ░░ */
.room{
  display:flex; align-items:center; gap:13px; width:100%; text-align:left; background:var(--paper);
  border:0; border-radius:var(--r-lg); padding:17px 18px; margin-bottom:10px; cursor:pointer;
  font-family:var(--ui); box-shadow:var(--lift);
  transition:transform .3s cubic-bezier(.34,1.4,.4,1);
}
.room:active{transform:translateX(5px) scale(.99)}
.room b{flex:1 1 auto; font-family:var(--display); font-weight:800; font-size:17px; letter-spacing:-.025em}
.room span{font-size:12.5px; font-weight:800; color:var(--violet); background:rgba(124,92,252,.1);
  padding:4px 10px; border-radius:999px}

/* ░░ FICHE ░░ */
.card{background:var(--paper); border:0; border-radius:var(--r-xl); padding:20px; margin-bottom:14px; box-shadow:var(--lift)}
.card h4{font-family:var(--display); font-weight:800; font-size:21px; letter-spacing:-.03em; margin:0 0 14px}
.spec{display:grid; grid-template-columns:100px 1fr; gap:7px 14px; font-size:13.5px}
.spec dt{color:var(--mute); font-size:12px; font-weight:700}
.spec dd{margin:0; font-weight:700}
.ref{font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:.02em; color:var(--violet)}
.hair{height:1px; background:var(--line); margin:16px 0; border-radius:2px}

/* ░░ RÉSERVES ░░ */
.item{display:flex; gap:14px; background:var(--paper); border:0; border-radius:var(--r-lg);
  padding:17px 18px; margin-bottom:11px; box-shadow:var(--lift); position:relative; overflow:hidden;
  transition:opacity .3s}
.item::before{content:''; position:absolute; inset:0 auto 0 0; width:5px;
  background:linear-gradient(180deg,var(--coral),#FF8A64)}
.item.done::before{background:linear-gradient(180deg,var(--green),var(--mint))}
.item.done{opacity:.62}
.tick{flex:0 0 auto; width:28px; height:28px; border:2px solid var(--line); border-radius:999px;
  background:none; cursor:pointer; position:relative; margin-top:1px;
  transition:transform .35s cubic-bezier(.34,1.6,.4,1), background .25s, border-color .25s}
.tick:active{transform:scale(.86)}
.item.done .tick{border-color:transparent; background:linear-gradient(135deg,var(--green),var(--mint));
  box-shadow:0 6px 14px -6px rgba(16,185,129,.9)}
.item.done .tick::after{content:''; position:absolute; left:8.5px; top:11px; width:10px; height:5px;
  border-left:2.4px solid #fff; border-bottom:2.4px solid #fff; transform:rotate(-45deg)}
.item .body{flex:1 1 auto; min-width:0}
.item p{margin:0; font-size:14.5px; line-height:1.45; font-weight:600}
.item.done p{color:var(--mute); text-decoration:line-through}
.item .meta{font-size:11.5px; color:var(--mute); margin-top:7px; font-weight:600}

/* ░░ JOURNAL ░░ */
.day{
  background:linear-gradient(135deg,var(--ink2),#2B3B70); color:#fff;
  font-family:var(--display); font-weight:800; font-size:16px; letter-spacing:-.025em;
  padding:12px 18px; border-radius:var(--r-md) var(--r-md) 0 0; margin-top:18px;
}
.day:first-child{margin-top:0}
.entry{background:var(--paper); border:0; border-radius:0 0 var(--r-md) var(--r-md);
  padding:16px 18px; box-shadow:var(--lift)}
.entry .meta{font-size:12px; color:var(--mute); margin-bottom:12px; font-weight:700}

/* ░░ CHAT ░░ */
.bubble{background:var(--paper); border:0; border-radius:var(--r-lg) var(--r-lg) var(--r-lg) 7px;
  padding:17px 18px; margin-bottom:13px; box-shadow:var(--lift); transition:opacity .3s}
.bubble.mine{margin-left:26px; border-radius:var(--r-lg) var(--r-lg) 7px var(--r-lg);
  background:linear-gradient(135deg,#EFF3FF,#F6F1FF)}
.bubble.closed{opacity:.6}
.bubble .top{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px}
.bubble .name{font-weight:800; font-size:14px; letter-spacing:-.01em}
.bubble .time{font-size:11.5px; color:var(--mute); font-weight:600}
.bubble p{margin:0; font-size:14.5px; line-height:1.5; font-weight:600}
.src-tag{display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.03em; color:#fff;
  background:linear-gradient(135deg,var(--mint),var(--teal)); padding:4px 11px; border-radius:999px; margin-bottom:10px}
.voice{display:flex; align-items:center; gap:11px; margin-top:13px; padding:10px 12px;
  background:#F3F5FC; border-radius:999px}
.wave{flex:1 1 auto; height:20px; display:flex; align-items:center; gap:2.5px}
.wave b{display:block; width:2.5px; border-radius:3px; background:linear-gradient(180deg,var(--mint),var(--teal))}
.play{width:30px; height:30px; border-radius:999px; border:0; cursor:pointer; position:relative; flex:0 0 auto;
  background:linear-gradient(135deg,var(--teal),var(--mint)); box-shadow:0 6px 14px -6px rgba(7,195,168,.9);
  transition:transform .3s cubic-bezier(.34,1.5,.4,1)}
.play:active{transform:scale(.88)}
.play::after{content:''; position:absolute; left:12px; top:9px; border-left:8px solid #fff;
  border-top:6px solid transparent; border-bottom:6px solid transparent}
.lang{display:flex; gap:7px; margin-top:12px}
.lang button{font-family:var(--ui); font-size:11.5px; font-weight:800; letter-spacing:.04em;
  padding:6px 13px; border:0; background:#EDF0FA; color:var(--mute); cursor:pointer; border-radius:999px;
  transition:transform .3s cubic-bezier(.34,1.5,.4,1), background .25s, color .25s}
.lang button.sel{background:linear-gradient(135deg,var(--violet),var(--blue)); color:#fff; transform:scale(1.05)}
.cap-note{font-size:11.5px; color:var(--mute); margin-top:12px; font-weight:600}
.closerow{display:flex; align-items:center; gap:10px; margin-top:13px; padding-top:12px;
  border-top:1px dashed var(--line); font-size:12.5px; color:var(--mute); font-weight:700}
.mini{width:22px; height:22px; border:2px solid var(--line); border-radius:7px; background:none;
  cursor:pointer; position:relative; flex:0 0 auto; transition:transform .3s cubic-bezier(.34,1.6,.4,1), background .25s, border-color .25s}
.mini:active{transform:scale(.85)}
.bubble.closed .mini{background:linear-gradient(135deg,var(--green),var(--mint)); border-color:transparent}
.bubble.closed .mini::after{content:''; position:absolute; left:5px; top:6.5px; width:8px; height:4px;
  border-left:2.2px solid #fff; border-bottom:2.2px solid #fff; transform:rotate(-45deg)}

/* ░░ FILTRES ░░ */
.filters{display:flex; gap:8px; margin-bottom:16px}
.filters button{font-family:var(--ui); font-size:13px; font-weight:800; padding:9px 16px; border:0;
  background:var(--paper); color:var(--mute); cursor:pointer; border-radius:999px; box-shadow:var(--lift);
  transition:transform .3s cubic-bezier(.34,1.5,.4,1), background .25s, color .25s}
.filters button.sel{background:linear-gradient(135deg,var(--ink2),#2B3B70); color:#fff; transform:scale(1.03)}

/* ░░ PLANNING ░░ */
.plan-day{display:flex; gap:14px; background:var(--paper); border-radius:var(--r-lg); padding:15px 16px;
  margin-bottom:11px; box-shadow:var(--lift)}
.plan-day .when{flex:0 0 52px; font-family:var(--display); font-weight:800; font-size:17px;
  letter-spacing:-.03em; line-height:1}
.plan-day .when small{display:block; font-family:var(--ui); font-size:11px; color:var(--mute);
  font-weight:700; margin-top:5px}
.plan-day .lines{flex:1 1 auto; min-width:0}
.line{display:flex; gap:11px; align-items:flex-start; margin-bottom:11px; font-size:14px; font-weight:600}
.line:last-child{margin-bottom:0}
.tag{width:10px; height:10px; flex:0 0 auto; margin-top:5px; border-radius:999px;
  background:linear-gradient(135deg,var(--gold),var(--amber)); box-shadow:0 0 0 3px rgba(245,181,43,.16)}
.tag.trade{background:linear-gradient(135deg,var(--violet),var(--blue)); box-shadow:0 0 0 3px rgba(124,92,252,.16)}
.tag.done{background:linear-gradient(135deg,var(--green),var(--mint)); box-shadow:0 0 0 3px rgba(16,185,129,.16)}
.line .src{font-size:11.5px; color:var(--mute); display:block; margin-top:3px; font-weight:600}
.clash{background:linear-gradient(135deg,rgba(255,59,82,.09),rgba(255,154,122,.12));
  border:1px solid rgba(255,59,82,.22); color:#C21E35; font-size:12.5px; font-weight:700;
  padding:10px 13px; border-radius:var(--r-md); margin-top:6px}

/* ░░ CALENDRIER ░░ */
.mgrid{display:grid; grid-template-columns:repeat(7,1fr); gap:5px; margin-top:6px}
.mgrid span{aspect-ratio:1; display:flex; align-items:center; justify-content:center; font-size:12.5px;
  font-weight:700; border:0; background:var(--paper); border-radius:11px; position:relative;
  font-variant-numeric:tabular-nums; box-shadow:0 1px 3px rgba(10,14,28,.05)}
.mgrid span.dow{background:none; box-shadow:none; color:var(--soft); font-size:11px; font-weight:800;
  aspect-ratio:auto; padding-bottom:4px}
.mgrid span.off{background:rgba(255,255,255,.4); box-shadow:none}
.mgrid span.has::after{content:''; position:absolute; bottom:5px; width:6px; height:6px; border-radius:999px;
  background:linear-gradient(135deg,var(--gold),var(--amber))}
.mgrid span.has.trade::after{background:linear-gradient(135deg,var(--violet),var(--blue))}
.mgrid span.today{background:linear-gradient(135deg,var(--ink2),#2B3B70); color:#fff;
  box-shadow:0 8px 18px -8px rgba(20,29,58,.9)}
.legend{display:flex; gap:18px; margin-top:16px; font-size:12px; color:var(--mute); font-weight:700}
.legend i{display:inline-block; width:9px; height:9px; border-radius:999px; margin-right:7px;
  background:linear-gradient(135deg,var(--gold),var(--amber))}
.legend i.trade{background:linear-gradient(135deg,var(--violet),var(--blue))}

/* ░░ DICTÉE ░░ */
.dictation{background:linear-gradient(135deg,#F2F7FF,#F7F2FF); border:1px solid rgba(124,92,252,.16);
  padding:18px; margin-top:18px; border-radius:var(--r-lg)}
.dictation .said{font-family:var(--display); font-weight:800; font-size:17px; letter-spacing:-.025em;
  line-height:1.3; margin:0 0 10px}
.dictation .got{font-size:13.5px; color:var(--ink2); margin:0; font-weight:600}

/* ░░ VALIDATIONS ░░ */
.val{background:var(--paper); border:0; border-radius:var(--r-xl); padding:20px; margin-bottom:14px;
  box-shadow:var(--lift); position:relative; overflow:hidden}
.val::before{content:''; position:absolute; inset:0 auto 0 0; width:5px;
  background:linear-gradient(180deg,var(--gold),var(--amber))}
.val.ok::before{background:linear-gradient(180deg,var(--green),var(--mint))}
.val h4{font-family:var(--display); font-weight:800; font-size:20px; letter-spacing:-.03em; margin:0 0 6px}
.val p{margin:0 0 13px; font-size:13.5px; color:var(--mute); font-weight:600}
.acts{display:flex; gap:10px; margin-top:14px}
.acts button{flex:1 1 0; font-family:var(--ui); font-size:14px; font-weight:800; padding:14px;
  border:0; border-radius:999px; cursor:pointer; color:#fff;
  background:linear-gradient(135deg,var(--green),var(--mint)); box-shadow:0 10px 22px -10px rgba(16,185,129,.9);
  transition:transform .3s cubic-bezier(.34,1.5,.4,1)}
.acts button:active{transform:scale(.96)}
.acts button.no{background:#FFF0F1; color:var(--red); box-shadow:none}
.stamp{font-size:12px; color:var(--mute); font-weight:700}

/* ░░ ONGLETS CLIENT ░░ */
.segs{display:flex; gap:6px; padding:14px 18px 4px; position:sticky; top:52px; z-index:30;
  background:linear-gradient(180deg,var(--wash) 72%, transparent)}
.segs button{flex:1 1 0; font-family:var(--ui); font-size:12.5px; font-weight:800; padding:11px 4px;
  background:var(--paper); border:0; border-radius:999px; color:var(--mute); cursor:pointer;
  box-shadow:var(--lift); transition:transform .3s cubic-bezier(.34,1.5,.4,1), background .25s, color .25s}
.segs button.sel{background:linear-gradient(135deg,var(--violet),var(--blue)); color:#fff; transform:scale(1.04)}

.summary{background:linear-gradient(135deg,var(--ink2),#2B3B70); color:#fff; border:0;
  padding:20px; margin-top:16px; border-radius:var(--r-xl); box-shadow:var(--lift-hi)}
.summary h4{font-family:var(--display); font-weight:800; font-size:19px; letter-spacing:-.03em; margin:0 0 10px}
.summary p{margin:0; font-size:14px; line-height:1.6; color:rgba(255,255,255,.84); font-weight:500}
.summary .lang button{background:rgba(255,255,255,.14); color:rgba(255,255,255,.8)}
.summary .lang button.sel{background:#fff; color:var(--ink2)}

/* ░░ ACTION ░░ */
.action{position:fixed; bottom:0; left:0; right:0; z-index:35; padding:14px 18px 22px; pointer-events:none;
  background:linear-gradient(to top, var(--wash) 52%, rgba(243,245,252,0))}
.action .in{max-width:430px; margin:0 auto; pointer-events:auto}
@media(min-width:680px){.action{position:sticky; background:none}}
.cta{
  width:100%; font-family:var(--ui); font-size:15.5px; font-weight:800; letter-spacing:-.01em;
  padding:17px; border:0; border-radius:999px; cursor:pointer; color:#fff;
  background:linear-gradient(135deg,var(--violet) 0%, var(--blue) 100%);
  box-shadow:0 14px 34px -12px rgba(124,92,252,.95);
  transition:transform .3s cubic-bezier(.34,1.5,.4,1), box-shadow .3s;
}
.cta:active{transform:scale(.965)}
.cta.gold{background:linear-gradient(135deg,var(--amber),var(--gold)); color:#2A1B00;
  box-shadow:0 14px 34px -12px rgba(245,181,43,.95)}

button:focus-visible,.sheet:focus-visible,.dept:focus-visible,.room:focus-visible,input:focus-visible{
  outline:3px solid var(--violet); outline-offset:3px}

/* ══ v2 : règle absolue — jamais de recadrage ══ */
.plate img, .shot img, .viewer img{object-fit:contain !important; background:#0A0E1C}
.plate{background:#0E1428}
.plate img{width:100%; height:100%; display:block}

/* ══ états ══ */
.skel{background:linear-gradient(100deg,#E9EDF8 30%,#F6F8FF 50%,#E9EDF8 70%);
  background-size:220% 100%; animation:sweep 1.3s linear infinite; border-radius:var(--r-md)}
@keyframes sweep{to{background-position:-220% 0}}
.empty{text-align:center; padding:44px 22px; color:var(--mute)}
.empty b{display:block; font-family:var(--display); font-size:19px; color:var(--ink); margin-bottom:6px; letter-spacing:-.02em}
.empty p{margin:0; font-size:13.5px; line-height:1.55; font-weight:500}

/* ══ toasts ══ */
#toasts{position:fixed; left:0; right:0; bottom:88px; z-index:90; display:flex;
  flex-direction:column; align-items:center; gap:8px; pointer-events:none; padding:0 18px}
.toast{background:var(--ink); color:#fff; font-size:13.5px; font-weight:600; padding:12px 18px;
  border-radius:999px; box-shadow:var(--lift-hi); max-width:400px;
  animation:toastin var(--d-slow) var(--sp-bounce) both}
.toast.err{background:linear-gradient(135deg,#B3261E,#FF5A5F)}
.toast.ok{background:linear-gradient(135deg,#0B7A5A,var(--teal))}
.toast.out{animation:toastout var(--d-base) var(--sp-exit) forwards}
@keyframes toastin{from{opacity:0; transform:translateY(14px) scale(.96)} to{opacity:1; transform:none}}
@keyframes toastout{to{opacity:0; transform:translateY(8px) scale(.97)}}

/* ══ visionneuse plein écran ══ */
.viewer{position:fixed; inset:0; z-index:95; background:#06080F; display:flex; flex-direction:column;
  animation:fadein var(--d-base) var(--sp-soft) both}
@keyframes fadein{from{opacity:0} to{opacity:1}}
.viewer .vtop{display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:calc(12px + env(safe-area-inset-top)) 16px 12px; color:#fff}
.viewer .vtop span{font-size:13px; font-weight:600; color:rgba(255,255,255,.75)}
.viewer .vbody{flex:1 1 auto; display:flex; align-items:center; justify-content:center; padding:0 10px; min-height:0}
.viewer img, .viewer video{max-width:100%; max-height:100%; object-fit:contain}
.viewer .vfoot{padding:14px 16px calc(18px + env(safe-area-inset-bottom)); display:flex; gap:10px}
.iconbtn{width:44px; height:44px; min-width:44px; border-radius:999px; border:0; cursor:pointer;
  background:rgba(255,255,255,.14); color:#fff; display:flex; align-items:center; justify-content:center}

/* ══ formulaires ══ */
.sheetmodal{position:fixed; inset:0; z-index:92; background:rgba(8,11,22,.5);
  display:flex; align-items:flex-end; justify-content:center; animation:fadein var(--d-fast) linear both}
.sheetbox{background:var(--wash); width:100%; max-width:430px; max-height:92vh; overflow-y:auto;
  border-radius:26px 26px 0 0; padding:20px 18px calc(22px + env(safe-area-inset-bottom));
  animation:sheetup var(--d-slow) var(--sp-bounce) both}
@keyframes sheetup{from{transform:translateY(100%)} to{transform:none}}
.sheetbox h3{font-family:var(--display); font-weight:800; font-size:22px; letter-spacing:-.03em; margin:0 0 16px}
.field{display:block; margin-bottom:14px}
.field span{display:block; font-size:12px; font-weight:700; color:var(--mute); margin-bottom:6px}
.field input, .field textarea, .field select{width:100%; box-sizing:border-box; border:1px solid var(--line);
  background:var(--paper); border-radius:14px; padding:14px 15px; font-family:var(--ui); font-size:16px;
  font-weight:600; color:var(--ink); outline:0; min-height:48px}
.field textarea{min-height:96px; resize:vertical; line-height:1.5}
.field input:focus, .field textarea:focus, .field select:focus{border-color:var(--violet);
  box-shadow:0 0 0 4px rgba(124,92,252,.12)}
.ghost{background:var(--paper); color:var(--ink); box-shadow:var(--lift)}
.rowbtns{display:flex; gap:10px; margin-top:4px}
.rowbtns .cta{flex:1 1 0}

/* ══ bandeau stockage ══ */
.bar-store{display:flex; align-items:center; gap:10px; background:var(--paper); border-radius:var(--r-md);
  padding:12px 14px; box-shadow:var(--lift); font-size:12.5px; font-weight:600; color:var(--mute)}
.bar-store .gauge{flex:1 1 auto; height:7px; background:#E9EDF8; border-radius:99px; overflow:hidden}
.bar-store .gauge i{display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg,var(--teal),var(--blue))}
.bar-store.warn .gauge i{background:linear-gradient(90deg,var(--amber),var(--coral))}

/* ══ accès ══ */
.gate{min-height:100vh; display:flex; flex-direction:column; justify-content:center; padding:30px 24px;
  text-align:center; gap:16px}
.gate img{height:40px; margin:0 auto 10px}
.gate h1{font-family:var(--display); font-weight:800; font-size:27px; letter-spacing:-.035em; margin:0}
.gate p{color:var(--mute); font-size:14px; margin:0; font-weight:500}
.gate input{text-align:center; letter-spacing:.3em; font-size:22px; font-weight:800;
  text-transform:uppercase; padding:16px}

/* ══ accessibilité : cibles ≥48px ══ */
button, .sheet, .dept, .room{min-height:48px}
.tick, .mini, .play{min-width:44px; min-height:44px}
.mini{width:44px; height:44px; display:flex; align-items:center; justify-content:center}
.mini::after{position:static !important; transform:rotate(-45deg) translate(-1px,-2px) !important}
.tick{width:44px; height:44px}
.item.done .tick::after{left:16px; top:18px}

/* ══ zones sûres ══ */
.brand{padding-top:calc(13px + env(safe-area-inset-top))}
.action{padding-bottom:calc(22px + env(safe-area-inset-bottom))}

/* ══ hors connexion ══ */
.offline{background:linear-gradient(135deg,#5A3209,var(--amber)); color:#2A1B00; font-size:12.5px;
  font-weight:700; text-align:center; padding:8px 16px}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{animation-duration:.01ms !important; transition-duration:.01ms !important}
  .screen.on > *{animation:fadein .2s ease both !important}
}

/* ═══════════════════════════════════════════════════════════
   MOUVEMENT v2 — transform/opacity uniquement, 60 fps
   ═══════════════════════════════════════════════════════════ */

/* entrée en cascade : --i posé par app.js, plafonné à 10 pas */
.screen.on > * > *{animation:rise var(--d-base) var(--sp-soft) both;
  animation-delay:calc(var(--i,0) * var(--stagger))}
.screen.on > *{animation-delay:0ms}

/* retour tactile sur toute cible, sans toucher la mise en page */
button, .sheet, .dept, .room, .plate{transition:transform var(--d-fast) var(--sp-snap)}
button:active, .sheet:active, .dept:active, .room:active, .plate:active{transform:scale(.97)}
.cta:active{transform:scale(.975)}
.plate:active{transform:scale(.985)}

/* case à cocher animée — Réserves « réalisé » */
.tick{position:relative; transition:background var(--d-base) var(--sp-soft),
  border-color var(--d-base) var(--sp-soft), transform var(--d-fast) var(--sp-snap)}
.tick::after{content:""; position:absolute; left:50%; top:50%; width:11px; height:6px;
  border-left:2.5px solid #fff; border-bottom:2.5px solid #fff; border-radius:1px;
  transform:translate(-50%,-62%) rotate(-45deg) scale(.2); opacity:0;
  transition:transform var(--d-base) var(--sp-bounce), opacity var(--d-fast) linear}
.item.done .tick::after{transform:translate(-50%,-62%) rotate(-45deg) scale(1); opacity:1}
.mini{position:relative; transition:background var(--d-base) var(--sp-soft),
  border-color var(--d-base) var(--sp-soft)}
.mini::after{content:""; position:absolute; left:50%; top:50%; width:8px; height:4.5px;
  border-left:2.2px solid #fff; border-bottom:2.2px solid #fff;
  transform:translate(-50%,-64%) rotate(-45deg) scale(.2); opacity:0;
  transition:transform var(--d-base) var(--sp-bounce), opacity var(--d-fast) linear}
.bubble.closed .mini::after{transform:translate(-50%,-64%) rotate(-45deg) scale(1); opacity:1}

/* onglets : indicateur qui glisse */
.segs{position:relative}
.segs button{transition:color var(--d-base) var(--sp-soft)}

/* compteurs et pastilles */
.n{animation:pop var(--d-base) var(--sp-bounce) both}
@keyframes pop{from{transform:scale(.6); opacity:0} to{transform:none; opacity:1}}

/* chargement photo */
.plate img{animation:fadein var(--d-base) linear both}

/* jamais d'animation pendant le défilement d'un gros bloc photos */
.plates{contain:layout paint}

/* will-change seulement pendant l'animation */
.screen.on > *, .toast, .sheetbox{will-change:transform,opacity}
.screen:not(.on) > *{will-change:auto}

@media(prefers-reduced-motion:reduce){
  .screen.on > * > *{animation:fadein var(--d-fast) linear both !important; animation-delay:0ms !important}
  .tick::after, .mini::after{transition:opacity var(--d-fast) linear !important}
  button:active, .sheet:active, .dept:active, .room:active, .plate:active{transform:none}
  .n{animation:none}
}

/* ══ correctif : la barre d'action de la feuille reste atteignable ══
   Un formulaire de 10 champs dépasse la hauteur de la feuille ; sans ceci
   le bouton Enregistrer se retrouve sous le pli et sous le clavier. */
.sheetbox{display:flex; flex-direction:column; padding-top:0; padding-bottom:0;
  overscroll-behavior:contain; -webkit-overflow-scrolling:touch}
.sheetbox h3{flex:0 0 auto; position:sticky; top:0; z-index:2; background:var(--wash);
  margin:0 -18px 14px; padding:20px 18px 12px}
#mform, #awrap .rowbtns{display:flex; flex-direction:column; min-height:0}
#mform > .field{flex:0 0 auto}
#mform > .rowbtns{position:sticky; bottom:0; z-index:3; margin-top:8px;
  padding:12px 0 calc(16px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, var(--wash) 62%, rgba(243,245,252,0))}


/* ══ rappel de sauvegarde (purge de stockage après inactivité) ══ */
.remind{margin:14px 18px 0; padding:14px 16px; border-radius:var(--r-lg);
  background:linear-gradient(135deg,#FFF6E3,#FFE9C9); border:1px solid #F2D8A4;
  display:flex; gap:12px; align-items:center; flex-wrap:wrap;
  animation:rise var(--d-base) var(--sp-soft) both}
.remind span{flex:1 1 180px; font-size:13px; font-weight:600; color:#6B4B10; line-height:1.45}
.remind .cta{flex:0 0 auto; padding:11px 18px; font-size:13.5px}

/* ══ aucune image déformée, logos compris ══ */
.brand img, .gate img, .watermark{object-fit:contain}


/* ══ accessibilité : cibles tactiles ≥ 44 px, gants et mains sales ══ */
.langbar button{min-width:46px; min-height:46px; padding:6px 10px;
  display:inline-flex; align-items:center; justify-content:center}
.langbar{padding:2px}
/* contraste du sélecteur de langue au repos (AA sur fond clair) */
.langbar button{color:#55617E}
/* la maison filigrane reste dans son cadre */
.head{overflow:hidden}
.watermark{max-width:58%; right:-6px}

/* ═══════════════════════════════════════════════════════════
   LOT ACCESSIBILITÉ — contrastes AA et place pour le pouce
   ═══════════════════════════════════════════════════════════ */

/* le contenu n'est plus avalé par la barre d'action fixe */
.screen{padding-bottom:calc(132px + env(safe-area-inset-bottom))}

/* gris secondaire : 3,58 → 4,7 sur fond clair */
:root{--mute:#68738F; --soft:#8B95B0}

/* bouton de profil : blanc sur violet/bleu, 3,93 → 5,8 */
.who{background:linear-gradient(135deg,#5B3FD4,#2A5FD0); box-shadow:0 6px 16px -6px rgba(91,63,212,.75)}

/* pastille d'état : vert pâle sur vert pâle → vert foncé lisible */
.sheet .state{color:#07694A; background:rgba(16,185,129,.16)}

/* badge de compteur neutre */
.dept .n{color:#0F1730; background:#E4E9F7}

/* repères secondaires sur fond sombre */
.head .sub, .back span{color:rgba(255,255,255,.92)}

/* champ de recherche : la zone tactile fait toute la hauteur */
.searchbox input{min-height:48px; align-self:stretch}
.searchbox input::placeholder{color:#6E7892}
.field input::placeholder, .field textarea::placeholder{color:#6E7892}

/* indication de focus visible au clavier (sans halo à la souris) */
:focus-visible{outline:3px solid var(--violet); outline-offset:2px; border-radius:10px}

/* lot 2 : le reste des contrastes AA */
.cta:not(.ghost){background:linear-gradient(135deg,#5B3FD4 0%, #2A5FD0 100%)}
.cta.gold:not(.ghost){background:linear-gradient(135deg,#9A6300,#7E4F00); color:#fff}
.dept .n.alert{background:linear-gradient(135deg,#C8232B,#A8171F)}
.sheet .code, .room span{color:#4A2FB0; background:rgba(124,92,252,.14)}
.count,.eyebrow{color:#5A6480}
.sheet .sub{color:#5F6A86}
.note{color:#5F6A86}

.segs button.sel{background:linear-gradient(135deg,#5B3FD4,#2A5FD0)}
.filters button.sel{background:linear-gradient(135deg,#131C38,#243358)}
.empty p{color:#5A6480}

/* ══ champ de fichiers : l'input lui-même est la zone tactile ══
   Le clic doit atterrir sur <input type=file>, jamais être relayé par un label :
   certaines visionneuses intégrées ignorent un clic relayé. */
.filewrap{position:relative; display:block}
.filein{position:absolute; inset:0; width:100%; height:100%; opacity:0; z-index:2;
  cursor:pointer; font-size:0; -webkit-appearance:none; appearance:none}
.filebtn{display:flex; align-items:center; justify-content:center; gap:9px;
  min-height:58px; padding:14px 16px; border-radius:16px;
  border:2px dashed #BFC8E2; background:var(--paper); color:#4A2FB0;
  font-family:var(--ui); font-size:14.5px; font-weight:800; text-align:center;
  transition:border-color var(--d-base) var(--sp-soft), background var(--d-base) var(--sp-soft),
             transform var(--d-fast) var(--sp-snap)}
.filein:active + .filebtn, .filewrap:active .filebtn{transform:scale(.975)}
.filebtn.has{border-style:solid; border-color:var(--teal); background:rgba(7,195,168,.09); color:#07694A}
.filein:focus-visible ~ .filebtn, .filewrap:focus-within .filebtn{border-color:var(--violet)}

/* ══ onglets de l'espace client : deux lignes, rien de coupé ══ */
.segs{flex-wrap:wrap; gap:8px; padding:14px 18px 10px}
.segs button{flex:1 1 30%; min-width:98px; min-height:46px; padding:11px 8px; white-space:nowrap}

/* ══ le design est pensé clair : on refuse l'assombrissement automatique
   du navigateur, qui inverse à moitié les couleurs et casse les contrastes ══ */
html, :root{color-scheme:only light}

/* la barre d'onglets sur deux lignes ne peut plus rester collante :
   elle recouvrait le contenu juste en dessous */
.segs{position:static; top:auto}
/* la ligne d'action d'une bulle passe à la ligne au lieu de tronquer */
.closerow{flex-wrap:wrap; row-gap:8px}
.closerow .cta{flex:0 1 auto; width:auto; max-width:100%}

/* ══ bandeau du haut : rien ne déborde sur un écran étroit ══ */
.brand{gap:8px}
.brandright{min-width:0; flex:0 1 auto}
.who{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
@media (max-width:399px){
  .who .nm{display:none}
  .who{padding:8px 12px}
  .langbar button{min-width:44px; min-height:44px; padding:6px 6px}
  .brand img{height:22px}
}


/* ═══════════════════════════════════════════════════════════
   MODE SOMBRE : l'application reste CLAIRE.
   On déclare quand même la prise en charge du sombre, sinon Chrome
   Android applique son assombrissement automatique, qui inverse à
   moitié les couleurs et casse tous les contrastes. En déclarant nos
   propres règles sombres — identiques aux claires — il nous laisse la main.
   ═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark){
  :root{
    color-scheme:only light;
  --ink:#0A0E1C;
  --ink2:#141D3A;
  --paper:#FFFFFF;
  --wash:#F3F5FC;
  --line:#E7EBF6;
  --mute:#7C87A4;
  --soft:#A8B1C9;

  --gold:#F5B52B;
  --blue:#3B7BF6;
  --violet:#7C5CFC;
  --teal:#07C3A8;
  --coral:#FF5A5F;
  --amber:#FF9F2E;
  --mint:#2DD4A7;
  --green:#10B981;
  --red:#FF3B52;

  --r-xl:26px; --r-lg:20px; --r-md:14px; --r-sm:10px;
  --lift:0 2px 6px rgba(10,14,28,.04), 0 18px 40px -22px rgba(10,14,28,.35);
  --lift-hi:0 4px 10px rgba(10,14,28,.06), 0 30px 60px -26px rgba(10,14,28,.5);


  /* ══ mouvement : 3 durées, 4 ressorts nommés ══ */
  --d-fast:120ms; --d-base:220ms; --d-slow:320ms;
  --sp-snap:cubic-bezier(.3,.9,.3,1);
  --sp-soft:cubic-bezier(.22,.9,.36,1);
  --sp-bounce:cubic-bezier(.22,1.2,.36,1);
  --sp-exit:cubic-bezier(.4,0,.9,.4);
  --stagger:38ms;

  --display:'Bricolage Grotesque','Manrope',system-ui,sans-serif;
  --ui:'Manrope',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;  }
  html, :root{color-scheme:only light}
  body{background:
    radial-gradient(760px 520px at 108% -6%, rgba(59,123,246,.18) 0%, transparent 68%),
    radial-gradient(640px 460px at -18% 8%, rgba(47,208,224,.14) 0%, transparent 68%),
    radial-gradient(820px 560px at 50% 106%, rgba(27,63,168,.12) 0%, transparent 72%),
    #FBFCFF; color:var(--ink)}
  .frame{
    background:
      radial-gradient(560px 380px at 112% -4%, rgba(124,92,252,.30) 0%, transparent 68%),
      radial-gradient(500px 360px at -20% 14%, rgba(7,195,168,.26) 0%, transparent 68%),
      radial-gradient(620px 420px at 50% 104%, rgba(59,123,246,.22) 0%, transparent 70%),
      radial-gradient(420px 300px at 90% 58%, rgba(255,159,46,.16) 0%, transparent 70%),
      linear-gradient(180deg,#F7F8FE 0%, #EEF1FB 48%, #F3F0FB 100%);
  }
  .sheet, .card, .dept, .room, .bubble, .item, .val, .entry, .plan-day,
  .searchbox, .filebtn, .cta.ghost, .bar-store, .field input,
  .field textarea, .field select{background:var(--paper)}
  .sheetbox, .filters button, .segs button{background:var(--wash)}
  .brand{background:rgba(255,255,255,.82)}
  .langbar{background:#EDF0FA}
  img, video{filter:none}
}

/* ══ dictée et traduction ══ */
.micwrap{position:relative}
.micwrap textarea{padding-right:60px}
.mic{position:absolute; right:8px; bottom:8px; width:46px; height:46px; min-width:46px;
  border:0; border-radius:14px; background:#EDF0FA; color:#4A2FB0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--d-base) var(--sp-soft), transform var(--d-fast) var(--sp-snap)}
.mic:active{transform:scale(.94)}
.mic.on{background:linear-gradient(135deg,#C8232B,#A8171F); color:#fff; animation:pulsemic 1.4s ease-in-out infinite}
@keyframes pulsemic{0%,100%{box-shadow:0 0 0 0 rgba(200,35,43,.5)} 50%{box-shadow:0 0 0 10px rgba(200,35,43,0)}}
.langs{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:10px}
.langs button{font-family:var(--ui); font-size:11.5px; font-weight:800; letter-spacing:.06em;
  min-height:34px; padding:7px 13px; border:1px solid var(--line); border-radius:999px;
  background:var(--paper); color:#4A2FB0; cursor:pointer;
  transition:background var(--d-base) var(--sp-soft), color var(--d-base) var(--sp-soft)}
.langs button.sel{background:linear-gradient(135deg,#5B3FD4,#2A5FD0); color:#fff; border-color:transparent}
.langs button:disabled{opacity:.6}
.langs em{font-style:normal; font-size:11.5px; font-weight:700; color:#68738F}
@media(prefers-reduced-motion:reduce){ .mic.on{animation:none} }

/* ══ photo de chantier en fond de carte ══
   Un voile blanc dégradé garde le texte lisible à gauche et laisse voir
   la photo à droite. La photo est cadrée ici, volontairement : c'est une
   vignette de repérage, pas une photo de chantier à examiner. */
.sheet{position:relative; overflow:hidden; isolation:isolate}
.sheet .cover{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover !important; z-index:-2; display:block}
.sheet .scrim{position:absolute; inset:0; z-index:-1; display:block; pointer-events:none;
  background:linear-gradient(100deg,
    rgba(255,255,255,.975) 0%, rgba(255,255,255,.955) 42%,
    rgba(255,255,255,.72) 68%, rgba(255,255,255,.34) 100%)}
.sheet.shot{min-height:152px}
.camb{position:absolute; right:14px; bottom:14px; z-index:2;
  width:44px; height:44px; border-radius:14px; display:flex; align-items:center;
  justify-content:center; background:rgba(255,255,255,.94); color:#4A2FB0;
  box-shadow:var(--lift); cursor:pointer;
  transition:transform var(--d-fast) var(--sp-snap), background var(--d-base) var(--sp-soft)}
.camb:active{transform:scale(.92)}
.sheet.shot .camb{background:rgba(255,255,255,.88)}
.sheet .foot{position:relative; z-index:1}

/* ══ éditeur d'annotation ══ */
.viewer.annot .vtop{justify-content:space-between; gap:12px}
.viewer.annot .vtop span{font-family:var(--ui); font-weight:800; font-size:14px; color:#fff}
#astage{position:relative; display:flex; align-items:center; justify-content:center}
#astage img{max-width:100%; max-height:100%; object-fit:contain !important; display:block;
  -webkit-user-select:none; user-select:none; -webkit-user-drag:none}
#acv{position:absolute; touch-action:none; cursor:crosshair}
.atools{padding:12px 16px calc(16px + env(safe-area-inset-bottom));
  background:rgba(10,14,28,.94); display:flex; flex-direction:column; gap:10px}
.arow{display:flex; gap:9px; justify-content:center; flex-wrap:wrap}
.arow button{min-width:52px; min-height:50px; border:0; border-radius:14px; cursor:pointer;
  background:rgba(255,255,255,.14); color:#fff; display:flex; align-items:center; justify-content:center;
  transition:background var(--d-base) var(--sp-soft), transform var(--d-fast) var(--sp-snap)}
.arow button:active{transform:scale(.93)}
.arow button.sel{background:#fff; color:var(--ink)}
.arow.colors button.col{min-width:46px; min-height:46px; border-radius:999px;
  border:3px solid rgba(255,255,255,.3)}
.arow.colors button.col.sel{border-color:#fff; transform:scale(1.12)}

/* ══ aperçu des photos choisies, annotables avant enregistrement ══ */
.fprev{display:flex; gap:9px; flex-wrap:wrap; margin-top:10px}
.fprev:empty{display:none}
.fp{position:relative; width:84px; height:84px; border-radius:14px; overflow:hidden;
  background:#0A0E1C; box-shadow:var(--lift)}
.fp img{width:100%; height:100%; object-fit:contain !important; display:block}
.fpdoc{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:12px; font-weight:800}
.fpan{position:absolute; right:4px; bottom:4px; width:34px; height:34px; min-width:34px;
  border:0; border-radius:10px; background:rgba(255,255,255,.95); color:#4A2FB0;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:transform var(--d-fast) var(--sp-snap)}
.fpan:active{transform:scale(.9)}
.fpan svg{width:15px; height:15px}

/* ═══════════════════════════════════════════════════════════
   IDENTITÉ BLANC + BLEU — et surtout : une couleur EXPLICITE
   sur chaque texte. Sans cela, un texte qui hérite de la couleur
   système d'un bouton s'affiche en blanc sur les Android dont le
   navigateur a forcé un thème sombre : le libellé devient invisible.
   ═══════════════════════════════════════════════════════════ */
button, .sheet, .dept, .room, .card, .item, .bubble, .val, .entry, .plan-day{color:var(--ink)}
.dept .t b, .sheet h3, .card h4, .room b, .val h4, .item p, .bubble p,
.entry p, .plan-day .lines, .summary p, .summary h4, .empty b{color:var(--ink)}
.cta:not(.ghost), .cta:not(.ghost) *, .who, .who *, .segs button.sel,
.filters button.sel, .langs button.sel, .langbar button.sel{color:#fff}
.head h1, .head .sub, .head .code, .back span{color:#fff}
.arow button{color:#fff}
.arow button.sel{color:var(--ink)}

/* ── nuances de bleu : les départements déclinent le bleu TODOSPAIN ── */
.dept:nth-of-type(1) .bar{background:linear-gradient(135deg,#1B3FA8,#3B7BF6)}
.dept:nth-of-type(2) .bar{background:linear-gradient(135deg,#2E5BE0,#5E9BFF)}
.dept:nth-of-type(3) .bar{background:linear-gradient(135deg,#0C6FC9,#38B6F5)}
.dept:nth-of-type(4) .bar{background:linear-gradient(135deg,#0E7FA8,#2FD0E0)}
.dept:nth-of-type(5) .bar{background:linear-gradient(135deg,#1A4FD6,#7AA8FF)}
.dept:nth-of-type(6) .bar{background:linear-gradient(135deg,#143A96,#2E7BE8)}
.dept:nth-of-type(7) .bar{background:linear-gradient(135deg,#0B2E7A,#1F5FD0)}

/* ── fond général : blanc bleuté, plus net et plus dynamique ── */
.frame{
  background:
    radial-gradient(620px 420px at 108% -6%, rgba(59,123,246,.26) 0%, transparent 66%),
    radial-gradient(520px 380px at -18% 10%, rgba(47,208,224,.20) 0%, transparent 66%),
    radial-gradient(680px 460px at 50% 106%, rgba(27,63,168,.16) 0%, transparent 70%),
    linear-gradient(180deg,#FBFCFF 0%, #EEF3FD 52%, #F6F9FF 100%);
}
@media (prefers-color-scheme: dark){
  .frame{
    background:
      radial-gradient(620px 420px at 108% -6%, rgba(59,123,246,.26) 0%, transparent 66%),
      radial-gradient(520px 380px at -18% 10%, rgba(47,208,224,.20) 0%, transparent 66%),
      radial-gradient(680px 460px at 50% 106%, rgba(27,63,168,.16) 0%, transparent 70%),
      linear-gradient(180deg,#FBFCFF 0%, #EEF3FD 52%, #F6F9FF 100%);
  }
}

/* ── les repères secondaires passent au bleu ── */
.sheet .code, .room span{color:#1B3FA8; background:rgba(59,123,246,.13)}
.sheet .state{color:#07694A; background:rgba(16,185,129,.15)}
.dept .n{color:#13327F; background:#E3EBFB}
.ref{color:#1B3FA8}
.filebtn{color:#1B3FA8; border-color:#AFC4EC}
.langs button{color:#1B3FA8}
.mic{background:#E3EBFB; color:#1B3FA8}
.camb{color:#1B3FA8}
.fpan{color:#1B3FA8}
.sheet::before, .item::before{background:linear-gradient(180deg,#1B3FA8,#3B7BF6)}


/* ═══════════════════════════════════════════════════════════
   OPT-OUT DE L'ASSOMBRISSEMENT AUTOMATIQUE DE CHROME ANDROID
   Chrome n'assombrit pas une page qui déclare gérer le sombre.
   On le déclare donc à la racine (color-scheme: light dark),
   et nos règles « sombres » sont rigoureusement les règles claires.
   Les champs de saisie, eux, restent explicitement clairs pour que
   le clavier, les listes et le calendrier natifs ne virent pas au noir.
   ═══════════════════════════════════════════════════════════ */
html, :root{color-scheme:only light}
input, textarea, select, button, .field input, .field textarea, .field select{
  color-scheme:light}
@media (prefers-color-scheme: dark){
  html, :root{color-scheme:only light}
  body{background:
    radial-gradient(760px 520px at 108% -6%, rgba(59,123,246,.18) 0%, transparent 68%),
    radial-gradient(640px 460px at -18% 8%, rgba(47,208,224,.14) 0%, transparent 68%),
    radial-gradient(820px 560px at 50% 106%, rgba(27,63,168,.12) 0%, transparent 72%),
    #FBFCFF; color:var(--ink)}
  .frame{background:
    radial-gradient(620px 420px at 108% -6%, rgba(59,123,246,.26) 0%, transparent 66%),
    radial-gradient(520px 380px at -18% 10%, rgba(47,208,224,.20) 0%, transparent 66%),
    radial-gradient(680px 460px at 50% 106%, rgba(27,63,168,.16) 0%, transparent 70%),
    linear-gradient(180deg,#FBFCFF 0%, #EEF3FD 52%, #F6F9FF 100%)}
  .brand{background:rgba(255,255,255,.82)}
  .langbar{background:#EDF0FA}
  .sheet, .card, .dept, .room, .bubble, .item, .val, .entry, .plan-day,
  .searchbox, .filebtn, .cta.ghost, .bar-store, .field input,
  .field textarea, .field select{background:var(--paper); color:var(--ink)}
  .sheetbox, .filters button, .segs button{background:var(--wash); color:var(--ink)}
  .dept .t b, .sheet h3, .card h4, .room b, .val h4, .item p, .bubble p,
  .entry p, .plan-day .lines, .summary p, .summary h4, .empty b{color:var(--ink)}
  .cta:not(.ghost), .cta:not(.ghost) *, .who, .who *, .segs button.sel,
  .filters button.sel, .langs button.sel, .langbar button.sel{color:#fff}
  .head h1, .head .sub, .head .code, .back span{color:#fff}
  img, video{filter:none !important}
}


/* ══ plus aucun noir : la page, le rebond de défilement et la barre
   du navigateur partagent le même blanc bleuté que l'application ══ */
html{background:#FBFCFF}
body{background-color:#FBFCFF}
.gate{background:transparent}


/* ══ DERNIER MOT SUR LES COULEURS ══
   « only light » est le mot-clé documenté par Chrome pour refuser
   l'assombrissement automatique du contenu web. Il est répété ici en
   dernier pour qu'aucune règle précédente ne le contredise. */
html, :root, body{color-scheme:only light !important}

/* ══ écran anti appui fantôme : absorbe le second tap d'un double-appui
   juste après la fermeture d'une feuille ══ */
.shield{position:fixed; inset:0; z-index:9999; background:transparent}

/* ═══════════════════════════════════════════════════════════
   DÉPARTEMENT ATTENTION — triangle jaune, clignotement tant
   qu'il reste un point ouvert, calme dès que tout est coché.
   ═══════════════════════════════════════════════════════════ */
.dept.alerte .bar{background:linear-gradient(135deg,#FFC400,#FF9A00) !important;
  position:relative; color:#3A2600}
.dept.alerte .bar::after{content:"";position:absolute;inset:0;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2600' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M10.3 3.6 1.9 18a2 2 0 0 0 1.7 3h16.8a2 2 0 0 0 1.7-3L13.7 3.6a2 2 0 0 0-3.4 0z'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>") center/58% no-repeat}
.dept.alerte{border:2px solid #FFD66B}
.dept .n.jaune{background:linear-gradient(135deg,#C98A00,#8A5A00); color:#fff}

/* clignotement : opacité et ombre seulement, jamais la mise en page */
@keyframes battement{
  0%,100%{box-shadow:0 0 0 0 rgba(255,170,0,.55), var(--lift); border-color:#FFD66B}
  50%    {box-shadow:0 0 0 10px rgba(255,170,0,0), var(--lift); border-color:#FF9A00}
}
.dept.alerte.clignote{animation:battement 1.6s ease-in-out infinite}
@keyframes clignote-pastille{0%,100%{opacity:1} 50%{opacity:.35}}
.warnb{position:absolute; left:18px; top:18px; z-index:3; display:flex; align-items:center; gap:5px;
  padding:7px 12px 7px 9px; border-radius:999px; color:#3A2600;
  background:linear-gradient(135deg,#FFD24A,#FFAE00); box-shadow:0 6px 16px -6px rgba(255,160,0,.8)}
.warnb b{font-family:var(--ui); font-size:13px; font-weight:800}
.warnb svg{width:16px; height:16px}
.warnb.clignote{animation:clignote-pastille 1.4s ease-in-out infinite}
.sheet.shot .warnb, .sheet .warnb{left:auto; right:18px; top:18px}
.sheet .state{margin-right:0}

/* bandeau de rappel en tête du département */
.alertop{display:flex; align-items:center; gap:11px; padding:15px 17px; margin-bottom:14px;
  border-radius:var(--r-lg); color:#3A2600; font-family:var(--ui); font-weight:800; font-size:14.5px;
  background:linear-gradient(135deg,#FFEFC2,#FFE09A); border:1.5px solid #FFC95E}
.alertop svg{flex:0 0 auto; width:22px; height:22px}

/* une ligne de point à traiter */
.item.alerte{border-left:4px solid #FFAE00; background:#FFFCF4}
.item.alerte.done{border-left-color:#C9D2E6; background:var(--paper)}
.item.alerte .tick{border-color:#E0A800}
.item.alerte.done .tick{background:linear-gradient(135deg,#C98A00,#8A5A00); border-color:transparent}
.item.alerte.done .body p{text-decoration:line-through; color:#68738F}

@media(prefers-reduced-motion:reduce){
  .dept.alerte.clignote, .warnb.clignote{animation:none}
  .dept.alerte.clignote{box-shadow:0 0 0 4px rgba(255,170,0,.4), var(--lift)}
}

/* les messages se placent au-dessus de la barre d'action et ne masquent plus la liste */
#toasts{bottom:calc(104px + env(safe-area-inset-bottom))}
.toast{max-width:min(92vw,420px); text-align:center; line-height:1.35; border-radius:18px}
/* un seul liseré sur une ligne Attention */
.item.alerte::before{background:linear-gradient(180deg,#FFC400,#FF9A00) !important}
.item.alerte.done::before{background:linear-gradient(180deg,#C9D2E6,#AEB9D4) !important}
.item.alerte{border-left:0}

/* ══════════════════════════════════════════════════════════════
   NOUVEAUTÉS — une rubrique signale ce qui a bougé depuis
   le dernier passage de CET utilisateur, et cesse dès l'ouverture.
   ══════════════════════════════════════════════════════════════ */
.neufb{display:inline-flex; align-items:center; gap:5px; flex:0 0 auto;
  font-family:var(--ui); font-size:11.5px; font-weight:800; letter-spacing:.01em;
  padding:6px 12px; border-radius:999px; color:#fff; white-space:nowrap;
  background:linear-gradient(135deg,var(--blue),var(--violet));
  box-shadow:0 7px 18px -8px rgba(60,110,255,.95)}
.neufb::before{content:''; width:7px; height:7px; border-radius:999px; background:#fff; opacity:.95}
.neufb.clignote{animation:clignote-pastille 1.4s ease-in-out infinite}
/* sur la carte d'un chantier : dans la ligne du bas, jamais sous l'appareil photo */
.sheet .foot{flex-wrap:wrap}
.sheet.withcam .foot{padding-right:54px}
.sheet .foot .neufb{margin-left:auto}
.sheet.shot .foot .neufb{box-shadow:0 8px 20px -6px rgba(0,0,0,.55)}
/* dans une rubrique : sur sa propre ligne, sous le sous-titre */
.dept .t .neufb{display:inline-flex; margin-top:9px; font-size:11px; padding:5px 11px; color:#fff}
.dept .t .neufb::before{width:6px; height:6px}

/* la rubrique elle-même */
.dept.neuf{box-shadow:0 0 0 2px rgba(60,110,255,.34), var(--lift)}
.dept.neuf.clignote{animation:battement-bleu 1.7s ease-in-out infinite}
.dept.alerte.clignote{animation:battement 1.6s ease-in-out infinite}
@keyframes battement-bleu{
  0%,100%{box-shadow:0 0 0 2px rgba(60,110,255,.30), var(--lift)}
  50%{box-shadow:0 0 0 6px rgba(60,110,255,.16), 0 12px 26px -12px rgba(60,110,255,.75)}
}
.room.outil.clignote{animation:battement-bleu 1.7s ease-in-out infinite}
.room.outil b{letter-spacing:-.03em}

/* ══════════════════════════════════════════════════════════════
   OUTILLAGE ET MATÉRIEL — une demande, ses réponses dessous.
   Jamais un fil où l'on perd la question d'origine.
   ══════════════════════════════════════════════════════════════ */
.poste{background:var(--paper); border:0; border-radius:var(--r-xl); padding:18px;
  margin-bottom:15px; box-shadow:var(--lift); position:relative; overflow:hidden;
  transition:opacity .3s}
.poste::before{content:''; position:absolute; inset:0 auto 0 0; width:5px;
  background:linear-gradient(180deg,var(--blue),var(--violet))}
.poste.clos{opacity:.62}
.poste.clos::before{background:linear-gradient(180deg,var(--green),var(--mint))}
.poste .top{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px}
.poste .name{font-weight:800; font-size:14px; letter-spacing:-.01em; color:var(--ink)}
.poste .time{font-size:11.5px; color:var(--mute); font-weight:600}
.poste > p{margin:0; font-size:15.5px; line-height:1.48; font-weight:700; color:var(--ink)}
.poste.clos > p{text-decoration:line-through; text-decoration-color:rgba(10,14,28,.3)}
.poste .mini{border-color:var(--line)}
.poste.clos .mini{background:linear-gradient(135deg,var(--green),var(--mint)); border-color:transparent}
.poste.clos .mini::after{transform:translate(-50%,-64%) rotate(-45deg) scale(1); opacity:1}

/* les réponses, rattachées visuellement à leur demande */
.reps{margin-top:14px; padding-left:14px; border-left:2px dashed var(--line)}
.repscount{font-family:var(--ui); font-size:11px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--mute); margin-bottom:9px}
.rep{position:relative; background:#F5F7FD; border-radius:13px 13px 13px 5px;
  padding:13px 14px; margin-bottom:9px}
.rep:last-child{margin-bottom:0}
.rep .top{margin-bottom:5px}
.rep .name{font-size:13px}
.rep p{margin:0; font-size:14px; line-height:1.45; font-weight:600; color:var(--ink)}
.rep .iconbtn{position:absolute; right:8px; bottom:8px}
.rep .plates{margin-top:9px}

@media(prefers-reduced-motion:reduce){
  .dept.neuf.clignote, .room.outil.clignote, .neufb.clignote{animation:none}
  .dept.neuf.clignote{box-shadow:0 0 0 4px rgba(60,110,255,.38), var(--lift)}
}

/* ══════════════════════════════════════════════════════════════
   ESPACE CLIENT — un espace par chantier, au nom du client,
   et le profil client qui n'ouvre que le sien.
   ══════════════════════════════════════════════════════════════ */
.sheet .foot .ccode{margin-left:auto; font-family:ui-monospace,"SF Mono",Menlo,monospace;
  font-size:11.5px; font-weight:800; letter-spacing:.04em; color:#1B3FA8;
  background:rgba(60,110,255,.10); padding:5px 10px; border-radius:8px}
.who.cli{background:linear-gradient(135deg,#0E7FA8,#2FD0E0)}
.who[disabled]{opacity:1; cursor:default}

/* fiche du client : e-mail et code d'accès, visibles de la direction seule */
.cfiche{background:var(--paper); border-radius:var(--r-xl); padding:15px 16px 13px;
  box-shadow:var(--lift); margin-bottom:14px}
.cfiche .l{display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:7px 0; border-bottom:1px dashed var(--line)}
.cfiche .l:last-of-type{border-bottom:0}
.cfiche .l span{font-family:var(--ui); font-size:10.5px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--mute); flex:0 0 100%}
.cfiche .l b{font-size:14.5px; font-weight:800; color:var(--ink); word-break:break-all; flex:1 1 auto}
.cfiche .l b.mono{font-family:ui-monospace,"SF Mono",Menlo,monospace; letter-spacing:.06em; color:#1B3FA8}
.cfiche .note{margin:9px 0 0}
/* bleu foncé : var(--blue) sur blanc ne tient pas le contraste AA (3,93) */
.lien{border:0; background:transparent; color:#1B3FA8; font-family:var(--ui);
  font-weight:800; font-size:12.5px; padding:11px 12px; min-height:44px; min-width:44px;
  cursor:pointer; border-radius:9px; flex:0 0 auto}
.lien:active{background:rgba(60,110,255,.10)}

/* sélection des photos à envoyer au client */
.lot{margin-bottom:20px}
.lot .lott{margin:0 0 9px; font-size:13.5px; font-weight:600; color:var(--ink2); line-height:1.4}
.plate.choix{cursor:pointer}
.plate.choix .coche{position:absolute; right:8px; top:8px; width:26px; height:26px;
  border-radius:999px; background:rgba(255,255,255,.92); border:2px solid rgba(10,14,28,.18);
  display:block; transition:background var(--d-fast) var(--sp-snap), border-color var(--d-fast) var(--sp-snap)}
.plate.choix .coche::after{content:''; position:absolute; left:50%; top:50%;
  width:11px; height:6px; border-left:2.5px solid #fff; border-bottom:2.5px solid #fff;
  transform:translate(-50%,-70%) rotate(-45deg) scale(.5); opacity:0;
  transition:transform var(--d-fast) var(--sp-bounce), opacity var(--d-fast) linear}
.plate.choix.sel{box-shadow:0 0 0 3px var(--blue), var(--lift)}
.plate.choix.sel .coche{background:var(--blue); border-color:var(--blue)}
.plate.choix.sel .coche::after{transform:translate(-50%,-70%) rotate(-45deg) scale(1); opacity:1}
.plate.choix.sel img{opacity:.88}
#action .cta[disabled]{opacity:.55; cursor:default; font-size:13.5px}

/* ══════════════════════════════════════════════════════════════
   OUTILLAGE — chantier, urgence, échéance, et le tampon
   « traité par » qui reste visible une fois la demande réglée.
   ══════════════════════════════════════════════════════════════ */
.puces{display:flex; flex-wrap:wrap; gap:7px; margin-top:11px}
.pu{font-family:var(--ui); font-size:11px; font-weight:800; letter-spacing:.02em;
  padding:6px 11px; border-radius:999px; background:#EEF1FB; color:#1B3FA8; white-space:nowrap}
.pu.obra{background:rgba(14,127,168,.12); color:#07586F}
.pu.feu{background:linear-gradient(135deg,#E0352B,#FF6A3D); color:#fff;
  box-shadow:0 6px 16px -7px rgba(224,53,43,.9)}
.pu.tard{background:#FFE9E6; color:#A31D15}
.poste.urg::before{background:linear-gradient(180deg,#E0352B,#FF6A3D)}

.tampon{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; margin-top:12px;
  padding:10px 13px; border-radius:12px; background:rgba(16,185,129,.12)}
.tampon b{font-family:var(--ui); font-size:13px; font-weight:800; color:#07694A}
.tampon span{font-size:11.5px; font-weight:700; color:#0B7A58}
.poste.clos{opacity:.78}
.poste.clos > p{text-decoration:none; color:var(--ink2)}

/* localisation de l'outil : bleu, distinct du vert « traité » */
.tampon.ou{background:rgba(14,127,168,.12)}
.tampon.ou b{color:#07586F}
.tampon.ou span{color:#0A6B86}
.cta.ghost.ou{color:#07586F; box-shadow:inset 0 0 0 1.5px rgba(14,127,168,.35), var(--lift)}
.closerow{flex-wrap:wrap; gap:9px}

/* ══════════════════════════════════════════════════════════════
   ALMACÉN SENIJA — la photo du dépôt et son inventaire.
   ══════════════════════════════════════════════════════════════ */
.room.alm{position:relative; overflow:hidden; min-height:64px}
.room.alm .cover{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; z-index:0}
.room.alm .scrim{position:absolute; inset:0; z-index:1;
  background:linear-gradient(90deg,rgba(10,14,28,.80) 0%,rgba(10,14,28,.45) 60%,rgba(10,14,28,.25) 100%)}
.room.alm.shot b, .room.alm.shot span, .room.alm.shot svg{position:relative; z-index:2; color:#fff}

.almcov{position:relative; width:100%; aspect-ratio:16/9; border-radius:var(--r-xl);
  overflow:hidden; background:#EEF1FB; box-shadow:var(--lift);
  display:flex; align-items:center; justify-content:center}
.almcov img{width:100%; height:100%; object-fit:contain !important; background:#0A0E1C; display:block}
.almcov .vide{color:#5A6B8C; display:flex; align-items:center; justify-content:center}
.almcov .vide svg{width:38px; height:38px}
.almcov .camb{z-index:3}

.objets{display:flex; flex-direction:column; gap:11px}
.objet{display:flex; align-items:center; gap:13px; background:var(--paper);
  border-radius:var(--r-lg); padding:11px; box-shadow:var(--lift)}
.objet .vign{width:62px; height:62px; min-width:62px; border:0; border-radius:12px;
  overflow:hidden; background:#0A0E1C; padding:0; cursor:pointer; display:block}
.objet .vign img{width:100%; height:100%; object-fit:contain !important; display:block}
.objet .vign.noimg{display:flex; align-items:center; justify-content:center;
  background:#EEF1FB; color:#5A6B8C}
.objet .nm{flex:1 1 auto; min-width:0}
.objet .nm b{display:block; font-family:var(--ui); font-size:15.5px; font-weight:800;
  color:var(--ink); line-height:1.3; overflow-wrap:anywhere}
.objet .nm span{display:block; margin-top:3px; font-size:11.5px; font-weight:700; color:var(--mute)}
.objet .ret{width:auto; flex:0 0 auto; font-size:12.5px; padding:11px 13px; min-height:44px;
  color:#A31D15; box-shadow:inset 0 0 0 1.5px rgba(163,29,21,.30), var(--lift)}
.objet .nm b{hyphens:auto}
@media (max-width:370px){
  .objet{flex-wrap:wrap}
  .objet .ret{margin-left:auto}
}

/* inventaire : un objet retiré reste visible, signé et daté */
.objet.parti{opacity:.72; background:#F7F9FE}
.objet.parti .vign{filter:grayscale(.55)}
.objet .pris{display:block; margin-top:5px; font-family:var(--ui); font-size:11.5px;
  font-weight:800; color:#A31D15}
.objet .deux{display:flex; flex-direction:column; gap:6px; flex:0 0 auto}
.room.stock{position:relative; overflow:hidden; min-height:64px}
.room.stock .cover{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0}
.room.stock .scrim{position:absolute; inset:0; z-index:1;
  background:linear-gradient(90deg,rgba(10,14,28,.80) 0%,rgba(10,14,28,.45) 60%,rgba(10,14,28,.25) 100%)}
.room.stock.shot b, .room.stock.shot span, .room.stock.shot svg{position:relative; z-index:2; color:#fff}

/* outillage en panne */
.room.dem.clignote{animation:battement 1.7s ease-in-out infinite}
.room.pan .warnb{position:static}
.objet .pan-note{display:block; margin-top:4px; font-size:13px; font-weight:600;
  color:var(--ink2); line-height:1.4}

/* ══ PROFILS ══ */
.mien{display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--paper); border-radius:var(--r-lg); padding:12px 14px; box-shadow:var(--lift)}
.mien span{font-family:var(--ui); font-size:10.5px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--mute); flex:0 0 100%}
.mien b{flex:1 1 auto; font-size:15px; font-weight:800; color:var(--ink)}
.who.cli{background:linear-gradient(135deg,#0E7FA8,#2FD0E0)}

/* l'ouvrier consulte : aucune commande d'écriture ne lui est présentée */
body[data-role="peon"] .tick,
body[data-role="peon"] .mini,
body[data-role="peon"] .camb,
body[data-role="peon"] .closerow,
body[data-role="peon"] [data-rep],
body[data-role="peon"] [data-oloc],
body[data-role="peon"] [data-osolve],
body[data-role="peon"] [data-almtake],
body[data-role="peon"] [data-almdel],
body[data-role="peon"] [data-almundo],
body[data-role="peon"] [data-panfix],
body[data-role="peon"] [data-pandel],
body[data-role="peon"] [data-almcov],
body[data-role="peon"] .objet .ret{display:none !important}

/* la note d'un équipement, juste sous son nom */
.card .eqnote{margin:0 0 10px; font-size:14px; line-height:1.45; font-weight:600; color:var(--ink2)}
.pu.shop{background:rgba(154,99,0,.14); color:#7E4F00}

/* ══ la pastille de profil porte son icône : casque pour l'encargado,
   outil pour le worker. La direction reste en toutes lettres. ══ */
.who{display:inline-flex; align-items:center; gap:7px}
.who svg{width:15px; height:15px; flex:0 0 auto}
.who .nm{overflow:hidden; text-overflow:ellipsis}
@media (max-width:399px){ .who{gap:5px} }

/* ══ le libellé du profil ne doit JAMAIS être coupé ══
   Sur un écran étroit, la ligne du haut passe sur deux rangs plutôt que
   de rogner « Direction » en « Directio ». */
.who{overflow:visible; text-overflow:clip; flex:0 0 auto}
.brand img{flex:0 1 auto; min-width:0}
@media (max-width:420px){
  .brand{flex-wrap:wrap; row-gap:9px}
  .brandright{width:100%; justify-content:space-between; flex:1 0 100%}
  .who .nm{display:none}
}

/* ══ aperçu client : la direction regarde avec les yeux du client ══ */
.apercu{position:sticky; top:0; z-index:45; display:flex; align-items:center; gap:10px;
  flex-wrap:wrap; padding:12px 16px calc(12px + env(safe-area-inset-top));
  background:linear-gradient(135deg,#0E7FA8,#2FD0E0); color:#fff}
.apercu b{font-family:var(--ui); font-size:14px; font-weight:800; flex:1 1 100%}
.apercu span{font-size:12px; font-weight:600; opacity:.95; flex:1 1 auto; min-width:140px}
.apercu .cta{width:auto; flex:0 0 auto; min-height:44px; padding:11px 16px; font-size:13px;
  background:rgba(255,255,255,.96); color:#07586F; box-shadow:none}
.cfiche [data-apercu]{display:inline-flex; align-items:center; gap:8px; width:auto;
  font-size:13px; padding:11px 15px; min-height:44px; color:#07586F;
  box-shadow:inset 0 0 0 1.5px rgba(14,127,168,.35), var(--lift)}
.cfiche [data-apercu] svg{width:16px; height:16px}

/* ░░ CALENDRIER GÉNÉRAL ░░
   La vue d'ensemble de la direction : toutes les livraisons et toutes les
   interventions des autres corps de métier, tous chantiers confondus.
   Chaque chantier a sa couleur, gardée du filtre jusqu'à la ligne. */
.room.cal{background:linear-gradient(135deg,#17224A,#243870); color:#fff}
.room.cal b{color:#fff}
.room.cal span{color:#fff; background:rgba(255,255,255,.16)}
.room.cal .chev{stroke:#fff}

.agseg{position:static; top:auto; padding:4px 0 2px; background:none}
.agnav{display:flex; align-items:center; gap:8px; margin:12px 0 0}
.agnav b{flex:1 1 auto; text-align:center; font-family:var(--display); font-weight:800;
  font-size:16.5px; letter-spacing:-.02em}
.agnav button{width:44px; height:44px; min-width:44px; border:0; border-radius:50%;
  background:var(--paper); box-shadow:var(--lift); color:var(--ink); font-size:19px;
  font-weight:800; cursor:pointer; line-height:1; transition:transform .25s}
.agnav button:active{transform:scale(.92)}
.agnav .auj{width:auto; min-width:0; border-radius:999px; padding:0 15px; font-size:12px;
  font-weight:800; color:var(--mute)}

.agtot{display:flex; align-items:center; gap:10px; margin-top:12px; font-size:12.5px;
  font-weight:800; color:var(--mute)}
.agtot i{display:block; width:4px; height:4px; border-radius:50%; background:var(--soft)}

.agfil{display:flex; gap:7px; overflow-x:auto; margin-top:12px; padding-bottom:3px;
  scrollbar-width:none}
.agfil::-webkit-scrollbar{display:none}
.agfil.b{margin-top:7px}
.agfil button{flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; border:0;
  border-radius:999px; padding:0 14px; min-height:44px; font-family:var(--ui); font-size:12px; font-weight:800;
  background:var(--paper); color:var(--mute); box-shadow:var(--lift); cursor:pointer;
  transition:transform .25s, color .2s}
.agfil button i{display:block; width:8px; height:8px; border-radius:50%; background:var(--c,var(--blue))}
.agfil button.sel{background:var(--ink2); color:#fff; transform:scale(1.03)}
.agfil button:active{transform:scale(.96)}

/* ── vue MOIS ── */
.agsemh{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; margin-bottom:6px}
.agsemh span{text-align:center; font-size:10.5px; font-weight:800; color:var(--soft); letter-spacing:.08em}
.agrid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; margin:0 -16px}
.agsemh{margin-left:-16px; margin-right:-16px}
/* minmax(0,1fr) et non 1fr : sinon la largeur du contenu empêche les colonnes
   de rétrécir et la septième sort de l'écran sur un téléphone étroit. */
.agcell{position:relative; min-width:0; height:54px; border:0; border-radius:12px; background:var(--paper);
  box-shadow:var(--lift); cursor:pointer; display:flex; flex-direction:column; align-items:center;
  justify-content:flex-start; gap:3px; padding:7px 2px 4px; transition:transform .25s}
.agcell b{font-size:13px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums}
.agcell .pts{display:flex; flex-wrap:wrap; gap:2.5px; justify-content:center; align-items:center}
.agcell .pts i{display:block; width:5.5px; height:5.5px; border-radius:50%}
.agcell .pts em{font-style:normal; font-size:8.5px; font-weight:800; color:var(--soft)}
.agcell.out{background:transparent; box-shadow:none}
.agcell.out b{color:var(--soft); font-weight:700}
.agcell.auj{box-shadow:var(--lift), inset 0 0 0 2px var(--blue)}
.agcell.sel{background:var(--ink2)}
.agcell.sel b{color:#fff}
.agcell:active{transform:scale(.94)}

/* ── vue SEMAINE ── */
.agj{display:flex; gap:12px; padding:0 0 14px}
.agj .jt{flex:0 0 46px; text-align:center; padding-top:2px}
.agj .jt b{display:block; font-size:10.5px; font-weight:800; color:var(--soft); letter-spacing:.08em}
.agj .jt span{display:block; font-family:var(--display); font-size:22px; font-weight:800;
  letter-spacing:-.03em; color:var(--ink); font-variant-numeric:tabular-nums; line-height:1.15}
.agj .jl{flex:1 1 auto; min-width:0}
.agj .rien{margin:10px 0 0; color:var(--soft); font-weight:800; font-size:14px}
.agj.vide .jt span{color:var(--soft)}
.agj.auj .jt span{color:var(--blue)}
.agj.auj .jt b{color:var(--blue)}

/* ── une ligne, dans les deux vues ── */
.agline{display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:0;
  background:var(--paper); border-radius:var(--r-md); padding:11px 12px; margin-bottom:7px;
  box-shadow:var(--lift); cursor:pointer; position:relative; overflow:hidden;
  transition:transform .3s cubic-bezier(.34,1.4,.4,1)}
.agline:active{transform:translateX(4px) scale(.99)}
.agline .bar{position:absolute; left:0; top:0; bottom:0; width:4px}
.agline .ico{flex:0 0 auto; display:flex; margin-left:3px}
.agline .tx{flex:1 1 auto; min-width:0}
.agline .tx b{display:block; font-size:13.5px; font-weight:700; color:var(--ink); line-height:1.35}
.agline .tx em{display:block; font-style:normal; font-size:12px; font-weight:700; color:var(--mute); margin-top:2px}
.agline .agchip{display:inline-block; margin-top:6px; font-size:10.5px; font-weight:800;
  padding:3px 8px; border-radius:999px; border:1px solid}
.agline.passe{opacity:.55}
.agline .chev{flex:0 0 auto; opacity:.4}

/* ░░ BANDEAU DE TRAITEMENT DES PHOTOS ░░
   Redimensionner dix photos prend de cinq à vingt secondes sur un téléphone.
   Sans ce bandeau, l'écran paraissait figé et l'utilisateur changeait de
   chantier en pleine opération. Il couvre l'écran : c'est volontaire. */
.prog{position:fixed;inset:0;z-index:90;display:grid;place-items:center;
  background:rgba(14,22,38,.55);backdrop-filter:blur(2px)}
.prog[hidden]{display:none}
.progbox{background:#fff;border-radius:18px;padding:26px 30px;max-width:300px;
  text-align:center;box-shadow:0 18px 50px rgba(14,22,38,.3)}
.progbox b{display:block;font-size:16px;margin:14px 0 6px;color:var(--ink)}
.progbox span{display:block;font-size:13.5px;line-height:1.45;color:var(--muted)}
.progspin{width:30px;height:30px;margin:0 auto;border-radius:50%;
  border:3px solid #E6EAF2;border-top-color:var(--blue);animation:progturn .8s linear infinite}
@keyframes progturn{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.progspin{animation-duration:2.4s}}

/* ░░ BANDEAU DE MISE À JOUR ░░
   Proposer, jamais imposer : une version publiée rechargeait la page en pleine
   saisie. Le bandeau reste jusqu'à ce que l'utilisateur tranche. */
.majbar{position:fixed;left:12px;right:12px;z-index:85;display:flex;align-items:center;gap:10px;
  bottom:calc(12px + env(safe-area-inset-bottom,0px));
  background:var(--ink,#16233C);color:#fff;border-radius:14px;padding:11px 12px 11px 15px;
  box-shadow:0 12px 34px rgba(14,22,38,.32);font-size:14px}
.majbar span{flex:1;min-width:0;line-height:1.35}
.majbar button{flex:none;min-height:38px;border:0;border-radius:10px;cursor:pointer;
  font:inherit;font-weight:600;padding:0 14px;background:var(--blue,#3B7BF6);color:#fff}
.majbar #majNo{background:transparent;color:#B9C4D8;padding:0 6px;font-size:17px;min-width:38px}
@media(max-width:360px){.majbar{font-size:13px;padding-left:12px}.majbar button{padding:0 11px}}
