/* AS Qualité · charte commune avec AS Connect */
:root {
  --rose: #ec1a84; --rose-f: #c8156f; --rose-pale: #fde7f2;
  --vert: #10b981; --orange: #f59e0b; --rouge: #ef4444; --gris: #9ca3af; --bleu: #2563eb;
  --card2: #f1f2f5; --mute: #6b7280; --top: #ffffff;
  --r: 16px;
  --btn: linear-gradient(90deg,#5c0d38 0%,#a3135f 30%,#c2186f 50%,#a3135f 70%,#5c0d38 100%);
  --btn-sh: 0 4px 0 #4a0a2d, 0 3px 6px rgba(0,0,0,.25);
  --band: linear-gradient(90deg,#ec1a84 0%,#7a1048 60%,#2a0a1b 100%);
}
[data-theme=dark] {
  --card2: #2c3038; --mute: #9aa1ad; --top: #1c1f24; --rose-pale: #3a1a2b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; line-height: 1.4; }
#splash { position: fixed; inset: 0; background: #14171a; z-index: 99; display: flex; align-items: center; justify-content: center; z-index: 99; }
#splash img { width: min(320px, 70vw); }
[hidden] { display: none !important; }
a { color: var(--rose); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rose); outline-offset: 0; border-color: transparent; }
textarea { min-height: 6rem; resize: vertical; }
label.f { display: block; font-size: .85rem; color: var(--mute); font-weight: 600; margin: .8rem 0 .3rem; }
.mute { color: var(--mute); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.rose { color: var(--rose); } .b { font-weight: 700; }
.row { display: flex; align-items: center; gap: .6rem; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.center { text-align: center; }

/* Boutons : copie d'AS Connect 1.9.26 (notre .btn = leur .btn.primary, notre .btn.ghost = leur bouton gris) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.9rem; padding: 0 1.2rem; border-radius: 999px; border: 1px solid #4a0a2d; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; color: #fff !important; text-shadow: 0 1px 1px rgba(0,0,0,.4);
  background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.18) 100%), linear-gradient(90deg, #5c0d38 0%, #a3135f 30%, #c2186f 50%, #a3135f 70%, #5c0d38 100%);
  box-shadow: 0 4px 0 #4a0a2d, 0 3px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:not(:disabled):hover { filter: brightness(1.06); }
.btn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 #5a0b36, inset 0 1px 3px rgba(0,0,0,.35); }
[data-device=phone] .btn:not(.ghost):not(.danger):not(:disabled) { box-shadow: 0 3px 0 #4a0a2d, 0 2px 4px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.32); }
.btn.ghost { color: var(--text) !important; text-shadow: none; }
[data-theme=dark] .btn.ghost { background: linear-gradient(180deg, #3a4251, #2a303b); border: 1px solid #465062; color: #f2f4f8 !important; box-shadow: 0 3px 0 #0f1216, 0 6px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); }
[data-theme=light] .btn.ghost { background: linear-gradient(180deg, #ffffff, #e9edf1); border: 1px solid #c3cad4; box-shadow: 0 3px 0 #b7bec9, 0 6px 10px rgba(20,24,30,.12), inset 0 1px 0 #fff; }
.btn.ghost:not(:disabled):hover, .btn.ghost:not(:disabled):active { filter: none; border-color: var(--pink) !important; box-shadow: 0 0 0 1px var(--pink), 0 4px 12px rgba(236,26,132,.32) !important; }
.btn.danger { background: transparent; border: 1px solid var(--bad); color: var(--bad) !important; text-shadow: none; box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; background: var(--card-2); color: var(--text-3) !important; border-color: var(--line); box-shadow: none; text-shadow: none; filter: none; }
.btn.big { width: 100%; min-height: 3.5rem; font-size: 1.1rem; }
.btn.sm { min-height: 2.2rem; padding: 0 .8rem; font-size: .85rem; }
.link { background: none; border: 0; color: var(--pink-strong); font-weight: 700; padding: 0; }
[data-theme=dark] .link { color: #ff7ab8; }

/* Barre du haut */

/* Page */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.4rem; }
.card h2 { font-size: 1.15rem; margin: 0 0 .9rem; }
.card h3 { font-size: 1rem; margin: 0 0 .6rem; }
.grid { display: grid; gap: 1.1rem; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
.sidecol { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.stack > * + * { margin-top: 1.1rem; }
.empty { text-align: center; color: var(--mute); padding: 2rem 1rem; }

/* Points d'état */
.dot { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--vert); } .dot.mineur { background: var(--orange); } .dot.majeur { background: var(--rouge); } .dot.nv { background: var(--gris); } .dot.na { background: transparent; border: 2px dashed var(--gris); }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .6rem; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.tag.ok, .tag.pret, .tag.regle { color: #0f8a5f; background: #e5f7ef; border-color: #9fe0c4; }
.tag.mineur, .tag.retour, .tag.en_cours { color: #b45309; background: #fff4e0; border-color: #f5c56b; }
.tag.majeur, .tag.quarantaine, .tag.nouveau { color: #c81e1e; background: #fdecec; border-color: #f5a3a3; }
.tag.desinfection { color: var(--rose-f); background: var(--rose-pale); border-color: #f5a3cc; }
.tag.location { color: #1d4ed8; background: #e8efff; border-color: #a9c0f5; }
.tag.nv, .tag.na, .tag.maintenance { color: var(--mute); background: var(--card2); border-color: var(--line); }
[data-theme=dark] .tag.ok, [data-theme=dark] .tag.pret, [data-theme=dark] .tag.regle { color: #34d399; background: #0f2e24; border-color: #1d6b50; }
[data-theme=dark] .tag.mineur, [data-theme=dark] .tag.retour, [data-theme=dark] .tag.en_cours { color: #fbbf24; background: #33270f; border-color: #7a5a14; }
[data-theme=dark] .tag.majeur, [data-theme=dark] .tag.quarantaine, [data-theme=dark] .tag.nouveau { color: #f87171; background: #3a1717; border-color: #7f2a2a; }
[data-theme=dark] .tag.location { color: #93b4ff; background: #17233f; border-color: #2c4a8a; }
[data-theme=dark] .tag.desinfection { color: #ff6fb5; border-color: #7a1f50; }

/* Accueil */
.ready .k { font-size: 1.05rem; color: var(--mute); }
.ready .big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; margin: .4rem 0 1rem; line-height: 1.1; }
.bar { display: flex; height: .8rem; border-radius: 99px; overflow: hidden; background: var(--card2); margin-bottom: 1.1rem; }
.bar i { display: block; height: 100%; }
.bar .ok { background: var(--vert); } .bar .mineur { background: var(--orange); } .bar .majeur { background: var(--rouge); } .bar .nv { background: var(--gris); }
.st-tile { background: var(--card2); border-radius: 14px; padding: 1rem .6rem; text-align: center; border: 0; width: 100%; }
.st-tile .dot { width: 1.6rem; height: 1.6rem; }
.st-tile .n { font-size: 2rem; font-weight: 800; margin-top: .3rem; } .st-tile .l { color: var(--mute); font-weight: 600; }
.todo { display: flex; align-items: center; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo .t { font-weight: 700; font-size: 1.05rem; } .todo .s { color: var(--mute); font-size: .9rem; }
.rep { display: flex; gap: .9rem; align-items: center; background: var(--card2); border-radius: 14px; padding: .9rem 1rem; border: 0; text-align: left; width: 100%; }
.rep img { width: 2.8rem; height: 2.8rem; } .rep .t { font-weight: 700; }
.bigbtn { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; border-radius: 18px; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); margin-bottom: .9rem; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.bigbtn img { width: 3.6rem; height: 3.6rem; flex: none; }
.bigbtn .t { font-weight: 800; font-size: 1.2rem; } .bigbtn .s { color: var(--mute); font-size: .9rem; }
.bigbtn.main { background: linear-gradient(120deg,#8a1350,#c2186f 55%,#7a1048); color: #fff; border: 0; box-shadow: 0 4px 0 #4a0a2d; }
.bigbtn.main .s { color: #ffd1e6; }
.bigbtn .cnt { background: var(--rose); color: #fff; border-radius: 99px; padding: .1rem .6rem; font-weight: 800; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.quick .bigbtn { flex-direction: column; text-align: center; margin: 0; padding: 1.1rem .6rem; }
.quick .bigbtn .t { font-size: 1rem; }

/* Référentiel */
.crit { position: relative; display: flex; flex-direction: column; overflow: hidden; padding-top: 1.5rem; }
.crit::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gris); }
.crit.ok::before { background: var(--vert); } .crit.mineur::before { background: var(--orange); } .crit.majeur::before { background: var(--rouge); }
.crit .code { position: absolute; right: 1.4rem; top: 1.4rem; color: var(--mute); font-size: .9rem; }
.crit h3 { font-size: 1.25rem; margin: .7rem 0 .5rem; }
.crit .miss { color: var(--mute); flex: 1; }
.crit .bot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: .5rem; }
.chap { font-size: .8rem; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; margin: 1.4rem 0 .6rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; } .kv .k { color: var(--mute); } .kv .v { font-weight: 700; text-align: right; }
.box { background: var(--card2); border-radius: 10px; padding: .6rem .8rem; }
.ev { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .pf { display: flex; gap: .5rem; align-items: center; font-size: .9rem; margin-top: .3rem; color: var(--mute); }
.status-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.status-pick button { border: 2px solid var(--line); background: var(--card2); border-radius: 12px; padding: .6rem .3rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .85rem; }
.status-pick button.on { border-color: var(--rose); background: var(--rose-pale); }

/* Tableaux */
.band { background: var(--band); color: #fff; text-align: center; font-weight: 700; padding: .5rem 1rem; border-radius: 6px; margin-bottom: .2rem; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--mute); padding: .6rem .6rem; border-bottom: 1px solid var(--line); }
table.t td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.clk { cursor: pointer; } table.t tr.clk:hover td { background: var(--card2); }
table.t .sub { font-size: .8rem; color: var(--mute); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; text-align: left; width: 100%; }
.stat .l { color: var(--mute); font-weight: 600; } .stat .n { font-size: 2rem; font-weight: 800; }
.stat.on { outline: 2px solid var(--rose); }
.c-location { color: var(--bleu); } .c-retour { color: #d97706; } .c-desinfection { color: var(--rose); } .c-pret { color: #059669; } .c-quarantaine { color: var(--rouge); } .c-maintenance { color: var(--mute); }

/* Matériel / désinfection */
.hero { text-align: center; }
.hero .ic { width: 9rem; height: 9rem; border-radius: 2rem; background: var(--card2); display: inline-flex; align-items: center; justify-content: center; margin: 1rem 0; }
.hero .ic img { width: 7rem; height: 7rem; }
.hero h1 { font-size: 1.6rem; margin: .2rem 0; }
.state { border-radius: 14px; padding: .9rem 1rem; text-align: center; margin: 1.2rem 0; border: 1px solid; }
.state .t { font-weight: 800; font-size: 1.15rem; }
.state.retour, .state.maintenance { background: #fff4e0; border-color: #f5c56b; color: #92400e; }
.state.pret { background: #e5f7ef; border-color: #9fe0c4; color: #065f46; }
.state.location { background: #e8efff; border-color: #a9c0f5; color: #1e3a8a; }
.state.desinfection { background: var(--rose-pale); border-color: #f5a3cc; color: var(--rose-f); }
.state.quarantaine { background: #fdecec; border-color: #f5a3a3; color: #991b1b; }
[data-theme=dark] .state.retour, [data-theme=dark] .state.maintenance { background: #382a12; border-color: #7a5a14; color: #fbbf24; }
[data-theme=dark] .state.pret { background: #0f2e24; border-color: #1d6b50; color: #34d399; }
[data-theme=dark] .state.location { background: #17233f; border-color: #2c4a8a; color: #93b4ff; }
[data-theme=dark] .state.desinfection { color: #ff6fb5; border-color: #7a1f50; }
[data-theme=dark] .state.quarantaine { background: #3a1717; border-color: #7f2a2a; color: #f87171; }
.steps { display: flex; gap: .4rem; justify-content: center; margin: .5rem 0; }
.steps i { width: 2.6rem; height: .35rem; border-radius: 99px; background: var(--line); }
.steps i.done { background: var(--vert); } .steps i.cur { background: var(--rose); }
.timer { font-size: 3.4rem; font-weight: 800; color: var(--rose); text-align: center; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.timeline .it { display: flex; gap: .8rem; padding: .55rem 0; }
.timeline .ck { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex: none; background: var(--card2); color: var(--mute); }
.timeline .ck.done { background: var(--vert); color: #fff; } .timeline .ck.cur { background: var(--rose); color: #fff; }
.check { display: flex; gap: .8rem; align-items: center; background: var(--card2); border-radius: 12px; padding: .9rem 1rem; font-weight: 700; margin: 1rem 0; }
.check input { width: 1.6rem; height: 1.6rem; accent-color: var(--rose); }

/* Signaler */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.cat { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 1.3rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.cat .em { font-size: 3rem; line-height: 1; }
.cat.on { border-color: var(--rose); background: var(--rose-pale); }
.photo { background: var(--card2); border-radius: 18px; min-height: 12rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; border: 2px dashed var(--line); overflow: hidden; position: relative; }
.photo img.pv { max-width: 100%; max-height: 18rem; display: block; }
.ok-big { width: 9rem; height: 9rem; border-radius: 50%; background: var(--vert); color: #fff; font-size: 5rem; display: flex; align-items: center; justify-content: center; margin: 2rem auto 1.2rem; box-shadow: 0 0 0 1.2rem rgba(16,185,129,.18); }
.scan video { width: 100%; border-radius: 18px; background: #000; max-height: 50vh; object-fit: cover; }

/* Droits */
.lvl { border: 0; border-radius: 8px; padding: .25rem .6rem; font-weight: 700; font-size: .8rem; min-width: 4.2rem; }
.lvl.gerer { background: var(--rose); color: #fff; } .lvl.voir { background: #e8efff; color: #1d4ed8; } .lvl.aucun { background: transparent; color: var(--mute); }
[data-theme=dark] .lvl.voir { background: #17233f; color: #93b4ff; }
.lvl.custom { outline: 2px dashed var(--orange); outline-offset: 1px; }

/* Menu, fenêtres, messages */
#toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1d2024; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; } #toast.err { background: #b91c1c; }

/* Connexion / PIN */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(ellipse at 50% 0%, #3a1026 0%, #14171a 60%); }
[data-theme=light] .login-wrap { background: radial-gradient(ellipse at 50% 0%, #fde7f2 0%, #f4f5f7 60%); }
.login { width: min(470px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 2rem 2.2rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login .lg { display: block; width: 100%; max-width: 330px; margin: 0 auto .3rem; }
.login .sub { text-align: center; color: var(--mute); margin-bottom: 1.2rem; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--mute); margin: 1rem 0; font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pwd { position: relative; } .pwd button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.1rem; }
.pin-dots { display: flex; justify-content: center; gap: 1rem; margin: 1.4rem 0; }
.pin-dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--mute); }
.pin-dots i.on { background: var(--rose); border-color: var(--rose); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; max-width: 300px; margin: 0 auto; }
.pad button { height: 4rem; border-radius: 50%; border: 0; background: var(--card2); font-size: 1.5rem; font-weight: 700; aspect-ratio: 1; height: auto; justify-self: center; width: 4.4rem; }
.pad button.fn { background: none; font-size: 1.2rem; }
.err { color: var(--rouge); font-weight: 600; text-align: center; min-height: 1.3rem; margin: .4rem 0; }
.people-demo { display: grid; gap: .4rem; max-height: 50vh; overflow: auto; }
.people-demo button { text-align: left; background: var(--card2); border: 0; border-radius: 10px; padding: .6rem .8rem; }

/* ===== Téléphone : détecté par l'appareil, pas par la largeur ===== */
[data-device=phone] body { overflow-x: hidden; }
[data-device=phone] .grid { grid-template-columns: 1fr; }
[data-device=phone] .g4.keep, [data-device=phone] .g2.keep { grid-template-columns: 1fr 1fr; }
[data-device=phone] .card { padding: 1rem; }
[data-device=phone] .ready .big { font-size: 1.8rem; }
[data-device=phone] .quick { grid-template-columns: 1fr; }
[data-device=phone] .quick .bigbtn { flex-direction: row; text-align: left; }
[data-device=phone] table.t .hide-phone { display: none; }
[data-device=phone] .status-pick { grid-template-columns: repeat(3, 1fr); }
[data-device=phone] .login { padding: 1.5rem 1.2rem; }
[data-device=phone] .crit h3 { font-size: 1.1rem; }
.only-phone { display: none; } [data-device=phone] .only-phone { display: revert; } [data-device=phone] .only-pc { display: none !important; }

@media print { .top, .foot, .help, .btn { display: none !important; } body { background: #fff; color: #000; } }
.rep .em, .cat-em { font-size: 2.2rem; line-height: 1; flex: none; }
.pv.photo-full { max-width: 100%; border-radius: 12px; display: block; }
.twrap { overflow-x: auto; }
#dz { max-width: 680px; margin: 0 auto; }
.login .btn { white-space: normal; text-align: center; }

/* ===== V0.1.2 : logo centré, bouton Installer, accueil PC sans barre de défilement ===== */
.home.stack > * + * { margin-top: .8rem; }
.home .grid { gap: .8rem; }
.home .card { padding: .9rem 1.2rem; }
.home .card h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.home .ready .k { font-size: .95rem; }
.home .ready .big { font-size: 2rem; margin: .15rem 0 .6rem; }
.home .bar { height: .6rem; margin-bottom: .7rem; }
.home .st-tile { padding: .5rem .4rem; border-radius: 12px; }
.home .st-tile .dot { width: 1rem; height: 1rem; }
.home .st-tile .n { font-size: 1.5rem; margin-top: .1rem; line-height: 1.15; }
.home .st-tile .l { font-size: .85rem; }
.home .todo { padding: .5rem 0; }
.home .todo .t { font-size: .98rem; }
.home .empty { padding: .8rem 1rem; }
.home .rep { padding: .6rem .8rem; }
.home .rep .em { font-size: 1.7rem; }
:root:not([data-device=phone]) .home .quick { gap: .8rem; }
:root:not([data-device=phone]) .home .quick .bigbtn { flex-direction: row; justify-content: center; text-align: left; padding: .6rem .8rem; gap: .7rem; border-radius: 14px; }
:root:not([data-device=phone]) .home .quick .bigbtn img { width: 2.4rem; height: 2.4rem; }
:root:not([data-device=phone]) .home .quick .bigbtn .t { font-size: .98rem; }
/* Téléphone : la barre du haut tient dans la largeur, logo au milieu */

/* ===================== V0.2.0 · kit d'interface AS Connect ===================== */
:root { --top-h: 4.6rem; --side-w: 16rem; --rail-w: 4.7rem; --pink: #ec1a84; --pink-strong: #c8156f; --text-2: #474e57; --sep: #d5d9de; }
[data-theme=dark] { --text-2: #c2c8cf; --sep: #3a3e46; }
body.noscroll { overflow: hidden; }
a { color: var(--pink-strong); }
[data-theme=dark] a { color: #ff6fb5; }

.tocon { display: inline-flex; align-items: center; border: 1.5px solid #c9a400; background: #1d1a10; color: #f2cf4a !important; border-radius: 999px; padding: .32rem .8rem; font-weight: 800; font-size: .85rem; white-space: nowrap; flex: none; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
[data-theme=light] .tocon { background: #fffbea; color: #5a4600 !important; }
.tocon:hover { border-color: #f2cf4a; }

/* Page : en-tête « ‹ titre · onglets · ? » sur une ligne (PC) */
.head { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; min-height: 2.6rem; }
.head h1 { font-size: 1.35rem; margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.head .back { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--pink); background: transparent; color: var(--text); font-size: 1.5rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0 0 .2rem; flex: none; }
.head .mid { flex: 1; min-width: 0; display: flex; justify-content: center; gap: .5rem; align-items: center; }
.head .right { display: flex; gap: .5rem; align-items: center; flex: none; }
.help { flex: none; }
.head .mid input[type=search] { width: 14rem; }
/* Onglets et boutons groupés en pilules (.pgrp / .seg) : jamais d'écriture rose hors onglet choisi */
.seg, .pgrp { display: inline-flex; border-radius: 999px; background: var(--card); border: 1.5px solid var(--sep); padding: 3px; gap: 2px; box-shadow: 0 2px 0 rgba(0,0,0,.18); flex: none; align-items: center; }
.seg > button, .pgrp > button, .pgrp > a, .more-btn { border: 0; background: none; color: var(--text) !important; font: inherit; font-weight: 700; font-size: .88rem; padding: .34rem .72rem; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.seg > button.on, .pgrp > .on, .more-btn.on { background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.18) 100%), linear-gradient(90deg, #5c0d38 0%, #a3135f 30%, #c2186f 50%, #a3135f 70%, #5c0d38 100%); color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.35); }
.seg > button:disabled, .pgrp > button:disabled { opacity: .45; }
.more-wrap { position: relative; display: inline-flex; }
.more-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; background: #1b1e24; border: 1px solid #3a3e46; border-radius: 12px; padding: .3rem; display: flex; flex-direction: column; min-width: 12rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.more-list > button { border: 0; background: none; color: #fff !important; font-weight: 700; text-align: left; padding: .5rem .7rem; border-radius: 8px; }
.more-list > button:hover, .more-list > button.on { background: #a3135f; }

/* Boutons */

/* Fenêtres : du bas sur téléphone, centrées sur PC ; Annuler à gauche, bouton rose à droite */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .2rem; animation: sh-up .2s ease-out; }
.sheet .grab { width: 3rem; height: .3rem; border-radius: 1rem; background: var(--line); margin: 0 auto .5rem; flex: none; }
.sheet h2 { margin: .2rem 0 .5rem; font-size: 1.2rem; }
.sheet-back.center { align-items: center; padding: 1rem; background: rgba(10,12,16,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-back.center .sheet { border-radius: 18px; max-width: 40rem; width: min(40rem, 94vw); padding: 1.3rem 1.5rem 1.2rem; animation: sh-pop .18s ease-out; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.sheet.confirm-box { max-width: 30rem !important; border: 2px solid rgba(236,26,132,.55); }
.sheet.wide { max-width: 56rem !important; width: min(56rem, 96vw) !important; }
@keyframes sh-up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes sh-pop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.acts, .actions { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.acts > :only-child { margin-left: auto; }
[data-device=phone] .sheet .acts { flex-direction: column-reverse; }
[data-device=phone] .sheet .acts .btn { width: 100%; padding: .85rem; }

/* Dépôt de fichiers */
.dz { position: relative; }
body.dz-drag .dz { outline: 2.5px dashed rgba(236,26,132,.7); outline-offset: 3px; }
.dz.dz-over { outline: 3px dashed var(--pink) !important; outline-offset: 3px; }
.dz.dz-over::after { content: attr(data-drop-label); position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(236,26,132,.12); color: var(--pink-strong); font-weight: 800; font-size: 1.1rem; border-radius: inherit; }
.drop-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1.2rem 1rem; border: 2.5px dashed rgba(236,26,132,.55); border-radius: 16px; background: rgba(236,26,132,.04); color: var(--mute); cursor: pointer; text-align: center; margin: .3rem 0; }
.drop-box:hover { border-color: var(--pink); background: rgba(236,26,132,.08); }
.drop-box .db-pc { display: flex; flex-direction: column; gap: .15rem; }
.drop-box .db-pc b { color: var(--text); font-size: 1.05rem; }
.drop-box .db-or u { color: var(--pink-strong); font-weight: 800; }
.drop-box .db-phone { display: none; }
.drop-box.dz-over > * { visibility: hidden; }
.drop-box.db-done { border-style: solid; border-color: var(--vert); background: rgba(16,185,129,.07); }
[data-device=phone] .drop-box { border: 0; background: none; padding: 0; }
[data-device=phone] .drop-box .db-ico, [data-device=phone] .drop-box .db-pc { display: none; }
[data-device=phone] .drop-box .db-phone { display: inline-flex; width: 100%; padding: .85rem; }

/* Notifications */
.notifs { display: flex; flex-direction: column; gap: .5rem; max-width: 52rem; margin: 0 auto; }
.notif { display: flex; align-items: center; gap: .8rem; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.notif.unread { background: color-mix(in srgb, var(--pink) 8%, var(--card)); border-color: color-mix(in srgb, var(--pink) 40%, var(--line)); }
.notif .t { display: block; font-weight: 800; } .notif .s { display: block; color: var(--mute); font-size: .9rem; } .notif .d { display: block; color: var(--mute); font-size: .8rem; margin-top: .15rem; }
.notif .ndot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--pink); flex: none; }
.chev { color: var(--mute); font-size: 1.5rem; line-height: 1; flex: none; }

/* Mes réglages */
.settings { max-width: 46rem; margin: 0 auto; }
.jumps { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-bottom: 1rem; }
.jump { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .88rem; }
.set-h { text-transform: uppercase; letter-spacing: .08em; color: var(--pink); font-size: .95rem; margin: 1.6rem 0 .6rem; scroll-margin-top: calc(var(--top-h) + 1rem); }
[data-theme=dark] .set-h { color: #ff6fb5; }
.set-sub { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 800; color: var(--mute); }
.idc { display: flex; gap: 1rem; align-items: center; }
.idc .av { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #2f7dd1; color: #fff; font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; flex: none; }
.big1 { font-size: 1.15rem; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.tiles3.t4 { grid-template-columns: repeat(2, 1fr); }
.stile { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: var(--card2); border: 2px solid var(--line); border-radius: 14px; padding: .8rem .4rem; color: var(--text); }
.stile.on { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.sw { width: 3rem; height: 1.9rem; border-radius: 6px; border: 1px solid var(--line); }
.sw-auto { background: linear-gradient(90deg, #fff 50%, #1b1e23 50%); } .sw-light { background: #fff; } .sw-dark { background: #1b1e23; }
.aa { font-size: 1.1rem; } .aa1 { font-size: 1.3rem; } .aa2 { font-size: 1.5rem; } .aa3 { font-size: 1.7rem; }
.kv.dev { align-items: center; }

/* Menu du téléphone */
.menu-list { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: .3rem; border-bottom: 1px solid var(--line); }
.menu-list .item, .menu-acts .item { display: flex; align-items: center; gap: .9rem; padding: .75rem .3rem; flex: 1; min-width: 0; color: var(--text) !important; font-size: 1.15rem; font-weight: 700; background: none; border: 0; text-align: left; width: 100%; }
.menu-list .item.on .nl { color: var(--pink); }
.menu-list .nav-ic img { width: 2.4rem; height: 2.4rem; }
.menu-list .item .nl, .menu-acts .item .nl { flex: 1; }
.menu-acts { margin-top: .4rem; }
.menu-acts .item { font-size: 1rem; padding: .55rem .3rem; }
.nav-ic.em { width: 2.4rem; justify-content: center; font-size: 1.4rem; }
.rk-btns { display: flex; gap: .2rem; } .rk-btns button { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card2); }

/* Installation */
.inst-head { display: flex; align-items: center; gap: .8rem; }
.inst-head img { width: 3.6rem; height: 3.6rem; border-radius: 14px; flex: none; }
.inst-head h2 { margin: 0; }
.sheet .lead { font-size: 1.08rem; }
.ios-steps { display: flex; flex-direction: column; gap: .6rem; margin: .6rem 0; }
.ios-step { display: flex; align-items: center; gap: .8rem; background: var(--card2); border-radius: 12px; padding: .7rem .8rem; font-size: 1.05rem; }
.ios-step .n { width: 2rem; height: 2rem; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.share-ic { display: inline-flex; width: 1.6rem; height: 1.6rem; border: 2px solid #2f7dd1; color: #2f7dd1; border-radius: 6px; align-items: center; justify-content: center; font-weight: 800; }
.ios-arrow { text-align: center; font-size: 2.4rem; color: var(--pink); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }
.inst-banner { background: color-mix(in srgb, var(--pink) 10%, var(--card)); border: 1.5px solid var(--pink); border-radius: 14px; padding: .8rem 1rem; margin-bottom: .8rem; text-align: center; }
.inst-banner .btn { margin-top: .6rem; width: 100%; }
.login .foot { text-align: center; font-size: .75rem; color: var(--mute); padding-top: 1rem; line-height: 1.5; }

/* ===== Téléphone (détecté par l'appareil) ===== */
[data-device=phone] .tocon { padding: .25rem .5rem; font-size: .72rem; }
[data-device=phone] .head { flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; min-height: 0; }
[data-device=phone] .ptitle .head > .back, [data-device=phone] .ptitle .head > h1 { display: none; }
[data-device=phone] .head > h1 { font-size: 1.3rem; flex: 1; min-width: 0; white-space: normal; }
:root:not([data-device=phone]) .only-phone { display: none !important; }
[data-device=phone] .head .mid { order: 3; flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
[data-device=phone] .head .right { margin-left: auto; flex-wrap: wrap; }
[data-device=phone] .head .help { width: 1.95rem; height: 1.95rem; margin-left: auto; }
[data-device=phone] .head:has(> .right) .help { margin-left: 0; }
[data-device=phone] .tiles3 { grid-template-columns: 1fr 1fr 1fr; }
[data-device=phone] .tiles3.t4 { grid-template-columns: 1fr 1fr; }
[data-device=phone] .head:not(:has(.mid > *)) .mid { display: none; }

/* ===== Livraisons ===== */
.lv-count { font-size: 1.5rem; margin: .2rem 0 .9rem; }
.lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .9rem; }
.lvcard { display: flex; flex-direction: column; gap: .45rem; cursor: pointer; }
.lvcard.todo-on { border: 2px solid var(--pink); }
.lvcard .lv-dos { font-size: 1.15rem; }
.lv-emo { font-size: 1.8rem; line-height: 1.1; }
.lvcard .btn.big { margin-top: .3rem; }
.lvflow { max-width: 62rem; margin: 0 auto; }
.items-tabs { margin-bottom: .6rem; flex-wrap: wrap; }
.edl-title { font-size: 1.35rem; margin: .2rem 0 .7rem; }
.faces { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; margin-bottom: .7rem; }
.faces button { border: 2px solid var(--line); background: var(--card); color: var(--text); border-radius: 12px; padding: .55rem .4rem; font-weight: 700; }
.faces button.on { border-color: var(--pink); color: var(--pink-strong); background: color-mix(in srgb, var(--pink) 7%, var(--card)); }
.edl { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: crosshair; touch-action: manipulation; user-select: none; }
.edl img { display: block; width: 100%; height: auto; aspect-ratio: 400 / 260; object-fit: contain; pointer-events: none; }
.edl .mk { position: absolute; transform: translate(-50%, -50%); width: 2rem; height: 2rem; border-radius: 50%; background: #ef4444; color: #fff; font-weight: 800; font-size: .9rem; border: 2px solid #fff; box-shadow: 0 0 0 5px rgba(239,68,68,.25), 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 0; }
.small-edl { border-radius: 10px; cursor: default; }
.small-edl .mk { width: 1.3rem; height: 1.3rem; font-size: .7rem; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
:root:not([data-device=phone]) .lvflow .edl { max-width: 44rem; margin: 0 auto; }
.ok-btn { background: linear-gradient(180deg, #16c08a, #0e9a6d) !important; box-shadow: 0 4px 0 #0b7a56 !important; margin: .4rem 0 1rem; }
:root:not([data-device=phone]) .ok-btn { display: flex; max-width: 44rem; margin-left: auto; margin-right: auto; }
.marks { margin-top: .4rem; }
.mkn { display: inline-flex; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #ef4444; color: #fff; font-size: .75rem; align-items: center; justify-content: center; }
.mkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
[data-device=phone] .mkgrid { grid-template-columns: 1fr 1fr; }
.mkk { border: 2px solid var(--line); background: var(--card2); color: var(--text); border-radius: 16px; padding: .9rem .4rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; font-weight: 700; }
.mkk .em { font-size: 1.9rem; line-height: 1; }
.mkk.on { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 9%, var(--card)); }
.big-check { font-size: 1.1rem; padding: 1.1rem 1rem; margin: 0; }
.big-check .em { font-size: 1.4rem; }
.sigbox { border: 2px dashed var(--line); border-radius: 14px; padding: .7rem; display: flex; align-items: center; gap: .8rem; justify-content: space-between; min-height: 5rem; }
.sigbox.done { border-style: solid; border-color: var(--vert); }
.sigbox img { max-height: 4.5rem; max-width: 60%; background: #fff; border-radius: 8px; }
.sigshow { margin: 0; text-align: center; } .sigshow img { width: 100%; background: #fff; border-radius: 10px; border: 1px solid var(--line); } .sigshow figcaption { font-size: .85rem; color: var(--mute); }
.paper-ph { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.edl-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.edl-mini figure, .bon-faces figure { margin: 0; text-align: center; } .edl-mini figcaption, .bon-faces figcaption { font-size: .78rem; color: var(--mute); }
.lv-sum { margin-bottom: .8rem; }
.steps3 { flex-wrap: nowrap; }
/* Pavé de signature (plein écran, à l'horizontale) */
.sigpad { position: fixed; inset: 0; z-index: 90; background: #f4f5f7; color: #1d2024; display: flex; }
.sigpad .turn { display: none; }
.sigpad.portrait .turn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; padding: 2rem; width: 100%; font-size: 1.15rem; }
.sigpad.portrait .pad-area { display: none; }
.turn-ic { font-size: 4.5rem; animation: turn 1.6s ease-in-out infinite; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
.pad-area { flex: 1; display: flex; flex-direction: column; padding: max(.6rem, env(safe-area-inset-top)) max(.8rem, env(safe-area-inset-right)) max(.6rem, env(safe-area-inset-bottom)) max(.8rem, env(safe-area-inset-left)); gap: .4rem; }
.pad-top { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.pad-top b { font-size: 1.15rem; }
.pad-area canvas { flex: 1; width: 100%; min-height: 0; background: #fff; border: 2px solid #d5d9de; border-radius: 14px; touch-action: none; }
.pad-line { text-align: center; font-size: .8rem; color: #6b7280; margin-top: -2.2rem; margin-bottom: 1.2rem; border-top: 2px dashed #c9cdd4; margin-left: 6%; margin-right: 6%; padding-top: .2rem; pointer-events: none; }
.pad-acts { display: flex; gap: .6rem; justify-content: space-between; }
.pad-acts .btn.ghost { background: #fff; color: #1d2024; }
:root:not([data-device=phone]) .sigpad { background: rgba(10,12,16,.6); align-items: center; justify-content: center; }
:root:not([data-device=phone]) .pad-area { flex: none; width: min(70rem, 94vw); height: min(30rem, 80vh); background: #f4f5f7; border-radius: 18px; padding: 1rem 1.2rem; }
/* Bon papier */
.bon { background: #fff; color: #111; max-width: 200mm; margin: 0 auto; padding: 12mm; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.2); font-size: 11pt; }
.bon h2 { font-size: 12pt; margin: 6mm 0 2mm; border-bottom: 1.5px solid #ec1a84; padding-bottom: 1mm; }
.bon-head { display: flex; justify-content: space-between; align-items: flex-start; }
.bon-logo { height: 16mm; }
.bon-qr { text-align: center; } .bon-qr svg { width: 30mm; height: 30mm; display: block; }
.bon-t { font-size: 18pt; margin: 2mm 0 4mm; }
.bon-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; } .bon-meta div { border: 1px solid #ccc; border-radius: 3mm; padding: 2mm 3mm; } .bon-meta span { display: block; font-size: 8.5pt; color: #555; }
.bon-item { border: 1px solid #ddd; border-radius: 3mm; padding: 2mm 3mm; margin-bottom: 3mm; break-inside: avoid; }
.bon-faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm; margin: 2mm 0; }
.bon .small-edl { border: 1px solid #ddd; }
.bon-lines .line { border-bottom: 1px dotted #999; height: 7mm; }
.bon-checks { display: flex; gap: 6mm; flex-wrap: wrap; }
.bon-stmt { font-weight: 700; margin: 5mm 0 3mm; }
.bon-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; } .bon-sign > div { border: 1.5px solid #333; border-radius: 3mm; padding: 2mm 3mm; } .bon-sign span { display: block; font-size: 9pt; color: #555; } .sigzone { height: 28mm; }
.bon-foot { color: #666; margin-top: 4mm; }
@media print {
  @page { size: A4; margin: 8mm; }
  .top, .side, .head, .nav-tip, #toast, .sheet-back { display: none !important; }
  .shell { margin: 0 !important; padding: 0 !important; } main { padding: 0 !important; }
  body, html { background: #fff !important; }
  .bon { box-shadow: none; padding: 0; max-width: none; }
}
/* Photos du matériel (Paramètres) */
.eqimgs { display: flex; flex-direction: column; gap: .7rem; }
.eq-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .4rem; margin-top: .3rem; }
.eq-f { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .3rem; display: flex; flex-direction: column; gap: .2rem; color: #1d2024; font-size: .78rem; font-weight: 600; }
.eq-f img { width: 100%; aspect-ratio: 400/260; object-fit: contain; }
.eq-big { width: 100%; max-height: 16rem; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
[data-device=phone] .lvgrid { grid-template-columns: 1fr; }
[data-device=phone] .steps3 > button { padding: .34rem .5rem; font-size: .8rem; }

/* ===== V0.2.0 · Audits ===== */
.aud-info { gap: .6rem; margin: -.2rem 0 .9rem; align-items: center; }
.aud-info a { font-weight: 700; color: var(--pink); }
.aud-band { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.aud-band .bar { margin: .8rem 0 .6rem; }
.aud-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.an { border-radius: 12px; padding: .6rem .8rem; background: var(--card2); border-left: 4px solid var(--gris); display: flex; flex-direction: column; }
.an b { font-size: 1.6rem; line-height: 1.1; }
.an span { font-size: .8rem; color: var(--mute); font-weight: 700; }
.an.ok { border-left-color: var(--vert); } .an.mineur { border-left-color: var(--orange); } .an.majeur { border-left-color: var(--rouge); }
.mini-band { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.aud-card { cursor: pointer; display: flex; flex-direction: column; gap: .3rem; transition: border-color .15s; }
.aud-card:hover { border-color: var(--pink); }
.aud-t td:last-child, .aud-t th:last-child { width: 1%; white-space: nowrap; }
.crit-aud h3 { font-size: .95rem; margin: 0 0 .3rem; color: var(--pink); }
.crit-aud p { margin: 0; }
.ca-t { font-size: 1.25rem; margin: 0; }
.aud-zone h3 { margin: 0; }
.aud-zone textarea { min-height: 8rem; }
:root:not([data-device=phone]) .aud-zone { position: sticky; top: calc(var(--top-h) + 1rem); }
.vpick { display: grid; grid-template-columns: 1fr; gap: .5rem; }
.vbtn { border: 2px solid var(--line); background: var(--card2); color: var(--text); border-radius: 12px; padding: .7rem .9rem; font-weight: 800; text-align: left; cursor: pointer; }
.vbtn.ok.on { border-color: var(--vert); background: #e5f7ef; color: #0f8a5f; }
.vbtn.mineur.on { border-color: var(--orange); background: #fff4e0; color: #b45309; }
.vbtn.majeur.on { border-color: var(--rouge); background: #fdecec; color: #c81e1e; }
[data-theme=dark] .vbtn.ok.on { background: #0f2e24; color: #34d399; }
[data-theme=dark] .vbtn.mineur.on { background: #33270f; color: #fbbf24; }
[data-theme=dark] .vbtn.majeur.on { background: #3a1717; color: #f87171; }
.pres-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.pres-banner { display: flex; align-items: center; gap: 1rem; justify-content: space-between; background: var(--band); color: #fff; font-weight: 800; padding: .7rem 1rem; border-radius: 14px; margin-bottom: 1rem; }
.pres-banner .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.pres { max-width: 60rem; margin: 0 auto; font-size: 1.08rem; }
.pres .ca-t { font-size: 1.5rem; }
.pres + .pres-nav { max-width: 60rem; margin-left: auto; margin-right: auto; }
.scope { display: flex; flex-direction: column; gap: .4rem; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: .4rem; }
.sc-ch { border-radius: 10px; background: var(--card2); }
.sc-ch > summary { list-style: none; cursor: pointer; padding: .2rem .4rem; }
.sc-ch > summary::-webkit-details-marker { display: none; }
.sc-ch > summary::before { content: "▸"; color: var(--pink); font-weight: 800; margin-right: .3rem; float: left; padding-top: .75rem; }
.sc-ch[open] > summary::before { content: "▾"; }
.check.sc-head { margin: 0; background: transparent; padding: .5rem .4rem; font-weight: 600; }
.sc-list { padding: 0 .4rem .5rem 1.8rem; display: flex; flex-direction: column; gap: .15rem; }
.check.sc-c { margin: 0; padding: .4rem .6rem; font-weight: 500; background: var(--card); border-radius: 8px; font-size: .92rem; }
.check.sc-c input, .check.sc-head input { width: 1.25rem; height: 1.25rem; }
.traces { max-height: 60vh; overflow: auto; }
.traces .kv .k { color: var(--text); }
.code6 { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.cmp-n { gap: .5rem; margin: 1rem 0; }
.aud-top .state-pill { border-color: var(--pink); color: var(--pink); }
.aud-shell { margin-left: 0 !important; }
.aud-shell main { max-width: 80rem; margin: 0 auto; padding: 1.2rem 1.4rem 2rem; }
.aud-shell .ver { text-align: center; font-size: .75rem; color: var(--mute); margin-top: 2rem; }
.aud-brand { flex: 1; }
[data-device=phone] .aud-nums { grid-template-columns: 1fr 1fr; }
[data-device=phone] .an b { font-size: 1.3rem; }
[data-device=phone] .aud-grid { grid-template-columns: 1fr; }
[data-device=phone] .pres-banner { flex-direction: column; align-items: stretch; text-align: center; }
[data-device=phone] .aud-top .state-pill { display: none; }
[data-device=phone] .aud-shell main { padding: .9rem .8rem 2rem; }
@media print { .pres-nav, .pres-banner, .aud-zone .btn { display: none !important; } }
.aud-grid { grid-template-columns: minmax(0, 1fr) 24rem; align-items: start; }
.keep input[type=date] { min-width: 0; width: 100%; }
[data-device=phone] .aud-top .brand.aud-brand { display: flex; }
.edl-title .edl-sub { display: block; font-weight: 600; margin-top: .2rem; }
.card.stack > * + h3 { margin-top: 1.3rem; }
[data-device=phone] .sigbox { flex-direction: column; align-items: stretch; text-align: center; }
[data-device=phone] .sigbox img { max-width: 100%; align-self: center; }

/* ===================== V0.3.0 · coquille d'AS Connect (asc.css) : compléments propres à AS Qualité ===================== */
.pc-only, .ph-only { display: inline; }
[data-device=phone] .pc-only, :root:not([data-device=phone]) .ph-only { display: none !important; }
.muted { color: var(--text-3); }
/* Bouton retour de la page (PC) : rond à bord rose, comme AS Connect */
.head .back { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 2px solid var(--pink); background: var(--card); color: var(--text); box-shadow: 0 3px 0 rgba(0,0,0,.25); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; cursor: pointer; }
.head .back:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.head .back svg { width: 26px; height: 26px; }
.head h1 { font-size: 1.5rem; }
.top-title .back { border-radius: 50%; border: 2px solid var(--pink); background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.25); color: var(--text); }
/* Téléphone : titre et retour dans la barre du haut ; la ligne de la page ne garde que onglets et boutons, vide elle disparaît */
[data-device=phone] .head > .back, [data-device=phone] .head > h1 { display: none; }
[data-device=phone] .head.head-empty { display: none; }
[data-device=phone] .head .help-mini { margin-left: auto; }
/* Zone de la page : celle d'AS Connect (main.page), en bloc (nos écrans gèrent leurs propres espacements) */
main.page { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem 6rem; display: block; box-sizing: border-box; }
main.page.wide { max-width: 1400px; }
:root:not([data-device=phone]) main.page { padding: 1rem 1.6rem 3rem; }
[data-device=phone] main.page { padding: .5rem .75rem calc(5rem + env(safe-area-inset-bottom)); }
.tocon { display: inline-flex; align-items: center; border: 1.5px solid #c9a400; background: #1d1a10; color: #f2cf4a !important; border-radius: 999px; padding: .32rem .8rem; font-weight: 800; font-size: .85rem; white-space: nowrap; flex: none; box-shadow: 0 2px 4px rgba(0,0,0,.2); text-decoration: none; }
[data-theme=light] .tocon { background: #fffbea; color: #5a4600 !important; }
.tocon:hover { border-color: #f2cf4a; }
[data-device=phone] .tocon { padding: .22rem .5rem; font-size: .72rem; }
.who .av { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #2f7dd1; color: #fff; font-weight: 800; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.who-av { text-decoration: none; }
/* Icônes en relief (images) dans les boutons de l'accueil, le menu et les réglages */
.bubble.b3d { background: none !important; border: 0 !important; box-shadow: none !important; }
.bubble.b3d img, .ico-sample img, .cust3d img { width: 100%; height: 100%; display: block; object-fit: contain; }
.nav-ic img.nav3d, .nav-ic img.menu3d, .nav-ic img.asi-home { display: block; object-fit: contain; }
.cust3d { display: inline-flex; width: 1.9rem; height: 1.9rem; vertical-align: middle; flex: none; }
.ico-sample { display: inline-flex; width: 2.6rem; height: 2.6rem; }
/* Livraisons du jour : rose seulement quand il y en a */
.tile.hot, :root[data-theme] .tile.hot { background: linear-gradient(120deg, #8a1350, #c2186f 55%, #7a1048) !important; color: #fff !important; border-color: #a80f5b !important; box-shadow: 0 4px 0 #4a0a2d !important; }
.tile.hot .s { color: #ffd1e6 !important; }
.tile.hot .pastille { background: #fff; color: var(--pink-strong); }
/* Accueil */
.home-lay .card { margin: 0; }
.home-todo h3 { margin: 0 0 .3rem; }
.home-lay .ready .big { white-space: normal; }
.home-lay .ready .big .rose { white-space: nowrap; }
.hello { margin-bottom: .7rem; }
.install-card { display: flex; flex-direction: column; gap: .2rem; }
.cust-item .ck { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.cust-item .ck input { width: 1.2rem; height: 1.2rem; accent-color: var(--pink); }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: .25rem .7rem; font-weight: 700; font-size: .8rem; cursor: pointer; }
/* Mes réglages : aperçus */
.zoom-sample { font-weight: 800; display: block; line-height: 1.2; }
.zoom-sample.zs0 { font-size: 1rem; } .zoom-sample.zs1 { font-size: 1.25rem; } .zoom-sample.zs2 { font-size: 1.5rem; } .zoom-sample.zs3 { font-size: 1.75rem; }
.app-sample { display: inline-flex; gap: .3rem; justify-content: center; }
.app-sample img { width: 3rem; height: 3rem; border-radius: 22%; display: block; }
.app-sample.split img { width: 2.4rem; height: 2.4rem; }
/* Logo en texte sur la connexion, l'accès auditeur et le bon papier */
.login .biglogo { margin: .2rem 0 .6rem; }
.bon .biglogo { margin: 0; justify-content: flex-start; }
.bon .biglogo .w1 { color: #111; font-size: 1.6rem; }
.bon .biglogo .w2 { font-size: 1.6rem; -webkit-text-stroke: 0; }
.bon .biglogo .cross { height: 2.4rem; }
.aud-shell { margin: 0 !important; }
.aud-top .brand { display: flex; }
/* Téléphone : barre du haut comme AS Connect ; le lien vers l'autre logiciel est dans le menu ☰ (pas de place dans la barre) */
[data-device=phone] .top .tocon { display: none; }
[data-device=phone] .top-mid { justify-content: safe center; overflow: hidden; }
[data-device=phone] .top.has-title .state-pill { display: none; }
/* Logo de la barre : même taille qu'AS Connect (V0.5.2) */
/* Même taille qu'AS Connect quand la place le permet ; sinon le logo se réduit juste assez pour tenir en entier (pastille D/E) */
html[data-device=phone] .top-mid { container-type: inline-size; }
html[data-device=phone] .top .brand .logo-word { font-size: min(clamp(17px, 5.3vw, 22px), 10.3cqw) !important; }
html[data-device=phone] .top .brand .cross { height: min(clamp(28px, 8.6vw, 36px), 16.8cqw) !important; margin: 0 min(6px, 2.7cqw) !important; }
[data-device=phone] .head .mid { flex: 1 1 0; order: 1; }
[data-device=phone] .head .help-mini { order: 2; }
.section-title { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: .6rem 0 0; }
.sheet { text-align: left; }
.sheet h2 { text-align: left; }
.cust-list { display: flex; flex-direction: column; margin-top: .3rem; }
.cust-list .item { display: flex; align-items: center; gap: .55rem; padding: .45rem .2rem; border-bottom: 1px solid var(--line-2); }
.cust-list .item:not(.on) { opacity: .75; }
.cust-list .grip { cursor: grab; color: var(--text-3); display: inline-flex; touch-action: none; }
.cust-list .item.dragging { opacity: .5; }
.cust-meta { display: inline-flex; gap: .4rem; align-items: center; flex: none; }
.cust-list .mv { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); flex: none; }
.cust-list .mv:disabled { opacity: .35; }
:root:not([data-device=phone]) .head { flex-wrap: wrap; row-gap: .5rem; }
:root:not([data-device=phone]) .head h1 { flex: none; }
.head .btn { min-height: 2.4rem; padding: 0 .9rem; font-size: .92rem; }
.head .mid input[type=search] { width: 12rem; }
.home-lay .ready .big { font-size: 2.1rem; }
.cancel-btn { margin-top: .9rem; }
:root:not([data-device=phone]) .head .mid { flex: 1 1 auto; min-width: max-content; }
.idc .grow { min-width: 0; overflow-wrap: anywhere; }
[data-device=phone] .aff-opt { padding-left: .1rem; padding-right: .1rem; }
[data-device=phone] .aff-opt b { font-size: .74rem; letter-spacing: -.01em; }

/* ---------- V0.5.2 : écran « Mise à jour » (comme AS Connect) ---------- */
.upd .upd-h { margin: 0; font-size: 1.15rem; }
.upd .card > h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.upd .vnote { margin-top: .7rem; }
.vnote.ok { background: #e3f6ea; border-color: #9fd9b3; color: #1d6b3a; }
:root[data-theme="dark"] .vnote.ok { background: #1f3a28; border-color: #2c5a3a; color: #8fdca8; }
.upd-file { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.upd-file details summary { cursor: pointer; margin-top: .3rem; }
.upd code.sha { font-size: .78rem; overflow-wrap: anywhere; }
.upd .acts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: .8rem 0 .5rem; }
.upd .card .acts:has(> :only-child) { grid-template-columns: 1fr; }
.upd .upd-run { display: block; }
.upd .spin { display: inline-block; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: upd-spin .8s linear infinite; }
@keyframes upd-spin { to { transform: rotate(360deg); } }
.upd-steps li { margin: .3rem 0; }
.upd-steps code { overflow-wrap: anywhere; }

/* ---------- V0.5.2 : page de connexion sur téléphone (le grand logo suit la largeur de l'écran) ---------- */
.login-wrap { overflow-x: hidden; }
.login { min-width: 0; max-width: 100%; }
.login .biglogo { max-width: 100%; }
.login .biglogo .w1, .login .biglogo .w2 { font-size: clamp(1.35rem, 8.2vw, 2.1rem); }
.login .biglogo .cross { height: clamp(2.1rem, 12.5vw, 3.2rem); margin: 0 clamp(.12rem, 1vw, .3rem); }
.upd .upd-run { background: #e4eefc; border-color: #b4cdf3; color: #1f4f8f; }
:root[data-theme="dark"] .upd .upd-run { background: #1c2b40; border-color: #2b4466; color: #9cc4f5; }
.disk-bar { height: 12px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; margin: .7rem 0 .4rem; }
.disk-bar span { display: block; height: 100%; background: linear-gradient(90deg, #1f9d55, #3fbf73); }
.disk-bar.low span { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.upd .btn:disabled { opacity: .45; }
.upd .acts .btn { white-space: normal; min-width: 0; text-align: center; }
.upd .acts > * { min-width: 0; }
.btn.wrap-btn { white-space: normal; min-width: 0; max-width: 100%; height: auto; }
/* Téléphone (V0.5.3) : rien ne dépasse la largeur de l'écran. Les tableaux et rangées d'onglets trop larges défilent dans leur cadre. */
[data-device=phone] #main .grid > *, [data-device=phone] #main .stack > *, [data-device=phone] #main .card { min-width: 0; }
[data-device=phone] #main .twrap { overflow-x: auto; max-width: 100%; }
[data-device=phone] #main table.t:not(.twrap > table.t) { display: block; overflow-x: auto; max-width: 100%; }
[data-device=phone] #main .card .btn { white-space: normal; max-width: 100%; }
[data-device=phone] #main .seg, [data-device=phone] #main .pgrp { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
[data-device=phone] #main .row { flex-wrap: wrap; }
[data-device=phone] #main .row { min-width: 0; max-width: 100%; }
[data-device=phone] #main .row > input[type=date] { min-width: 0; width: 100%; flex: 1 1 7rem; box-sizing: border-box; }
[data-device=phone] .head { flex-wrap: wrap; }
[data-device=phone] .head .mid:has(input[type=date]) { flex: 1 1 100%; order: 3; }
[data-device=phone] .head .mid .row:has(input[type=date]) { flex-wrap: nowrap; }
[data-device=phone] #main .row > input[type=date] { padding-inline: .5rem; font-size: .95rem; }
.card > .vnote { margin: .55rem 0; }
/* Signe pause (deux barres) de la pastille, comme « E ⏸ » dans AS Connect */
.pz { display: inline-block; vertical-align: -.05em; width: .62em; height: .78em; border-left: .2em solid currentColor; border-right: .2em solid currentColor; margin-left: .3em; box-sizing: border-box; flex: none; }
.state-pill .pz.solo { margin-left: 0; }
.vnote > .pz:first-child, .kv .v > .pz:first-child { margin-left: 0; margin-right: .15em; }
/* Accueil (V0.5.6) : les tuiles grandissent avec leur titre, rien ne dépasse du cadre (titres longs en capitales sur PC) */
.home-lay.pc .tile, .home-lay.pc .tile.urgent { height: auto; min-height: 3.9rem; padding-top: .5rem; padding-bottom: .5rem; }
.home-lay .tile .t { line-height: 1.15; }
/* Demi-tuiles étroites (PC à fenêtre réduite) : rond et texte un peu plus petits, mots jamais coupés */
.home-lay.pc .hl-it.half { container-type: inline-size; }
.home-lay .tile .t { overflow-wrap: normal; hyphens: none; }
@container (max-width: 215px) {
  .home-lay.pc .hl-it.half .tile { padding-left: .55rem; padding-right: .55rem; gap: .5rem; }
  .home-lay.pc .hl-it.half .tile .bubble { width: 2.2rem; height: 2.2rem; }
  .home-lay.pc .hl-it.half .tile .bubble svg { width: 1.1rem; height: 1.1rem; }
  .home-lay.pc .hl-it.half .tile .t { font-size: .8rem; }
  .home-lay.pc .hl-it.half .tile .s { font-size: .75rem; }
  .home-lay.pc .hl-it.half .tile { position: relative; }
  .home-lay.pc .hl-it.half .tile > .pastille { position: absolute; top: .3rem; right: .3rem; margin: 0; }
  .home-lay.pc .hl-it.half .tile .grow { padding-right: .6rem; }
}
/* Carte « Nous sommes prêts à … » dans une colonne étroite : les 4 compteurs passent sur 2 lignes */
.card.ready { container-type: inline-size; }
.card.ready .g4 > * { min-width: 0; }
@container (max-width: 400px) { .card.ready .g4.keep { grid-template-columns: 1fr 1fr; } }
[data-device=phone] .sheet .btn { white-space: normal; max-width: 100%; height: auto; min-height: 2.9rem; }
.vnote.vclose { position: relative; padding-right: 2.4rem; }
.vnote .x-close { position: absolute; top: .35rem; right: .4rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
/* Écran du code PIN, repris d'AS Connect (V0.5.8) */
.login-wrap { width: 100%; flex: 1 1 auto; box-sizing: border-box; }
.pin-box { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pin-box .pad, .pin-box .err, .pin-box h2, .pin-box p { align-self: stretch; }
.pin-av { width: 4.2rem; height: 4.2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; color: #fff; background: linear-gradient(180deg, #ec1a84, #8f0d50); border: 2px solid var(--line); margin: .2rem auto .6rem; }
.pin-who { display: inline-block; border: 1px solid var(--line); background: var(--card2); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; }
.pin-msg { color: var(--mute); font-size: .95rem; margin: .8rem 0 0; }
.pin-box .pin-dots { margin: 1rem 0; }
.pad .pad-gap { display: block; }
.pad button:not(.fn) { border: 1.5px solid var(--line); background: linear-gradient(180deg, var(--card2), var(--card)); box-shadow: 0 2px 4px rgba(0,0,0,.18); color: var(--text); }
.pad button.fn { color: var(--text); }
.pin-forgot { margin: .9rem 0 0; }
.pin-forgot .link { font-size: .85rem; text-decoration: underline; font-weight: 400; }
.pin-switch { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .9rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; align-self: stretch; }
.pin-switch p { margin: 0; color: var(--text-2, var(--mute)); }
.pin-box .err { min-height: 1.2rem; margin: 0 0 .5rem; }
[data-device=phone] .pin-box .pad { max-width: 270px; }
[data-device=phone] .pin-box .pad { gap: .6rem; }
[data-device=phone] .pin-box .pad button { width: min(4.4rem, 19vw); font-size: 1.35rem; }
.sidecol > .card { min-width: 0; }
.twrap { max-width: 100%; }
/* Accueil PC : « Derniers signalements du terrain » ne déborde plus de sa carte (1 colonne si la carte est étroite) */
.home-reps { container-type: inline-size; }
.home-reps .grid.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.home-reps .rep { min-width: 0; }
.home-reps .rep > :not(.em):not(img) { min-width: 0; overflow-wrap: anywhere; }
@container (max-width: 520px) { .home-reps .grid.g2 { grid-template-columns: minmax(0, 1fr); } }
/* Ronds à initiales (V0.5.8), comme AS Connect */
.av-c { width: 2.9rem; height: 2.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .02em; background: #4a6fa5; }
.av-c[data-avc="0"] { background: #2f7fd8; } .av-c[data-avc="1"] { background: #1f9d74; } .av-c[data-avc="2"] { background: #16808c; } .av-c[data-avc="3"] { background: #d2701c; }
.av-c[data-avc="4"] { background: #7c4ddb; } .av-c[data-avc="5"] { background: #c2357a; } .av-c[data-avc="6"] { background: #4a6fa5; } .av-c[data-avc="7"] { background: #3f8f3a; }
.av-c.pin-av { width: 4.2rem; height: 4.2rem; font-size: 1.4rem; margin: .2rem auto .6rem; display: flex; border: 2px solid var(--line); }
.av-img { object-fit: cover; background: var(--card2); }
/* Droits d'accès (V0.5.8) : onglets, liste en pleine largeur */
.dr-tabs { margin: 0 auto; }
.dr-sync { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .7rem; }
.dr-top { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .7rem; }
.dr-search { flex: 0 1 26rem; min-width: 0; }
.dr-list { padding: .3rem 1rem; }
.dr-row { display: flex; align-items: center; gap: .9rem; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .8rem .2rem; text-align: left; color: var(--text); cursor: pointer; }
.dr-row:last-child { border-bottom: 0; }
.dr-row:hover { background: var(--card2); }
.dr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.dr-name { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 1.05rem; }
.dr-last { text-transform: uppercase; font-size: .82rem; color: var(--mute); font-weight: 600; }
.dr-sub { color: var(--mute); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-go { color: var(--mute); font-size: 1.5rem; flex: none; }
.dr-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .6rem; }
.dr-head h2 { margin: 0; }
.dr-head .tag { margin-right: .3rem; }
.dr-mods { display: flex; flex-direction: column; }
.dr-mod { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dr-ml { font-weight: 600; min-width: 0; }
.dr-lv button { min-width: 3.6rem; }
[data-device=phone] .dr-sub { white-space: normal; }
[data-device=phone] .dr-sync .box { flex: 1 1 12rem; min-width: 0; }
[data-device=phone] .dr-top .small { font-size: .85rem; }

/* V0.5.8 · Parc : titre et boutons sur la 1re ligne, filtres et recherche sur la 2e (PC) */
:root:not([data-device=phone]) .head.head-tools .right { margin-left: auto; }
:root:not([data-device=phone]) .head.head-tools .mid { order: 5; flex: 1 1 100%; min-width: 0; justify-content: flex-start; flex-wrap: wrap; row-gap: .5rem; }
:root:not([data-device=phone]) .head.head-tools .mid input[type=search] { flex: 1 1 13rem; min-width: 13rem; max-width: 28rem; width: auto; }
.parc-stats { margin-bottom: 1.1rem; }
.parc-t td:nth-child(1), .parc-t td:nth-child(3), .parc-t td:nth-child(6), .parc-t td:nth-child(7) { white-space: nowrap; }
/* V0.5.8 · Parc : compteurs et textes un peu plus petits (demande JOHAN) */
:root:not([data-device=phone]) .parc-stats .stat { padding: .6rem .9rem; border-radius: 12px; }
.parc-stats .stat .l { font-size: .85rem; }
.parc-stats .stat .n { font-size: 1.5rem; line-height: 1.2; }
:root:not([data-device=phone]) .head.head-tools h1 { font-size: 1.3rem; }
.parc-t td, .parc-t th { font-size: .88rem; }
.parc-t td .sub { font-size: .76rem; }
[data-device=phone] .grid.parc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .8rem; }
[data-device=phone] .parc-stats .stat { padding: .45rem .55rem; border-radius: 10px; }
[data-device=phone] .parc-stats .stat .l { font-size: .72rem; line-height: 1.2; }
[data-device=phone] .parc-stats .stat .n { font-size: 1.25rem; }
[data-device=phone] #main .grid.parc-stats.only-phone { display: grid !important; }
[data-device=phone] .parc-t td .sub { display: none; }
[data-device=phone] .parc-t td, [data-device=phone] .parc-t th { padding-left: .35rem; padding-right: .35rem; }
[data-device=phone] .parc-t .tag { font-size: .72rem; }
[data-device=phone] .parc-card .band { font-size: .9rem; padding: .4rem .6rem; }
[data-device=phone] .parc-t th:nth-child(2), [data-device=phone] .parc-t td:nth-child(2) { display: none; }

/* V0.5.8 · « Ce que l'auditeur va vérifier » : 5 boutons nommés puis une liste simple */
.aud-btns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.aud-btn { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .3rem .6rem; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: .65rem .8rem; color: var(--text); cursor: pointer; min-width: 0; }
.aud-btn:hover { border-color: var(--pink); }
.aud-btn.on { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink) inset; }
.aud-emo { font-size: 1.5rem; line-height: 1; }
.aud-tx { min-width: 0; display: flex; flex-direction: column; }
.aud-tx b { font-size: .92rem; line-height: 1.2; }
.aud-tx small { color: var(--mute); font-size: .78rem; margin-top: .15rem; }
.aud-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.aud-bar i { display: block; height: 100%; width: 0; background: var(--vert); border-radius: 3px; }
.cr-list { display: flex; flex-direction: column; }
.cr-row { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .6rem .3rem; color: var(--text); cursor: pointer; }
.cr-row:last-child { border-bottom: 0; }
.cr-row:hover { background: var(--card2); }
.cr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-t b { font-size: .95rem; font-weight: 650; }
.cr-t small { color: var(--mute); font-size: .8rem; }
.cr-go { color: var(--mute); font-size: 1.3rem; line-height: 1; }
[data-device=phone] .aud-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
[data-device=phone] .aud-btns .aud-btn:first-child { grid-column: 1 / -1; }
[data-device=phone] .aud-btn { padding: .55rem .6rem; }
[data-device=phone] .aud-emo { font-size: 1.25rem; }
[data-device=phone] .aud-tx b { font-size: .85rem; }
@media (max-width: 1100px) { :root:not([data-device=phone]) .aud-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-device=phone] .aud-tx b { font-size: .8rem; }
[data-device=phone] .aud-tx small { font-size: .7rem; }
[data-device=phone] .aud-emo { font-size: 1.1rem; }
[data-device=phone] .cr-card .band { font-size: .88rem; padding: .4rem .6rem; }
[data-device=phone] .cr-t b { font-size: .88rem; }
[data-device=phone] .cr-t small { font-size: .74rem; }

/* V0.5.8 · Produits de désinfection : choix rapide dans les fenêtres */
.pp { border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .8rem; margin: .6rem 0; background: var(--card2); }
.pp-h { font-weight: 700; margin-bottom: .45rem; }
.pp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.pp-chip { border: 1.5px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: .35rem .75rem; font-weight: 600; font-size: .88rem; cursor: pointer; }
.pp-chip.on { border-color: var(--pink); background: var(--rose-pale, #fde7f1); }
.pp-chip.pp-new { color: var(--mute); }
.pp-name { width: 100%; margin-bottom: .5rem; }
.pp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; margin: .3rem 0; }
.pp-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--mute); font-weight: 600; }
.pp-row input { width: 100%; min-width: 0; }
.pp-warn { color: var(--rouge); font-weight: 700; font-size: .88rem; margin-top: .3rem; }
.pp-hint { margin-top: .35rem; }
.ck-clean .pp { margin-top: .2rem; }
.pr-row { display: flex; align-items: center; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.pr-row:last-child { border-bottom: 0; }
.pr-row .grow { display: flex; flex-direction: column; min-width: 0; }
.pr-row small { color: var(--mute); }
.pr-row.off { opacity: .55; }
[data-device=phone] .pr-row { flex-wrap: wrap; }

/* V0.5.8 · Protocoles */
.pt-search { margin-bottom: .8rem; }
.pt-search input { width: 100%; font-size: 1.02rem; padding: .7rem 1rem; border-radius: 12px; }
.pt-sign { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; border: 1.5px solid var(--orange); background: var(--card); color: var(--text); border-radius: 12px; padding: .6rem .9rem; margin-bottom: .8rem; cursor: pointer; }
.pt-sign b { flex: 1; }
.pt-sign.on { box-shadow: 0 0 0 2px var(--orange) inset; }
.pt-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.pt-cat { position: relative; display: flex; align-items: center; gap: .6rem; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: .6rem .75rem; color: var(--text); cursor: pointer; min-width: 0; }
.pt-cat:hover { border-color: var(--pink); }
.pt-cat.on { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink) inset; }
.pt-emo { font-size: 1.6rem; line-height: 1; flex: none; }
.pt-ct { display: flex; flex-direction: column; min-width: 0; }
.pt-ct b { font-size: .9rem; line-height: 1.2; }
.pt-ct small { color: var(--mute); font-size: .76rem; }
.pt-cat .pastille { position: absolute; top: -.4rem; right: -.4rem; }
.pt-row { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .6rem .3rem; color: var(--text); cursor: pointer; }
.pt-row:hover { background: var(--card2); }
.pt-file { font-size: 1.4rem; flex: none; }
.pt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-t b { font-size: .95rem; font-weight: 650; }
.pt-t small { color: var(--mute); font-size: .8rem; }
.pt-t .pt-snip { margin-top: .15rem; font-style: italic; overflow-wrap: anywhere; }
.pt-t mark, .pt-snip mark { background: #ffe58a; color: #222; border-radius: 3px; padding: 0 .1em; }
.pt-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.pt-open { display: inline-flex; margin-top: .6rem; }
.pt-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin: .4rem 0; }
.pt-pin { font-size: 1.6rem; letter-spacing: .5em; text-align: center; max-width: 10rem; }
.pt-signs { max-height: 22rem; overflow-y: auto; }
.pt-signed h3 { color: var(--vert); }
.pt-tosign { border-color: var(--orange); }
@media (max-width: 1150px) { :root:not([data-device=phone]) .pt-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-device=phone] .pt-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
[data-device=phone] .pt-cat { padding: .5rem .55rem; gap: .45rem; }
[data-device=phone] .pt-emo { font-size: 1.25rem; }
[data-device=phone] .pt-ct b { font-size: .8rem; }
[data-device=phone] .pt-ct small { font-size: .7rem; }
[data-device=phone] .pt-search input { font-size: .92rem; }
[data-device=phone] .pt-t b { font-size: .88rem; }
[data-device=phone] .pp-row { grid-template-columns: 1fr; }

/* ---------- V0.5.9 : modèles de matériel, options, comparaison au retour, dommages ---------- */
.parc-type { min-width: 0; max-width: 15rem; flex: 0 1 15rem; }
.mat-ph { max-width: 26rem; margin: 0 auto .6rem; cursor: default; }
.mat-facts { margin: .25rem 0 .5rem; font-weight: 600; }
.veil { position: absolute; background: rgba(255,255,255,.8); border: 2px dashed #94a3b8; border-radius: 8px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.veil span { font-size: .68rem; font-weight: 700; color: #475569; text-align: center; line-height: 1.1; padding: .1rem; }
.small-edl .veil span { display: none; }
.edl .mk.prev { background: #9ca3af; box-shadow: 0 0 0 4px rgba(156,163,175,.3), 0 1px 4px rgba(0,0,0,.25); font-size: .75rem; width: 1.8rem; height: 1.8rem; }
.small-edl .mk.prev { width: 1.1rem; height: 1.1rem; font-size: .6rem; }
.mkn.prev, .mk-legend.prev { background: #9ca3af; }
.mk-legend { display: inline-flex; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #ef4444; color: #fff; font-size: .65rem; font-weight: 800; align-items: center; justify-content: center; vertical-align: middle; }
.edl-title .edl-sub2 { display: block; font-weight: 600; color: var(--text); margin-top: .15rem; font-size: .85rem; }
.edl-cmp { margin: -.3rem 0 .6rem; }
.lv-it { border: 1px solid var(--line); border-radius: 14px; padding: .6rem .7rem; margin-bottom: .55rem; background: var(--card); }
.lv-it .row { align-items: center; gap: .55rem; }
.lv-it .grow { display: flex; flex-direction: column; min-width: 0; }
.lv-it small { color: var(--mute); }
.lv-th { flex: 0 0 4.6rem; background: #fff; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; }
.lv-th img { display: block; width: 100%; height: auto; }
.lv-mode { margin: .5rem 0 .3rem; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .8rem; align-items: center; margin-top: .3rem; }
.opt-l { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--mute); font-weight: 600; }
.opt-l .row { gap: .35rem; }
.opt-l select, .opt-l input { min-width: 0; width: 100%; }
.opt-free { grid-column: 1 / -1; margin-top: .3rem; }
.doc-row { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .grow { display: flex; flex-direction: column; min-width: 0; }
.doc-row small { color: var(--mute); }
.md-row { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.md-row:last-child { border-bottom: 0; }
.md-row.off { opacity: .55; }
.md-row .grow { display: flex; flex-direction: column; min-width: 0; }
.md-row small { color: var(--mute); }
.md-th { flex: 0 0 5.4rem; width: 5.4rem; height: 3.5rem; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.md-none { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.md-cat { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); margin: .7rem 0 .1rem; }
.md-empty { margin: .2rem 0 .4rem; }
.md-pot { display: flex; align-items: flex-end; }
.md-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; align-items: start; }
.md-prev { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 6rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.md-prev img { display: block; width: 100%; height: auto; }
.dm-card .row { align-items: center; }
.dm-marks { margin: .4rem 0; }
.dm-marks .kv { align-items: center; }
.dm-ph { width: 4.2rem; height: 3.2rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.dm-acts { gap: .5rem; margin-top: .4rem; }
.prev-list h3 { color: var(--mute); }
[data-device=phone] .opt-grid { grid-template-columns: 1fr 1fr; }
[data-device=phone] .md-photo { grid-template-columns: 1fr; }
[data-device=phone] .parc-type { max-width: none; flex: 1 1 100%; }
[data-device=phone] .dm-tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; width: 100%; }
[data-device=phone] .dm-tabs button { border-radius: 12px; }
[data-device=phone] .mat-ph { max-width: none; }
.pt-parts { margin-bottom: .6rem; }
.pt-parts .pp-chip .link { padding: 0 .1rem; font-size: .8rem; }
.sg3 { flex-wrap: wrap; }
.sg-tiers { margin-top: .2rem; }
.sg-rel { grid-column: 1 / -1; }
.sg-alone { margin-top: .3rem; }
.pa-tabs { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 auto .9rem; width: fit-content; max-width: 100%; }
.pa-one { max-width: 46rem; margin: 0 auto; }
[data-device=phone] .pa-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 16px; }
[data-device=phone] .pa-tabs button { border-radius: 12px; }
.dm-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 0 auto .9rem; }
[data-device=phone] .sg3 { display: grid; grid-template-columns: 1fr; border-radius: 16px; width: 100%; }
[data-device=phone] .sg3 button { border-radius: 12px; }
