/* Styles de l'écran : mobile (maquette-mobile.dc.html). Tout est rangé sous .mob pour ne pas toucher au poste fixe. */
body:has(> .mob) { margin: 0; background: #E9E9E6; }
.mob {
    --vert: #1F6F5C; --vert-f: #14533F;
    max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: #F6F6F5; color: #18181B;
    font-size: 15px; line-height: 1.35; position: relative; -webkit-tap-highlight-color: transparent;
}
.mob *, .mob *::before, .mob *::after { box-sizing: border-box; }
.mob a { color: inherit; text-decoration: none; }
.mob h2, .mob h3, .mob p { margin: 0; }
.mob button { font: inherit; }

/* Barre du haut */
.mob-haut { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid #EFEFEF; backdrop-filter: blur(8px); }
.mob-retour { width: 36px; height: 40px; display: grid; place-items: center; margin-left: -8px; color: #18181B; }
.mob-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mob-titre span { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-titre small { font-size: 12px; color: #71717A; }
.mob-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #EDEDEB; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #3F3F46; }
.mob-avatar-grand { width: 52px; height: 52px; background: #E6F1ED; color: var(--vert-f); font-size: 16px; }

.mob-contenu { padding: 16px 16px 104px; display: flex; flex-direction: column; gap: 20px; }
.mob-contenu > section { display: flex; flex-direction: column; gap: 8px; }

/* Briques */
.mob-card { background: #fff; border: 1px solid #EDEDED; border-radius: 16px; overflow: hidden; }
.mob-sec { font-size: 13px; font-weight: 600; color: #71717A; padding: 0 4px; }
.mob-row { min-height: 60px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #F4F4F5; }
.mob-row:last-child { border-bottom: 0; }
a.mob-row:active { background: #FAFAFA; }
.mob-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mob-row-txt strong { font-size: 15px; font-weight: 600; }
.mob-row-txt small { font-size: 13px; color: #71717A; }
.mob-chev { color: #C4C4C8; font-size: 22px; }
.mob-vide { color: #A1A1AA; font-size: 14px; padding: 16px; }
.mob-note { font-size: 13px; color: #A1A1AA; padding: 0 4px; }
.mob-rouge { color: #B42318; }
.mob-a-designer { color: #B45309 !important; font-weight: 600; }
.mob-kv { justify-content: space-between; min-height: 48px; }
.mob-kv span:first-child { color: #71717A; font-size: 14px; flex: none; }
.mob-kv span:last-child { text-align: right; font-weight: 500; }

.mob-pt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #A1A1AA; }
.mob-pt-orange { background: #D97706; } .mob-pt-rouge { background: #D92D20; } .mob-pt-bleu { background: #3B82C4; }
.mob-pt-vert { background: #1F6F5C; } .mob-pt-gris { background: #71717A; } .mob-pt-cyan { background: #0E7490; } .mob-pt-clair { background: #A1A1AA; }

.mob-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #A1A1AA; margin-right: 6px; }
.mob-st.st-c { background: #1F7A62; } .mob-st.st-r { background: #D97706; } .mob-st.st-d { background: #D92D20; }
.mob-statut { font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; }

.mob-chip { flex: none; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: #F4F4F5; color: #3F3F46; white-space: nowrap; }
.mob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mob-chips .mob-chip { font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.mob-chip-vert { background: #EEF6F3; color: #14533F; }
.mob-chip-orange { background: #FFF8EB; color: #7C4A03; }
.mob-chip-cyan { background: #ECF6F8; color: #0E5566; }
.mob-chip-gris { background: #F4F4F5; color: #3F3F46; }
.mob-num { flex: none; min-width: 48px; font-weight: 600; font-size: 14px; }

.mob-inp { width: 100%; height: 48px; border-radius: 12px; border: 1px solid #E4E4E7; background: #fff; padding: 0 14px; font: inherit; font-size: 16px; color: #18181B; }
.mob-inp:focus { outline: 2px solid var(--vert); outline-offset: -1px; border-color: transparent; }
select.mob-inp { appearance: auto; }
.mob-label { font-size: 13px; font-weight: 600; color: #71717A; }

.mob-btn { height: 50px; width: 100%; border-radius: 12px; border: 1px solid #E4E4E7; background: #fff; color: #18181B; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 16px; }
.mob-btn.pri { background: var(--vert); border-color: var(--vert); color: #fff; }
.mob-btn.dang { background: #fff; border-color: #F4C7C3; color: #B42318; }
form .mob-btn.dang { background: #B42318; border-color: #B42318; color: #fff; }
.mob-btn-haut { height: 56px; }
.mob-link { background: none; border: 0; color: var(--vert); font-weight: 600; font-size: 15px; padding: 8px; cursor: pointer; text-align: center; }
.mob-centre { text-align: center; }

.mob-seg { display: flex; background: #EBEBE9; border-radius: 12px; padding: 4px; gap: 4px; }
.mob-seg > button, .mob-seg > a { flex: 1; height: 40px; border: 0; border-radius: 9px; background: none; color: #52525B; font-size: 14px; font-weight: 600; display: grid; place-items: center; cursor: pointer; }
.mob-seg .on { background: #fff; color: #14533F; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.mob-hs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.mob-hs::-webkit-scrollbar { display: none; }

.mob-alerte { background: #FFF8EB; border: 1px solid #F3D9A4; color: #7C4A03; border-radius: 12px; padding: 12px 14px; font-size: 14px; }

/* Accueil */
.mob-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mob-kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.mob-kpi span { font-size: 13px; color: #71717A; }
.mob-kpi strong { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.mob-kpi small { font-size: 12px; color: #A1A1AA; }
.mob-heure { flex: none; width: 54px; display: flex; flex-direction: column; }
.mob-heure strong { font-size: 15px; font-weight: 600; }
.mob-heure small { font-size: 12px; color: #A1A1AA; }

.mob-evts { display: flex; flex-direction: column; }
.mob-card.mob-evts { padding: 6px 16px; }
.mob-evt { display: flex; gap: 12px; padding: 8px 0; }
.mob-evt .mob-pt { margin-top: 6px; }
.mob-evt > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mob-evt strong { font-size: 14px; font-weight: 600; }
.mob-evt span { font-size: 13px; color: #52525B; overflow-wrap: anywhere; }
.mob-evt small { font-size: 12px; color: #A1A1AA; }

/* Frigos */
.mob-frigo { flex: none; width: 72px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid #EDEDED; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; }
.mob-frigo strong { font-size: 15px; font-weight: 600; }
.mob-frigo small { font-size: 12px; color: #71717A; white-space: nowrap; }
.mob-frigo.hors { width: auto; min-width: 72px; }
.mob-frigo.hors small { color: #B42318; font-weight: 600; }
.mob-frigo.on { background: var(--vert); border-color: var(--vert); color: #fff; }
.mob-frigo.on small { color: #CDE7DE; }
.mob-frigo-tete { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.mob-frigo-tete h2 { font-size: 18px; font-weight: 700; }
.mob-frigo-tete span { font-size: 13px; color: #71717A; }
.mob-frigo-tete span.mob-rouge { color: #B42318; font-weight: 600; }
.mob-tiroirs { display: flex; flex-direction: column; gap: 10px; }
.mob-tiroir { min-height: 72px; border-radius: 14px; border: 1px solid #EDEDED; background: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.mob-tiroir.sel { box-shadow: 0 0 0 2px var(--vert); }
.mob-tiroir-n { width: 36px; height: 36px; flex: none; border-radius: 10px; background: #fff; border: 1px solid #EDEDED; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #3F3F46; }
.mob-tiroir-occupe { background: #EEF6F3; border-color: #DCEDE6; }
.mob-tiroir-libre .mob-row-txt strong { color: #A1A1AA; }
.mob-tiroir-reserve { background: #FFF8EB; border-color: #F3D9A4; }
.mob-tiroir-hs { background: #F4F4F5; }
.mob-tiroir-hs .mob-row-txt strong { color: #71717A; }
.mob-jours { font-size: 13px; color: #71717A; }
.mob-jours.long { color: #B45309; font-weight: 700; }

/* Panneau du bas */
.mob-voile-panneau { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-end; }
.mob-voile { position: absolute; inset: 0; background: rgba(24,24,27,.4); }
.mob-panneau { position: relative; width: 100%; max-width: 480px; max-height: 78vh; max-height: 78dvh; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: mob-monte .2s ease-out; }
@keyframes mob-monte { from { transform: translateY(30px); opacity: .6; } }
.mob-poignee { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #E4E4E7; flex: none; }
.mob-panneau-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mob-panneau-tete small { font-size: 13px; color: #A1A1AA; }
.mob-panneau-tete h2 { font-size: 20px; font-weight: 700; }
.mob-panneau .mob-sec { padding: 0; }
.mob-barres { display: flex; flex-direction: column; gap: 4px; }
.mob-barres svg { max-width: 100%; height: 30px; fill: #000; }
.mob-barres span { font-size: 11px; color: #52525B; letter-spacing: .04em; }
.mob-infos { background: #F7F7F6; border-radius: 14px; padding: 4px 14px; }
.mob-infos > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #EDEDEB; font-size: 14px; }
.mob-infos > div:last-child { border-bottom: 0; }
.mob-infos span:first-child { color: #71717A; flex: none; }
.mob-infos span:last-child { text-align: right; font-weight: 600; }
.mob-actions, .mob-form { display: flex; flex-direction: column; gap: 10px; }
.mob-actions:empty { display: none; }

/* Scanner */
.mob-viseur { position: relative; height: 210px; border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse at center, #2a2a2a 0%, #101010 75%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; }
.mob-viseur video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mob-viseur-cadre { position: absolute; left: 15%; right: 15%; top: 18%; bottom: 24%; }
.mob-viseur-cadre i { position: absolute; width: 22px; height: 22px; border: 3px solid #8FD3BC; }
.mob-viseur-cadre i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.mob-viseur-cadre i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.mob-viseur-cadre i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.mob-viseur-cadre i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.mob-laser { position: absolute; left: 8px; right: 8px; height: 2px; background: #8FD3BC; box-shadow: 0 0 8px #8FD3BC; animation: mob-laser 2.2s ease-in-out infinite alternate; }
@keyframes mob-laser { from { top: 10%; } to { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .mob-laser { animation: none; top: 50%; } }
.mob-viseur p { position: relative; color: #E4E4E7; font-size: 13px; text-align: center; padding: 0 12px; }
.mob-viseur-btn { position: relative; margin-top: 6px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; height: 36px; padding: 0 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.mob-saisie { display: flex; gap: 8px; margin-top: 12px; }
.mob-saisie .mob-btn { width: 72px; flex: none; height: 48px; }
.mob-lecture { min-height: 64px; }
.mob-badge { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #F4F4F5; color: #71717A; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.mob-badge.ok { background: var(--vert); color: #fff; }
.mob-attente { color: #A1A1AA !important; font-weight: 500 !important; }
.mob-bandeau { border-radius: 12px; padding: 14px 16px; font-size: 15px; background: #F4F4F5; color: #3F3F46; }
.mob-bandeau-ok { background: #EEF6F3; color: #14533F; }
.mob-bandeau-warn { background: #FFF8EB; color: #7C4A03; }
.mob-bandeau-err { background: #FEF3F2; color: #912018; }

/* Planning */
.mob-jour { flex: none; width: 76px; border-radius: 14px; background: #fff; border: 1px solid #EDEDED; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mob-jour small { font-size: 11px; color: #A1A1AA; white-space: nowrap; }
.mob-jour small:first-child { font-size: 12px; color: #52525B; }
.mob-jour strong { font-size: 20px; font-weight: 700; }
.mob-jour.on { background: var(--vert); border-color: var(--vert); color: #fff; }
.mob-jour.on small { color: #CDE7DE; }
.mob-jour-nav { width: 36px; justify-content: center; font-size: 22px; color: #71717A; }
.mob-creneaux { display: flex; flex-direction: column; gap: 10px; }
.mob-creneau { background: #fff; border: 1px solid #EDEDED; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.mob-creneau.sans-medecin { border-color: #F3D9A4; }
.mob-creneau-tete { display: flex; justify-content: space-between; align-items: center; }
.mob-creneau-tete small { font-size: 12px; color: #71717A; font-weight: 600; }
.mob-creneau > strong { font-size: 17px; font-weight: 700; }
.mob-creneau > small { font-size: 13px; color: #71717A; }
.mob-creneau-equipe { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mob-creneau-equipe b { color: #14533F; font-size: 14px; }
.mob-creneau-equipe small { font-size: 13px; color: #71717A; }
.mob-creneau.libre { border: 1px dashed #E4E4E7; background: #FAFAFA; }
.mob-creneau.libre small { font-size: 12px; color: #A1A1AA; font-weight: 600; }
.mob-creneau.libre span { color: #A1A1AA; font-size: 14px; }

/* Compte */
.mob-profil { display: flex; align-items: center; gap: 14px; padding: 16px; }

/* Messages flash */
.mob-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; z-index: 60; width: calc(100% - 32px); max-width: 448px; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.15); background: #18181B; color: #fff; transition: opacity .3s; }
.mob-toast + .mob-toast { bottom: 156px; }
.mob-toast-succes { background: #14533F; }
.mob-toast-erreur { background: #912018; }
.mob-toast.cache { opacity: 0; pointer-events: none; }

/* Barre d'onglets */
.mob-onglets { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 84px; z-index: 30; display: flex; align-items: flex-start; padding: 6px 8px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid #EFEFEF; backdrop-filter: blur(8px); }
.mob-tab { flex: 1; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #71717A; }
.mob-tab.on { color: var(--vert); font-weight: 600; }
.mob-tab-scan { flex: 1; display: flex; justify-content: center; }
.mob-tab-scan a { width: 60px; height: 60px; margin-top: -18px; border-radius: 50%; background: var(--vert); color: #fff; border: 4px solid #F6F6F5; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(31,111,92,.35); }
.mob-tab-scan a.on { background: var(--vert-f); }
