/* Atelier : bandeau logo, flux 15 étapes, ponts élévateurs animés, fiche intervention, chronologie */

/* ---- logo au centre du bandeau ---- */
.hero .hero-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); z-index: 2; height: 118px; display: flex; align-items: center; justify-content: center; }
.hero .hero-logo::before { content: ''; position: absolute; inset: -30px -80px; background: radial-gradient(ellipse at center, rgba(8, 14, 26, .55), rgba(8, 14, 26, 0) 70%); z-index: -1; }
.hero .hero-logo > img { height: 100%; width: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .65)); }
.login-card .top .hero-logo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.login-card .top .hero-logo > img { height: 92px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .7)); }

/* ---- flux d'atelier : 15 étapes ---- */
.flow15 { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 9px; align-items: end; padding-top: 10px; }
.flow15 .tile { height: 108px; padding: 8px 3px 9px; }
.flow15 .tile.big { height: 120px; margin-top: 0; }
.flow15 .tile .t-label { font-size: 10px; line-height: 10.5px; min-height: 22px; letter-spacing: 0; max-width: 100%; justify-content: center; overflow-wrap: anywhere; }
.flow15 .tile .t-label.sm { font-size: 8.4px; letter-spacing: -.1px; }
.flow15 .tile .arrow { right: -6px; width: 10px; height: 10px; margin-top: -5px; }
.flow15 .tile .t-count { top: -9px; right: -5px; }
@media (max-width: 1350px) { .flow15 { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 18px; } .flow15 .tile .arrow { display: none; } }

/* ---- priorité, techniciens ---- */
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--c); white-space: nowrap; }
.prio i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.prio em { font-style: normal; font-weight: 500; color: var(--muted); }
.techs { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tech { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.tech b { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, .2); }
.tech.assist b { opacity: .75; width: 20px; height: 20px; font-size: 9px; }

/* ---- ponts élévateurs ---- */
.lifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 0 24px 18px; }
.lift { background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 27, 45, .14); }
.lift-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: linear-gradient(180deg, #16233a, #0e1829); color: #fff; }
.lift-head .code { font-family: var(--cond); font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.lift-head .meta { font-size: 11px; color: #9aa6b8; }
.lift-state { font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 3px 9px; border-radius: 10px; text-transform: uppercase; }
.st-libre { background: rgba(255, 255, 255, .12); color: #cfd6e2; }
.st-en_cours { background: #1f9a3e; color: #fff; box-shadow: 0 0 12px rgba(45, 187, 87, .7); }
.st-pause { background: #f2a900; color: #1b1300; }
.st-reserve { background: #1f63c9; color: #fff; }
.st-indispo { background: #6b7688; color: #fff; }

.lift-stage { position: relative; height: 178px; overflow: hidden; background:
  radial-gradient(ellipse 60% 40% at 50% 100%, rgba(47, 125, 225, .16), transparent 70%),
  linear-gradient(180deg, #1b2740 0%, #111a2c 62%, #0a1120 62.5%, #0d1526 100%); }
.lift-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 44px); }
.lift-post { position: absolute; bottom: 20px; width: 16px; height: 142px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #7d8797, #e9edf3 45%, #8a95a6); box-shadow: 0 6px 12px rgba(0, 0, 0, .45); z-index: 2; }
.lift-post.l { left: 12%; } .lift-post.r { right: 12%; }
.lift-post::before { content: ''; position: absolute; left: 6px; top: 10px; width: 4px; height: 118px; border-radius: 2px; background: #3a4458; }
.lift-post::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -4px; height: 6px; border-radius: 2px; background: #4a5568; }
.lift.st-run .lift-post::before { background: #2dbb57; box-shadow: 0 0 10px #2dbb57; animation: ledPulse 1.6s ease-in-out infinite; }
.lift.st-hold .lift-post::before { background: #f2a900; box-shadow: 0 0 10px #f2a900; }
.st-bloque { background: #e11d24; color: #fff; box-shadow: 0 0 12px rgba(225, 29, 36, .7); animation: ledBlink 1.2s steps(2) infinite; }
.lift-block { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: #b3121a; background: #fff1f1; border: 1px solid #f6c4c6; border-radius: 6px; padding: 5px 8px; }
.lift.st-block .lift-post::before { background: #ff3b41; box-shadow: 0 0 12px #ff3b41; animation: ledBlink 1s steps(2) infinite; }
.lift-carriage { position: absolute; left: 12%; right: 12%; bottom: 24px; height: 100px; z-index: 3; transition: transform 1.4s cubic-bezier(.3, .8, .2, 1); }
.lift-arm { position: absolute; bottom: 0; height: 7px; width: 38%; border-radius: 3px; background: linear-gradient(180deg, #ff5a5f, #c9141b); box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
.lift-arm.l { left: 2px; transform-origin: left center; } .lift-arm.r { right: 2px; }
.lift-arm::after { content: ''; position: absolute; top: -5px; width: 12px; height: 5px; border-radius: 2px 2px 0 0; background: #2b3444; }
.lift-arm.l::after { right: 6px; } .lift-arm.r::after { left: 6px; }
.lift-car { position: absolute; left: 50%; bottom: 7px; width: 200px; height: 100px; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.lift-shadow { position: absolute; left: 22%; right: 22%; bottom: 16px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(4px); z-index: 1; transition: transform 1.4s, opacity 1.4s; }
.lift.up .lift-carriage { transform: translateY(-52px); }
.lift.up.st-run .lift-carriage { animation: liftHum 3.2s ease-in-out 1.4s infinite; }
.lift.up .lift-shadow { transform: scale(.7); opacity: .45; }
.lift-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6f7c92; font-family: var(--cond); font-size: 16px; font-weight: 700; letter-spacing: 3px; z-index: 1; }
.lift-sparks { position: absolute; left: 50%; bottom: 76px; width: 60px; height: 30px; transform: translateX(-50%); z-index: 4; pointer-events: none; }
.lift-sparks i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 6px #ffb020; animation: spark 1.3s ease-out infinite; }
.lift-sparks i:nth-child(2) { left: 20px; animation-delay: .4s; } .lift-sparks i:nth-child(3) { left: 38px; animation-delay: .8s; }
@keyframes liftHum { 0%, 100% { transform: translateY(-52px) } 50% { transform: translateY(-54px) } }
@keyframes ledPulse { 0%, 100% { opacity: 1 } 50% { opacity: .55 } }
@keyframes ledBlink { to { opacity: .2 } }
@keyframes spark { 0% { transform: translate(0, 0); opacity: 1 } 100% { transform: translate(var(--dx, 14px), 22px); opacity: 0 } }

.lift-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lift-body .veh { font-size: 15px; font-weight: 700; color: var(--navy); }
.lift-body .sub { font-size: 12px; color: var(--muted); }
.lift-body .job { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.lift-progress { height: 7px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.lift-progress div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2dbb57, #1f9a3e); transition: width .6s; }
.lift-progress.over div { background: linear-gradient(90deg, #f47a20, #e11d24); }
.lift-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lift-next { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.lift.drop-over { outline: 3px dashed #2f7de1; outline-offset: 3px; }

/* ---- Gantt des ponts ---- */
.gantt { padding: 0 24px 22px; }
.gantt .g-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-2); }
.gantt .g-lane { position: relative; height: 34px; background: repeating-linear-gradient(90deg, #f7f9fb 0 calc(100% / 12), #fff calc(100% / 12) calc(200% / 12)); border-radius: 6px; }
.gantt .g-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; color: #fff; font-size: 11.5px; font-weight: 600; padding: 0 8px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; box-shadow: 0 2px 6px rgba(16, 27, 45, .2); cursor: pointer; text-decoration: none; }
.gantt .g-bar:hover { filter: brightness(1.1); color: #fff; }
.gantt .g-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #e11d24; box-shadow: 0 0 6px rgba(225, 29, 36, .7); z-index: 2; }
.gantt .g-hours { display: grid; grid-template-columns: repeat(12, 1fr); margin-left: 110px; font-size: 11px; color: var(--muted); padding-bottom: 4px; }

/* ---- fiche intervention ---- */
.sheet { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; padding: 0 24px 22px; }
@media (max-width: 760px) { .sheet { grid-template-columns: minmax(0, 1fr); padding: 0 12px 16px; } .sheet-top { flex-wrap: wrap; } .sheet-grid { padding: 14px; gap: 10px 14px; } .chrono { font-size: 36px; } }
.sheet-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); background: #fff; }
.sheet-top { background: linear-gradient(135deg, #16233a, #0e1829 70%); color: #fff; padding: 16px 20px; display: flex; gap: 16px; align-items: center; }
.sheet-top .ref { font-size: 12px; color: #9aa6b8; letter-spacing: .5px; }
.sheet-top .title { font-family: var(--cond); font-size: 24px; font-weight: 800; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; padding: 16px 20px; }
.sheet-grid dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.sheet-grid dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.chrono { font-family: var(--cond); font-size: 44px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: 1px; line-height: 1; }
.chrono.run { color: #1a8a3a; }
.chrono.over { color: #d7141b; }
.actions-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbfc; }
.actions-bar .btn { height: 48px; font-size: 14.5px; letter-spacing: .4px; text-transform: uppercase; }
.btn-amber { border: 0; background: linear-gradient(180deg, #f7b733, #d99200); color: #1b1300; box-shadow: 0 4px 12px rgba(217, 146, 0, .3); }
.btn-darkred { border: 0; background: linear-gradient(180deg, #7a1117, #4d0a0e); color: #fff; box-shadow: 0 4px 12px rgba(77, 10, 14, .35); }
.blockers { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px; background: #fff6f6; border-top: 1px solid #f7c6c8; }
.blockers div { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #b3121a; font-weight: 500; }

/* ---- chronologie ---- */
.timeline { position: relative; padding: 4px 0 4px 18px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #e4e8ef; }
.tl-item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 6px 0; font-size: 13px; }
.tl-item::before { content: ''; position: absolute; left: -16px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #1f63c9); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--c, #1f63c9); }
.tl-item time { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.tl-item .who { color: var(--muted); font-size: 11.5px; }
.tl-day { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 8px 0 2px -18px; }

/* ---- sélecteurs réception ---- */
.pick-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; gap: 12px; align-items: center; background: #fbfcfd; }
.pick-card.on { border-color: #7aa2e3; background: #f2f7ff; box-shadow: 0 0 0 3px rgba(31, 99, 201, .1); }
.veh-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.veh-choice button { text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; display: flex; gap: 10px; align-items: center; cursor: pointer; font-family: inherit; }
.veh-choice button:hover { border-color: #b9c2cf; }
.veh-choice button.on { border-color: #e11d24; background: #fff6f6; box-shadow: 0 0 0 3px rgba(225, 29, 36, .12); }

/* ---- Performance ---- */
.perf-kpis { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; }
.perf-kpi { border-top: 3px solid var(--k); }
.perf-bar { flex: 1; min-width: 60px; height: 10px; border-radius: 5px; background: #eef1f5; overflow: hidden; }
.perf-bar i { display: block; height: 100%; border-radius: 5px; transition: width .6s ease; }

/* ---- Atelier : 9 colonnes du processus ---- */
.board-scroll { overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
.board-scroll .board-col { flex: 0 0 232px; min-width: 232px; scroll-snap-align: start; }
.board-col.col-flow { border-top: 3px solid var(--cc); background: color-mix(in srgb, var(--cc) 5%, #f4f6f9); }
.board-col.col-flow h2 { background: color-mix(in srgb, var(--cc) 12%, #fff); color: var(--cc); }
.veh-choice button.busy { opacity: .6; cursor: not-allowed; background: #f6f7f9; }
.sheet-card .utabs { overflow-x: auto; scrollbar-width: thin; }
.sheet-card .utabs .utab { white-space: nowrap; flex: 0 0 auto; }

/* ---- flux d'atelier : 10 cases regroupées ---- */
.flow10 { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 12px; align-items: end; padding-top: 12px; }
.flow10 .tile { height: 132px; padding: 10px 6px 8px; cursor: pointer; justify-content: flex-start; gap: 7px; }
.flow10 .tile.big { height: 146px; margin-top: 0; }
.flow10 .tile .t-label { font-size: 12.5px; line-height: 12.5px; min-height: 16px; letter-spacing: .2px; justify-content: center; white-space: nowrap; }
.flow10 .tile .t-count { top: -9px; right: -6px; }
.flow10 .tile .arrow { right: -9px; }
.flow10 .tile .gi { flex: 0 0 auto; }
.flow10 .tile .prog { margin-top: -1px; }
.t-parts { width: 100%; margin-top: auto; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 3; }
.t-parts a { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, .16); color: #fff; text-decoration: none; font-size: 10.5px; font-weight: 600; line-height: 15px; transition: background .15s; }
.t-parts a b { font-size: 11.5px; font-weight: 800; }
.t-parts a:hover { background: rgba(255, 255, 255, .22); }
.tile.group { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 14px rgba(15, 25, 45, .18); }
.tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 1350px) { .flow10 { grid-template-columns: repeat(min(var(--n, 10), 6), minmax(0, 1fr)); row-gap: 20px; } .flow10 .tile .arrow { display: none; } }
@media (max-width: 720px) { .flow10 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Paramètres : éditeur des cases du tableau de bord ---- */
.flow-preview .tile { cursor: pointer; }
.flow-preview .tile:hover { outline: 3px solid rgba(20, 34, 59, .25); outline-offset: 2px; }
.color-in { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.swatch-big { width: 36px; height: 36px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.palette .pal { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.palette .pal:hover { transform: scale(1.12); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; max-height: 330px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.icon-grid button { height: 38px; border: 1px solid transparent; border-radius: 6px; background: #f6f8fa; color: #14223b; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-grid button:hover { border-color: #b9c2cf; }
.icon-grid button.on { background: #14223b; color: #fff; }

/* ---- Réception : photos obligatoires autour du véhicule ---- */
.rp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.rp-stage { position: relative; height: 620px; background: radial-gradient(ellipse at center, #ffffff 0%, #f3f5f8 70%); border-radius: 12px; }
.rp-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.rp-lines line { stroke: #e11d24; stroke-width: 1.4; opacity: .85; } .rp-lines circle { fill: #e11d24; }
.rp-lines .done { stroke: #1f9a3e; } .rp-lines circle.done { fill: #1f9a3e; }
.rp-car { position: absolute; left: 50%; top: 11%; height: 78%; aspect-ratio: 220 / 420; transform: translateX(-50%); z-index: 2; }
.rp-car::before { content: ''; position: absolute; inset: -14% -60%; border-radius: 50%; border: 1px dashed #d9dee6; z-index: -1; }
.rp-car .veh-top { width: 100%; height: 100%; filter: drop-shadow(0 10px 18px rgba(20, 30, 50, .18)); }
.rp-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #e11d24; border: 3px solid #fff; box-shadow: 0 0 0 2px #e11d24; cursor: pointer; z-index: 3; animation: rpPing 1.8s ease-in-out infinite; padding: 0; }
.rp-dot.done { background: #1f9a3e; box-shadow: 0 0 0 2px #1f9a3e; animation: none; }
@keyframes rpPing { 50% { box-shadow: 0 0 0 7px rgba(225, 29, 36, .18); } }
.rp-card { position: absolute; width: 25%; max-width: 230px; min-width: 150px; background: #fff; border: 1px solid #e3e7ee; border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; z-index: 2;
  box-shadow: 0 6px 16px rgba(20, 30, 50, .08); transition: transform .15s, box-shadow .15s; font: inherit; text-align: left; }
.rp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(20, 30, 50, .14); }
.rp-card.on { outline: 3px solid rgba(225, 29, 36, .35); } .rp-card.done { border-color: #bfe5ca; }
.rp-card.pos-top { left: 50%; top: 0; transform: translateX(-50%); } .rp-card.pos-top:hover { transform: translate(-50%, -3px); }
.rp-card.pos-bottom { left: 50%; bottom: 0; transform: translateX(-50%); } .rp-card.pos-bottom:hover { transform: translate(-50%, -3px); }
.rp-card.pos-lt { left: 0; top: 6%; } .rp-card.pos-lm { left: 0; top: 36%; } .rp-card.pos-rt { right: 0; top: 17%; } .rp-card.pos-lb { left: 0; top: 66%; } .rp-card.pos-rb { right: 0; top: 57%; }
.rp-img { height: 86px; background: linear-gradient(180deg, #f6f8fa, #eceff3); display: flex; align-items: center; justify-content: center; }
.rp-img .veh-zone { height: 76px; width: auto; } .rp-img img { width: 100%; height: 100%; object-fit: cover; }
.rp-lab { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-weight: 600; font-size: 13.5px; color: #14223b; }
.rp-lab svg { margin-left: auto; color: #6b7688; }
.rp .num { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #e11d24; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rp .done .num { background: #1f9a3e; }
.rp-side { display: flex; flex-direction: column; gap: 14px; }
.rp-panel { background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 14px; box-shadow: 0 4px 12px rgba(20, 30, 50, .05); }
.rp-panel h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 16px; } .rp-panel h3 svg { background: #e11d24; border-radius: 50%; padding: 6px; box-sizing: content-box; }
.rp-preview { min-height: 190px; border-radius: 10px; background: #f3f5f8; display: flex; flex-direction: column; overflow: hidden; }
.rp-preview img { width: 100%; height: 190px; object-fit: cover; }
.rp-prev-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #fff; border-top: 1px solid #e3e7ee; }
.rp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #6b7688; font-size: 13px; text-align: center; padding: 20px; }
.rp-list-head { display: flex; justify-content: space-between; align-items: center; } .rp-list-head h4 { margin: 0; font-size: 16px; }
.rp-list-head span { font-weight: 700; color: #6b7688; } .rp-list-head span.ok { color: #1f9a3e; }
.rp-bar { height: 5px; border-radius: 3px; background: #eef1f5; margin: 8px 0 6px; overflow: hidden; } .rp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e11d24, #1f9a3e); transition: width .4s; }
.rp-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #eef1f5; background: none; padding: 9px 4px; cursor: pointer; font: inherit; font-size: 14px; text-align: left; color: #14223b; }
.rp-item:hover { background: #fafbfc; } .rp-item .t { flex: 1; } .rp-item em { display: block; font-style: normal; font-size: 11.5px; color: #6b7688; }
.rp-item img { width: 40px; height: 30px; object-fit: cover; border-radius: 4px; }
.rp-extra { margin-top: 12px; background: #f3f5f8; border-radius: 10px; padding: 10px; font-size: 12.5px; color: #3b4658; }
.rp-extra-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rp-extra-list > div { position: relative; } .rp-extra-list img { width: 60px; height: 46px; object-fit: cover; border-radius: 6px; }
.rp-extra-list > div button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #e11d24; color: #fff; cursor: pointer; font-size: 12px; line-height: 18px; padding: 0; }
.rp-add { width: 60px; height: 46px; border: 1px dashed #aab3c0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 10.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #3b4658; }
@media (max-width: 1200px) { .rp { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .rp-stage { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; } .rp-card { position: static; width: auto; max-width: none; transform: none !important; } .rp-car, .rp-lines { display: none; } }
/* ---- ordre obligatoire des étapes (fiche OR) ---- */
.gate-msg { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #fff1f1; border: 1px solid #f6c4c6; color: #9e0f14; font-size: 13px; font-weight: 600; }
.gate-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gate-steps span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 14px; background: #eef1f5; color: #6b7688; font-size: 12px; font-weight: 600; }
.gate-steps span b, .gate-steps span svg { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #cfd5de; color: #fff; font-size: 10.5px; padding: 3px; box-sizing: border-box; }
.gate-steps span.ok { background: #e5f6ea; color: #1b7f3b; } .gate-steps span.ok svg { background: #1f9a3e; }
.gate-steps span.todo { background: #fff1f1; color: #b3121a; box-shadow: 0 0 0 1px #f6c4c6; } .gate-steps span.todo b { background: #e11d24; }
.gate-steps em { font-style: normal; font-weight: 500; opacity: .8; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
/* ---- Paramètres : rôles & autorisations ---- */
.perm-wrap { overflow: auto; max-height: 72vh; }
.perm-table { border-collapse: separate; border-spacing: 0; }
.perm-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f8fa; }
.perm-table .perm-name { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 300px; }
.perm-table thead .perm-name { z-index: 3; background: #f6f8fa; }
.perm-table .perm-name b { display: block; font-weight: 600; font-size: 13px; } .perm-table .perm-name code { font-size: 10.5px; color: #8a94a4; }
.perm-role { text-align: center; min-width: 96px; font-size: 12px; vertical-align: bottom; } .perm-role > div:first-child { font-weight: 700; color: #14223b; }
.perm-role-act { display: flex; justify-content: center; gap: 2px; margin-top: 4px; } .perm-role-act .icon-btn { width: 24px; height: 24px; }
.perm-cell { text-align: center; }
.perm-group td { background: #14223b; color: #fff; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; position: relative; }
.perm-group-act { display: none; }
.perm-check { display: inline-flex; cursor: pointer; } .perm-check input { display: none; }
.perm-check span { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #cfd5de; background: #fff; display: inline-block; transition: all .15s; }
.perm-check input:checked + span { background: #1f9a3e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; border-color: #1f9a3e; }
.perm-check.locked input:checked + span { background-color: #6b7688; border-color: #6b7688; } .perm-check.locked { cursor: not-allowed; }
.perm-user { max-height: 60vh; overflow: auto; } .perm-user h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; color: #6b7688; letter-spacing: .5px; }
.pu-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #eef1f5; }
.pu-label { flex: 1; font-size: 13px; } .pu-label em { display: block; font-style: normal; font-size: 11px; color: #8a94a4; }
.pu-seg button { padding: 5px 10px; font-size: 12px; } .pu-seg button.on.grant { background: #1f9a3e; color: #fff; } .pu-seg button.on.deny { background: #e11d24; color: #fff; }

/* ---- arbre d'autorisations (façon Dolibarr) ---- */
.ptree { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; font-size: 13.5px; }
.ptree a { color: #1d3a8a; cursor: pointer; text-decoration: none; } .ptree a:hover { text-decoration: underline; }
.pt-head { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: #f1f4f8; font-weight: 600; color: #26324a; position: sticky; top: 0; z-index: 2; }
.pt-head .pt-all { flex: 1; text-align: center; font-weight: 500; } .pt-fold { font-weight: 500; white-space: nowrap; }
.pt-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid #eef1f5; cursor: pointer; }
.pt-mod.open > .pt-row { background: #eef3fb; } .pt-row:hover { background: #f6f8fc; }
.pt-name { flex: 1; font-weight: 600; color: #1b2740; } .pt-chev { color: #14223b; display: inline-flex; }
.pt-count { font-size: 11.5px; padding: 1px 8px; border-radius: 10px; background: #eef1f5; color: #6b7688; }
.pt-count.part { background: #fff3d6; color: #8a5a00; } .pt-count.full { background: #dff5e5; color: #17703a; }
.pt-modall { font-weight: 500; }
.pt-item { display: flex; align-items: center; gap: 22px; padding: 9px 16px 9px 34px; border-top: 1px solid #f2f4f8; }
.pt-label { flex: 1; } .pt-hint { font-style: normal; font-size: 11.5px; color: #8a94a4; }
.pt-sw { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; cursor: pointer; }
.pt-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.pt-sw i { position: absolute; inset: 0; border-radius: 22px; background: #fff; border: 2px solid #a9b1bf; transition: .18s; }
.pt-sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #a9b1bf; transition: .18s; }
.pt-sw input:checked + i { background: #1f9a3e; border-color: #1f9a3e; } .pt-sw input:checked + i::after { left: 20px; background: #fff; }
.pt-sw.ro { opacity: .55; } .pt-sw.ro input { cursor: not-allowed; }
.ptree-wrap { max-height: 62vh; overflow: auto; }
.pt-src { display: inline-block; margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #eef1f5; color: #566277; }
.pt-src.grant { background: #dff5e5; color: #17703a; } .pt-src.deny { background: #fde3e3; color: #a21212; }
.centre-switch { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; margin-right: 8px; }
.centre-switch select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.centre-switch select option { color: #14223b; } .centre-switch.static b { font-weight: 600; color: #e9edf3; }
@media (max-width: 720px) { .centre-switch.static b { display: none; } }
.btn-wa { background: #1faa59; color: #fff; border: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .btn-wa:hover { background: #178a47; }
.sign-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; } .sign-chip small { color: #8a94a4; }
.sign-out textarea { width: 100%; font-size: 13px; }

/* ---- OR 360° ---- */
.o360 { display: flex; flex-direction: column; gap: 14px; }
.o360-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.o360-kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; border-left: 4px solid #cfd5de; }
.o360-kpi small { display: block; color: #6b7688; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; } .o360-kpi b { font-size: 21px; color: #14223b; } .o360-kpi em { display: block; font-style: normal; font-size: 11.5px; color: #8a94a4; }
.o360-kpi.good { border-left-color: #1f9a3e; } .o360-kpi.bad { border-left-color: #d7141b; } .o360-kpi.bad b { color: #c9141b; }
.o360-alert { display: flex; gap: 10px; align-items: flex-start; background: #fff3f3; border: 1px solid #f3c6c6; color: #8a1212; border-radius: 10px; padding: 10px 14px; }
.o360-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.o360-card { padding: 14px 16px; font-size: 13.5px; } .o360-card.wide { grid-column: 1 / -1; }
.o360-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: #14223b; display: flex; align-items: center; gap: 6px; }
.o360-photos { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .o360-photos img { width: 62px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.o360-tl { display: flex; flex-direction: column; max-height: 520px; overflow: auto; }
.o360-ev { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #f0f2f6; } .o360-ev:first-child { border-top: 0; }
.o360-ev .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.o360-diff { font-size: 12px; color: #566277; background: #f6f8fb; border-radius: 6px; padding: 2px 8px; display: inline-block; margin-top: 2px; }

/* v1.30.4 : les cases du flux ne doivent jamais déborder de leur carte (ni passer sous le menu) quel que soit le zoom / l'écran */
.flow15, .flow10 { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; justify-content: stretch; }
.page-pad > section.card, .page-pad.stack > section.card { min-width: 0; max-width: 100%; }
.page-pad { min-width: 0; max-width: 100%; }
@media (max-width: 1500px) { .flow15 { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 18px; } .flow15 .tile .arrow { display: none; } }

/* v1.98 — caméra guidée de la réception : silhouette du véhicule par-dessus l'image */
body.gcam-open { overflow: hidden; }
.gcam { position: fixed; inset: 0; z-index: 9999; background: #000; color: #fff; display: block; touch-action: manipulation; }
.gcam video, .gcam .gcam-frozen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gcam-sil { position: absolute; left: 5%; right: 5%; top: 50%; transform: translateY(-50%); max-height: 70%; color: #fff; pointer-events: none; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .8)); }
.gcam-sil svg { width: 100%; height: auto; max-height: 70vh; display: block; }
.gcam-cross { width: 70px; height: 70px; margin: 0 auto; border: 2px dashed #fff; border-radius: 50%; }
.gcam-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 22px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); }
.gcam-top b { display: block; font-size: 18px; } .gcam-top small { display: block; color: #d7dde8; font-size: 13.5px; margin-top: 2px; max-width: 60ch; }
.gcam-strip { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 0 10px; }
.gcam-strip span { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .35); }
.gcam-strip span.d { background: #1f9a3e; border-color: #1f9a3e; } .gcam-strip span.c { border-color: #e11d24; background: rgba(225, 29, 36, .55); font-weight: 700; }
.gcam-bar, .gcam-confirm { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px calc(env(safe-area-inset-bottom, 0px) + 18px); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.gcam-shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: #e11d24; box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); cursor: pointer; }
.gcam-shutter:active { transform: scale(.94); }
.gcam-btn { min-width: 52px; height: 46px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .45); color: #fff; font: inherit; font-weight: 700; padding: 0 14px; cursor: pointer; }
.gcam-small { font-size: 13px; }
.gcam-ok { flex: 1; max-width: 280px; height: 50px; border-radius: 12px; border: 0; background: #1f9a3e; color: #fff; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.gcam [hidden] { display: none !important; }

/* v1.98.25 : retour à l'étape précédente / correction de la fiche de réception */
.or-back-path { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #f3f6fb; border: 1px solid #dbe3ef; font-size: 14px; color: #26324a; }
.or-back-path b { color: #1f4f9a; }
.chip-btn { border: 1px solid #cfd8e8; background: #fff; color: #26324a; border-radius: 20px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: #1f4f9a; color: #1f4f9a; background: #f3f6fb; }
.note-ok, .note-warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.note-ok { background: #eaf8ef; border: 1px solid #bfe6cc; color: #14743a; }
.note-warn { background: #fff7e6; border: 1px solid #f5c26b; color: #8a5200; }
.badge-resign { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 700; background: #fff7e6; border: 1px solid #f5c26b; color: #8a5200; }
html[data-theme="dark"] .or-back-path, html[data-theme="dark"] .chip-btn { background: #141e2e; border-color: #2a3a55; color: #dbe4f3; }
html[data-theme="dark"] .or-back-path b { color: #8fb6ff; }
html[data-theme="dark"] .note-ok { background: #13241b; border-color: #28673d; color: #7ce9a7; }
html[data-theme="dark"] .note-warn, html[data-theme="dark"] .badge-resign { background: #2a2113; border-color: #6b5222; color: #f4bf71; }

/* v1.98.90 — affectation : commission par technicien + « Affecter tout l'OR » */
.as-team, .as-plan { border: 1px solid var(--line, #e3e7ee); border-radius: 12px; overflow: hidden; }
.as-tr { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line, #e3e7ee); }
.as-tr:first-child, .as-pl:first-child { border-top: 0; }
.as-tr small, .as-pl small { display: block; color: #6b7689; font-size: 12px; }
.as-pct { display: flex; align-items: center; gap: 5px; }
.as-pct input { width: 64px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 7px 8px; text-align: right; font: inherit; font-variant-numeric: tabular-nums; }
.as-pct.chg input { border-color: #f2a03d; background: #fff7e6; }
.as-amt { min-width: 84px; text-align: right; color: #15803d; font-variant-numeric: tabular-nums; }
.as-pl { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line, #e3e7ee); cursor: pointer; }
.as-pl input { width: 18px; height: 18px; accent-color: #0f1a2e; }
.as-pl.off { opacity: .5; }
.as-t { font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.as-sum { margin-top: 8px; background: #f6f8fb; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
html[data-theme="dark"] .as-pct input { background: #121a2b; border-color: #26324a; color: inherit; }
html[data-theme="dark"] .as-sum { background: #121a2b; }

/* v1.98.115 : techniciens sur plusieurs voitures (parallèle) et affectation groupée */
.tb-gantt .g-row { grid-template-columns: 150px 1fr; padding: 4px 0; }
.tb-gantt .g-bar.tb-par { outline: 2px dashed #f59e0b; outline-offset: 1px; overflow: visible; }
.tb-badge { position: absolute; top: -9px; left: 4px; font-size: 10px; font-weight: 800; background: #f59e0b; color: #3b2a00; border-radius: 99px; padding: 0 6px; line-height: 15px; white-space: nowrap; }
.ba-ck { width: 18px; height: 18px; accent-color: #d7141b; flex: none; cursor: pointer; }
.ba-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 16px 12px; padding: 10px 12px; border-radius: 10px; background: #0f1a30; color: #fff; font-weight: 600; }
.ba-seg { display: inline-flex; width: max-content; max-width: 100%; border: 1px solid var(--line, #e1e6ee); border-radius: 8px; overflow: hidden; }
.ba-seg label { cursor: pointer; }
.ba-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ba-seg span { display: block; padding: 7px 16px; font-weight: 700; font-size: 14px; border-left: 1px solid var(--line, #e1e6ee); }
.ba-seg label:first-child span { border-left: 0; }
.ba-seg input:checked + span { background: #d7141b; color: #fff; }
.ba-seg input:focus-visible + span { outline: 2px solid #1f4f9a; outline-offset: -2px; }
.ba-prev { display: grid; gap: 5px; }
.ba-prev span { background: #f3f5f8; border-radius: 6px; padding: 5px 10px; font-size: 13px; }
html[data-theme="dark"] .ba-prev span { background: #152036; }
