/* Le Bureau Upgreyd : plateau isométrique. Charte : Archivo (titres 800/900 italique), IBM Plex Mono, encre #141414. */
:root {
  --encre: #141414;
  --scene: #ececea;
  --sol: #fafaf8;
  --grille: #e6e6e3;
  --blanc: #ffffff;
  --doux: #f5f5f3;
  --doux2: #f0f0ee;
  --texte2: #555;
  --texte3: #6b6b6b;
  --texte4: #8a8a86;
  --trait: #dddddd;
  --trait2: #ececea;
  --ambre: #e9a23b;
  --ambre-fond: #fdf0d9;
  --ambre-texte: #8a5a10;
  --ambre-barre: #fffaf1;
  --vert: #3FA34D;
  --livre-fond: #e5f4ec;
  --livre-texte: #1f7a4d;
  --rouge: #d0503c;
  --ombre-etiquette: 0 6px 16px rgba(0,0,0,.12);
  --ombre-panneau: -10px 0 40px rgba(0,0,0,.06);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --agent: #141414;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--scene); color: var(--encre); font: 15px/1.5 Archivo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1.1; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.logo { display: block; height: auto; }
.mono { font-family: var(--mono); }
.info { color: var(--texte3); font-size: 13px; }
.info.ok { color: var(--livre-texte); }
.doux { color: var(--texte3); }
.vide { color: var(--texte4); font-size: 14px; padding: 12px 0; }
.surtitre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--texte4); margin: 22px 0 10px; }
.titre-italique { font-weight: 900; font-style: italic; font-size: 18px; letter-spacing: -.01em; }
.rangee { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rangee.fin { justify-content: flex-end; }
.rangee.fin .info { margin-right: auto; }

/* Points, pastilles, boutons */
.point { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--texte4); }
.point.vert { background: var(--vert); } .point.ambre { background: var(--ambre); } .point.rouge { background: var(--rouge); }
.clignote { animation: clignote 1.2s ease-in-out infinite; }
@keyframes clignote { 50% { opacity: .25; } }
@keyframes flotte { 50% { transform: translateY(-5px); } }
@keyframes flux { to { background-position: 24px 0; } }
.pastille { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--blanc); border: 0; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.pastille.noire { background: var(--encre); color: #fff; cursor: pointer; }
.pastille.noire:hover { background: #3a3a3a; }
.pastille.noire:disabled { opacity: .5; cursor: default; }
.pastille.mono { font-family: var(--mono); font-weight: 500; }
.pastille.reel { color: var(--vert); }
.pastille.laurent { cursor: pointer; border: 0; }
.pastille.laurent:hover { background: var(--doux2); }
.bloc-laurent { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-laurent { flex: 1; overflow-y: auto; padding: 22px 32px; }
.bloc-laurent.compact { margin-top: 4px; }
.bloc-laurent.compact .chat-laurent { padding: 4px 0 10px; max-height: 46vh; min-height: 120px; }
.bloc-laurent.compact .bulle { max-width: 92%; font-size: 14px; }
.composer.compact { padding: 10px 0 0; border-top: 0; }
.choix-laurent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.choix-laurent .puce { background: #fff; box-shadow: inset 0 0 0 1.5px var(--encre); }
#p-serveur { cursor: help; font-size: 12px; }
.serveur-mobile { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--texte3); margin-top: 2px; } .pastille.essai { color: var(--ambre-texte); }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--encre); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.bouton:hover { background: #3a3a3a; }
.bouton:disabled { opacity: .45; cursor: default; }
.bouton.contour { background: transparent; color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--encre); }
.bouton.contour:hover { background: var(--doux); }
.bouton.petit { padding: 7px 12px; font-size: 13px; border-radius: 999px; }
.bouton.envoyer:hover { filter: brightness(1.12); }
.lien { background: none; border: 0; padding: 6px; color: var(--texte3); cursor: pointer; font-size: 13px; text-decoration: none; }
.lien:hover { color: var(--encre); }
.lien.danger:hover { color: var(--rouge); }
.retour { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--blanc); font-size: 13px; font-weight: 700; text-decoration: none; }
.retour:hover { background: var(--doux2); }
.puce { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 0; background: var(--doux2); font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.puce:hover { background: var(--trait2); filter: brightness(.97); }
.puce.statique { cursor: default; font-family: var(--mono); font-weight: 500; }
select.puce { appearance: none; padding-right: 22px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 11px center, right 7px center; background-size: 4px 4px; background-repeat: no-repeat; }
.puce-choix { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 0; background: var(--doux2); font-size: 13px; font-weight: 600; cursor: pointer; }
.puce-choix[aria-pressed="true"] { background: var(--encre); color: #fff; }
.choix { display: flex; flex-wrap: wrap; gap: 6px; }
.carre { display: inline-grid; place-items: center; flex: none; width: var(--t, 40px); height: var(--t, 40px); border-radius: calc(var(--t, 40px) * .275); background: var(--c); color: #fff; font-weight: 900; font-style: italic; font-size: calc(var(--t, 40px) * .45); line-height: 1; }
.carre.vide { background: transparent; color: #b5b5b0; box-shadow: inset 0 0 0 2px #cfcfca; font-style: normal; --t: 36px; }
.statut { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--doux2); color: var(--texte2); }
.s-valider { background: var(--ambre-fond); color: var(--ambre-texte); }
.s-livree { background: var(--livre-fond); color: var(--livre-texte); }
.s-cours { background: #e8ecf5; color: #34508a; }
.s-refusee { background: var(--doux2); color: var(--texte4); }
.s-stock { background: #ece6f7; color: #5b3f8f; }
.s-echec { background: #fbe4e0; color: #9a2f1f; }
.interrupteur { width: 34px; height: 20px; border-radius: 999px; border: 0; padding: 2px; background: #cfcfca; display: flex; justify-content: flex-start; cursor: pointer; flex: none; }
.interrupteur[aria-checked="true"] { background: var(--c); justify-content: flex-end; }
.interrupteur i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], input[type="date"], select:not(.puce), textarea {
  width: 100%; border: 1px solid var(--trait); background: var(--blanc); border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
input:disabled { background: var(--doux); color: var(--texte3); }
textarea { resize: vertical; line-height: 1.5; }
:is(input, select, textarea):focus-visible { outline: 2px solid var(--agent); outline-offset: 1px; }
:is(button, a):focus-visible { outline: 2px solid var(--ambre); outline-offset: 2px; }
.champ { display: grid; gap: 7px; margin-top: 18px; }
.champ > span:first-child { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--texte4); }
.alerte-globale { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 50; background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--ombre-etiquette); max-width: calc(100% - 32px); }

/* Connexion */
.connexion { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.connexion form { width: 100%; max-width: 380px; background: var(--blanc); border-radius: 24px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.25); }
.connexion h1 { font-size: 30px; margin-top: 8px; }
.connexion p { color: var(--texte3); }
.connexion label { display: grid; gap: 6px; font-size: 13px; color: var(--texte3); }
.message-erreur { color: var(--rouge) !important; font-size: 14px; }

/* ---------- 2a · Plateau ---------- */
.vue-plateau { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100dvh; }
.scene { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.barre { display: flex; align-items: center; gap: 16px; padding: 24px 32px 0; flex-wrap: wrap; position: relative; z-index: 3; }
.separateur { width: 1px; height: 28px; background: #c9c9c5; }
.titre-bureau { display: grid; line-height: 1.15; }
.titre-bureau strong { font-weight: 900; font-style: italic; font-size: 18px; }
.titre-bureau span { font-size: 13px; color: var(--texte3); }
.pastilles { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.outils { display: flex; align-items: center; gap: 2px; flex-basis: 100%; justify-content: flex-end; margin-top: -4px; }
.outils .pastille { height: 24px; font-size: 11px; padding: 0 10px; margin-right: 6px; background: transparent; }
.barre-mobile, .onglets-mobile, .zoom-aide, .zoom-boutons, .mobile-seul { display: none; }
.plateau { position: relative; flex: 1; min-height: 0; touch-action: none; }
.plateau-zoom { position: absolute; inset: 0; transform-origin: 50% 50%; }
.pivot { position: absolute; inset: 0; }
.legende-plateau { position: absolute; left: 32px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--texte2); z-index: 2; }
.legende-plateau span { display: inline-flex; align-items: center; gap: 7px; }
.tiret { display: inline-block; width: 18px; height: 3px; background-image: linear-gradient(90deg, currentColor 50%, transparent 50%); background-size: 6px 3px; }
.tiret.ambre { color: var(--ambre); } .tiret.gris { color: #9a9a96; }

/* Le sol */
.stage { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; transform-origin: 50% 50%; }
.socle, .stage.mini { background-color: var(--sol); background-image: linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px); background-size: 40px 40px; border-radius: 4px; }
.socle { position: absolute; inset: 0; }
.salle { position: absolute; border-radius: 3px; background-image: linear-gradient(rgba(0,0,0,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.035) 1px, transparent 1px); background-size: 40px 40px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.salle-vault { background-image: linear-gradient(#353535 1px, transparent 1px), linear-gradient(90deg, #353535 1px, transparent 1px); background-size: 20px 20px; background-color: #2b2b2b !important; }
.nom-salle { position: absolute; left: 12px; bottom: 8px; font-size: 13px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em; color: var(--texte4); white-space: nowrap; }
.salle-vault .nom-salle { color: var(--ambre); }
.bureau { position: absolute; width: 120px; height: 80px; background: #fff; border-radius: 6px; }
.bureau .ecran { position: absolute; left: calc(50% - 25px); top: 14px; width: 50px; height: 8px; background: #2a2a2a; border-radius: 2px; }
.bureau .bande { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 12px; border-radius: 3px; }
.bureau.toi { background: #2a2a2a; }
.bureau .pile { position: absolute; left: calc(50% - 17px); top: 26px; width: 34px; height: 26px; border-radius: 3px; background: var(--ambre); box-shadow: 2px 2px 0 #c9852a, 4px 4px 0 #f0c070, 6px 6px 0 #c9852a; opacity: calc(.35 + var(--n, 0) * .2); }
.bureau.libre { background: transparent; border: 2px dashed #b5b5b0; display: grid; place-items: center; color: #b5b5b0; font-size: 30px; font-weight: 300; }
.bureau.grand { width: 180px; height: 100px; }
.etagere { position: absolute; width: 120px; height: 44px; background: #8a6a4a; border-radius: 4px; }
.etagere i { position: absolute; top: 8px; width: 12px; height: 26px; background: #f4efe4; border-radius: 2px; box-shadow: 1px 1px 0 rgba(0,0,0,.15); }
.coffre { position: absolute; width: 70px; height: 70px; background: #3a3a3a; border-radius: 6px; }
.flux { position: absolute; height: 3px; transform-origin: 0 50%; background-image: linear-gradient(90deg, var(--c) 50%, transparent 50%); background-size: 12px 3px; animation: flux 1s linear infinite; pointer-events: none; }
.couche-flux { position: absolute; inset: 0; pointer-events: none; }
.ombre-pion { position: absolute; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.14); transition: left 3s ease-in-out, top 3s ease-in-out; }
.anneau { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 3px solid transparent; transition: left 3s ease-in-out, top 3s ease-in-out; pointer-events: none; }
.anneau.choisi { border-color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }

/* Ce qui est debout (face à la caméra) */
.billboard { position: absolute; transform-origin: 50% 100%; transform: rotateZ(-45deg) rotateX(-60deg); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; pointer-events: none; }
.billboard > * { pointer-events: auto; }
.pion { transition: left 3s ease-in-out, top 3s ease-in-out; }
.pion .avatar { cursor: pointer; }
.etiquette-pion, .etiquette-toi, .etiquette-vault { background: #fff; border-radius: 8px; padding: 6px 10px; box-shadow: var(--ombre-etiquette); display: grid; justify-items: center; margin-bottom: 6px; cursor: pointer; text-align: center; max-width: 170px; }
.etiquette-pion strong, .etiquette-toi strong, .etiquette-vault strong { font-size: 14px; font-weight: 800; line-height: 1.2; }
.ligne-statut { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--texte2); white-space: nowrap; max-width: 150px; }
.ligne-statut .point { width: 6px; height: 6px; }
.bulle-statut { overflow: hidden; text-overflow: ellipsis; }
.badge-attente { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ambre); color: var(--encre); font-weight: 900; font-size: 14px; margin-bottom: 6px; animation: flotte 1.6s ease-in-out infinite; box-shadow: 0 4px 10px rgba(233,162,59,.35); }
.etiquette-toi, .etiquette-vault { background: var(--encre); color: #fff; }
.etiquette-toi span, .etiquette-vault span { color: var(--ambre); font-size: 11px; font-weight: 600; white-space: nowrap; }
.porte-coffre { background: #3a3a3a; border-radius: 6px 6px 2px 2px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; pointer-events: auto; box-shadow: inset -4px -3px 0 rgba(0,0,0,.25); }
.porte-coffre .cadran { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ambre); }
.porte-coffre .poignee { width: 4px; height: 18px; border-radius: 2px; background: #9a9a96; }
.pion-vault { padding-bottom: 68px; }
.etiquette-vault { max-width: 220px; }

/* Avatars */
.avatar { position: relative; flex: none; }
.avatar-calques { position: absolute; left: 0; top: 0; width: 100px; height: 150px; transform-origin: 0 0; }
.avatar-calques i { position: absolute; display: block; }
.tete { position: relative; border-radius: 50%; overflow: hidden; background: var(--doux2); flex: none; }

/* Panneau droit */
.panneau { background: var(--blanc); border-left: 1px solid var(--trait); overflow-y: auto; padding: 26px 28px 40px; }
.titre-panneau { display: flex; align-items: baseline; justify-content: space-between; }
.titre-panneau h2 { font-size: 22px; }
.titre-panneau span { font-size: 12px; color: var(--texte4); }
.ligne-valider { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: var(--doux); border-radius: 14px; padding: 10px 12px; margin-top: 10px; cursor: pointer; }
.ligne-valider:hover { background: var(--trait2); }
.ligne-valider .texte, .ligne-equipe > strong + span { min-width: 0; flex: 1; }
.ligne-valider strong { display: block; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-valider small { font-size: 12px; color: var(--texte3); }
.chevron { color: var(--texte4); font-size: 18px; }
.bloc-equipe { display: none; }
.ligne-equipe { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; border: 0; background: none; padding: 6px 0; border-top: 1px solid var(--trait2); text-align: left; cursor: pointer; text-decoration: none; }
.ligne-equipe .doux { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activite { display: flex; gap: 10px; padding: 7px 0; }
.activite .point { margin-top: 8px; }
.activite p { font-size: 14px; line-height: 1.4; }
.activite small { font-size: 12px; color: var(--texte4); }
.bloc-affichage .choix { gap: 5px; }
.bloc-affichage .puce-choix { font-size: 12px; padding: 5px 10px; }
.retour-panneau { padding-left: 0; font-weight: 700; }
.identite { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.identite h2 { font-size: 28px; }
.identite h1 { font-size: 30px; }
.identite p { color: var(--texte3); font-size: 14px; }
.identite .statut { margin-left: auto; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #141414); }
.mission-courante { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mission-courante small { font-weight: 400; color: var(--texte3); }
.mission-courante.doux { font-weight: 400; font-size: 14px; }
.apercu { margin-top: 14px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; cursor: pointer; background: repeating-linear-gradient(135deg, #f0f0ee 0 10px, #e6e6e3 10px 20px); }
.apercu img, .apercu video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dernier-message { margin-top: 14px; background: var(--doux); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.dernier-message > small { display: block; font-size: 12px; color: var(--texte4); margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats div { background: var(--doux); border-radius: 12px; padding: 10px 12px; display: grid; }
.stats strong { font-size: 17px; font-weight: 900; }
.stats span { font-size: 12px; color: var(--texte3); }
.actions-panneau { display: flex; gap: 8px; margin-top: 12px; }
.actions-panneau > * { flex: 1; }
.icone-coffre { width: 56px; height: 56px; border-radius: 15px; background: #3a3a3a; display: grid; place-items: center; }
.icone-coffre i { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--ambre); }
.bandeau-vault { display: flex; align-items: center; gap: 10px; margin-top: 16px; background: var(--ambre-fond); color: var(--ambre-texte); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.bandeau-vault .point { background: var(--ambre); }
.bandeau-vault.vide { background: var(--doux); color: var(--texte3); font-weight: 400; }
.bandeau-vault.vide .point { background: #cfcfca; animation: none; }
.dossier { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--trait2); }
.icone-dossier { width: 34px; height: 26px; border-radius: 3px 6px 6px 6px; background: #3a3a3a; position: relative; flex: none; margin-top: 4px; }
.icone-dossier::before { content: ""; position: absolute; left: 0; top: -5px; width: 14px; height: 7px; border-radius: 3px 3px 0 0; background: #3a3a3a; }
.dossier .texte { flex: 1; min-width: 0; }
.dossier strong { display: block; font-size: 14px; }
.dossier small { display: block; font-size: 12px; color: var(--texte3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecteur { display: grid; justify-items: end; gap: 2px; }
.lecteur small { font-size: 11px; color: var(--texte4); white-space: nowrap; }
.droits { margin-top: 16px; font-size: 13px; color: var(--texte3); }

/* Markdown des agents */
.md p + p, .md p + ul, .md p + ol, .md ul + p, .md ol + p { margin-top: 8px; }
.md ul, .md ol { margin: 6px 0 0; padding-left: 20px; }
.md li + li { margin-top: 3px; }
.md .md-titre { font-weight: 800; margin-top: 10px; }
.md code { font-family: var(--mono); font-size: .9em; background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.md a { overflow-wrap: anywhere; }

/* ---------- 3a · Missions d'un agent ---------- */
.vue-agent { display: grid; grid-template-columns: 500px minmax(0, 1fr); height: 100dvh; }
.colonne-agent { overflow-y: auto; padding: 22px 28px 40px; }
.entete-agent { display: flex; align-items: center; gap: 14px; }
.entete-agent .logo { margin-left: auto; opacity: .5; }
.fil-ariane { font-size: 13px; color: var(--texte3); }
.fil-ariane strong { color: var(--encre); }
.poste-grand { position: relative; height: 330px; margin: 0 -10px; }
.stage.mini { width: 300px; height: 300px; background-size: 50px 50px; transform: translate(-50%, -50%) translateY(60px) rotateX(60deg) rotateZ(45deg); }
.moniteur { width: 130px; height: 76px; background: #1d1d1d; border-radius: 6px; padding: 10px; display: grid; align-content: space-between; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.moniteur .frise { display: flex; gap: 2px; height: 8px; }
.moniteur .frise i { border-radius: 2px; }
.moniteur .lignes { display: grid; gap: 5px; }
.moniteur .lignes i { height: 4px; border-radius: 2px; background: #3a3a3a; }
.moniteur .lignes i:nth-child(2) { width: 70%; } .moniteur .lignes i:nth-child(3) { width: 45%; }
.bulle-poste { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 700; box-shadow: var(--ombre-etiquette); margin-bottom: 8px; white-space: nowrap; }
.bulle-poste .badge-attente { width: 20px; height: 20px; font-size: 12px; margin: 0; }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.tuile { background: var(--blanc); border-radius: 12px; padding: 12px 14px; display: grid; align-content: start; gap: 2px; }
.tuile strong { font-size: 20px; font-weight: 900; }
.tuile > span { font-size: 12px; color: var(--texte3); line-height: 1.35; }
.tuile.modele .rangee { justify-content: space-between; flex-wrap: nowrap; }
.titre-liste { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.titre-liste .surtitre { margin: 22px 0 10px; }
.ligne-mission { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none; border: 1.5px solid transparent; margin-top: 4px; }
.ligne-mission:hover { background: var(--doux2); }
.ligne-mission.active { background: var(--blanc); border-color: var(--encre); }
.ligne-mission .numero { font-family: var(--mono); font-size: 12px; color: var(--texte4); line-height: 1.2; width: 34px; flex: none; }
.ligne-mission .texte { flex: 1; min-width: 0; }
.ligne-mission strong { display: block; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-mission small { font-size: 12px; color: var(--texte3); }

.volet-mission { background: var(--blanc); border-radius: 24px 0 0 24px; box-shadow: var(--ombre-panneau); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.volet-vide { margin: auto; color: var(--texte4); }
.entete-mission { display: flex; align-items: flex-start; gap: 16px; padding: 24px 32px 18px; border-bottom: 1px solid var(--trait2); }
.entete-mission .titres { flex: 1; min-width: 0; }
.entete-mission .meta { font-family: var(--mono); font-size: 12px; color: var(--texte4); }
.entete-mission h2 { font-size: 26px; margin-top: 4px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; cursor: pointer; }
.entete-mission h2.deplie { -webkit-line-clamp: unset; }
.sous-titre { color: var(--texte3); font-size: 14px; margin-top: 4px; }
.fil-defilant { flex: 1; overflow-y: auto; padding: 22px 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.fil { display: flex; flex-direction: column; gap: 12px; }
.bulle { max-width: 78%; padding: 12px 16px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.bulle .qui, .carte-livrable .qui { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; opacity: .75; margin-bottom: 6px; }
.bulle .qui .carre, .carte-livrable .qui .carre { font-size: 9px; }
.bulle.nicolas { align-self: flex-end; background: var(--encre); color: #fff; border-radius: 16px 16px 4px 16px; }
.bulle.agent { align-self: flex-start; background: var(--doux); border-radius: 16px 16px 16px 4px; }
.bulle.question { background: var(--ambre-fond); }
.bulle .pieces { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; margin-top: 8px; }
.suivi { align-self: flex-start; font-size: 13px; font-style: italic; color: var(--texte3); }
.suivi strong { font-weight: 700; }
.carte-livrable { background: var(--doux); border-radius: 16px 16px 16px 4px; padding: 14px 16px; display: grid; gap: 10px; max-width: 92%; align-self: flex-start; width: 100%; }
.rendus { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.rendu { display: grid; gap: 8px; max-width: 100%; }
.rendu.video { width: 100%; }
.rendu video { width: 100%; max-height: 62vh; border-radius: 12px; background: #1d1d1d; display: block; }
.rendu img { display: block; max-height: 56vh; max-width: 100%; border-radius: 10px; }
.rendu .pdf { display: grid; place-items: center; width: 180px; height: 240px; border-radius: 10px; background: #fff; text-decoration: none; font-weight: 700; }
.captures { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.captures a { display: grid; gap: 4px; font-size: 12px; color: var(--texte3); text-decoration: none; }
.captures img { width: 100%; height: 210px; object-fit: cover; object-position: top; border-radius: 10px; background: #fff; }
.posts { display: grid; gap: 12px; }
.post { background: #fff; border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.post .vignettes { display: flex; gap: 6px; overflow-x: auto; }
.post .vignettes img, .post .vignettes video { height: 150px; border-radius: 8px; }
.post .legende { white-space: pre-wrap; font-size: 14px; background: var(--doux); border-radius: 8px; padding: 8px 10px; }
.a-retenir { background: var(--livre-fond); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: grid; gap: 6px; }
.alerte-mission { color: #9a2f1f; background: #fbe4e0; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.cout { font-family: var(--mono); font-size: 12px; color: var(--texte4); }
.barre-decision { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 32px; background: var(--ambre-barre); border-top: 1px solid #f3e3c4; }
.barre-decision > p { display: flex; align-items: center; gap: 8px; font-size: 14px; flex: 1 1 260px; }
.barre-decision .boutons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.barre-decision .liens { display: inline-flex; align-items: center; gap: 14px; }
.barre-decision .quand { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.barre-decision .quand input { width: auto; padding: 7px 10px; }
.barre-decision .bouton.contour .mono { font-size: 12px; background: var(--doux2); padding: 1px 6px; border-radius: 5px; }
.barre-decision.faite { background: #f6fbf8; border-top-color: #dff0e6; }
.composer { display: flex; align-items: flex-end; gap: 12px; padding: 14px 32px 20px; border-top: 1px solid var(--trait2); }
.composer .saisie { flex: 1; min-width: 0; border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; background: #fff; }
.composer textarea { border: 0; padding: 2px; min-height: 44px; resize: none; }
.composer textarea:focus-visible { outline: none; }
.composer .saisie:focus-within { border-color: var(--agent); box-shadow: 0 0 0 1px var(--agent); }
.composer .puces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.composer .bouton.envoyer { height: 46px; padding: 0 20px; }
.composer.occupe { align-items: center; color: var(--texte3); font-size: 14px; font-style: italic; }
.liste-pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.liste-pieces:empty, .alerte-pieces:empty { display: none; }
.piece-choisie { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--doux2); max-width: 100%; }
.piece-choisie span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece-choisie button { border: 0; background: none; cursor: pointer; color: var(--texte3); font-size: 15px; line-height: 1; padding: 2px 6px; }
.piece-choisie button:hover { color: var(--rouge); }
.depot { border: 2px dashed #cfcfca; border-radius: 14px; padding: 18px; text-align: center; cursor: pointer; display: grid; gap: 4px; min-height: 64px; place-content: center; }
.depot strong { font-size: 14px; }
.depot small { font-size: 12px; color: var(--texte3); }
.depot:hover, .depot.survol { border-color: var(--agent); background: color-mix(in srgb, var(--agent) 5%, #fff); }
.puce.survol { box-shadow: inset 0 0 0 1.5px var(--agent); }
.formulaire-mission { display: grid; gap: 12px; max-width: 760px; }
.formulaire-mission .champ { margin-top: 0; }
.formulaire-mission textarea { min-height: 170px; border-radius: 14px; }
.rangee-modele { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--doux); border-radius: 12px; padding: 12px 14px; margin-top: 4px; }
.rangee-modele strong { font-size: 14px; }
.rangee-modele small { display: block; font-size: 12px; color: var(--texte3); }
.formulaire-mission .bouton.envoyer { min-height: 48px; padding: 0 22px; }

/* Paulette */
.fil-defilant.courrier { gap: 8px; }
.fil-defilant.courrier .surtitre { margin: 14px 0 6px; }
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chiffres .tuile { background: var(--doux); }
.chiffres .tuile strong { font-size: 30px; line-height: 1.1; }
.barre-repartition { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--trait2); }
.legende-repartition { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.legende-repartition span { display: inline-flex; align-items: center; gap: 6px; }
.puce-cat { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.carte-livrable.consignes { max-width: 100%; margin: 6px 0; }
.liste-tri { margin-top: 8px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--trait2); overflow: hidden; }
.ligne-tri { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 16px; border-top: 1px solid var(--trait2); cursor: pointer; }
.ligne-tri:first-child { border-top: 0; }
.ligne-tri:hover { background: var(--doux); }
.ligne-tri .heure { font-family: var(--mono); font-size: 12px; color: var(--texte4); padding-top: 2px; }
.ligne-tri .corps strong { display: block; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-tri .corps small { display: block; font-size: 13px; color: var(--texte3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-tri.ouverte .corps strong, .ligne-tri.ouverte .corps small { white-space: normal; }
.ligne-tri .droite { display: grid; justify-items: end; gap: 3px; }
.ligne-tri .droite small { font-size: 12px; color: var(--texte4); }
.ligne-tri .droite .corrige { color: var(--livre-texte); font-weight: 700; }
.etiquette-cat { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: color-mix(in srgb, var(--c) 75%, #141414); background: color-mix(in srgb, var(--c) 15%, transparent); }
.details { grid-column: 2 / -1; font-size: 13px; color: var(--texte3); display: none; gap: 3px; }
.ligne-tri.ouverte .details { display: grid; }
.details .bouton { justify-self: start; margin-top: 8px; }
.correction { margin-top: 10px; padding: 14px; border-radius: 12px; background: var(--doux); display: grid; gap: 10px; color: var(--encre); cursor: default; }
.correction > strong { font-size: 14px; }
.correction .puce-choix { background: #fff; }
.correction .puce-choix[aria-pressed="true"] { background: var(--encre); }
.portees { display: grid; gap: 6px; font-size: 14px; }
.portees label { display: flex; gap: 8px; align-items: flex-start; }
.portees input { margin-top: 4px; }
.portees small { display: block; color: var(--texte3); font-size: 12px; }
.note-correction { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--livre-fond); color: var(--encre); }

/* ---------- 4a · Floor builder ---------- */
.vue-plan, .vue-vestiaire { min-height: 100dvh; display: flex; flex-direction: column; }
.barre-plan { display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 24px; background: var(--blanc); border-bottom: 1px solid var(--trait); flex: none; }
.barre-plan .info { margin-left: auto; }
.bascule { display: inline-flex; background: var(--doux2); border-radius: 10px; padding: 3px; margin-left: 12px; }
.bascule button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--texte3); cursor: pointer; }
.bascule button[aria-pressed="true"] { background: #fff; color: var(--encre); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.corps-plan { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
.zone-plan { overflow: auto; display: grid; place-items: start center; padding: 28px; }
.cadre-plan { position: sticky; top: 28px; padding-top: 58px; }
.barre-outils { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; background: var(--encre); padding: 5px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.barre-outils button { border: 0; background: none; color: #fff; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.barre-outils button[aria-pressed="true"] { background: #fff; color: var(--encre); }
.barre-outils kbd { font-family: var(--mono); font-size: 10px; opacity: .55; }
.surface-plan { position: relative; background-color: var(--sol); background-image: linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px); background-size: 40px 40px; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.25); touch-action: none; user-select: none; }
.piece { position: absolute; border: 2px solid transparent; border-radius: 4px; padding: 8px 10px; display: flex; flex-direction: column; justify-content: flex-end; }
.piece span { font-size: 13px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .04em; color: var(--texte4); }
.piece small { font-family: var(--mono); font-size: 11px; color: var(--texte4); }
.piece.sombre span { color: var(--ambre); }
.piece.choisie { border-color: var(--encre); }
.meuble { position: absolute; width: 120px; height: 80px; border-radius: 6px; background: #fff; box-shadow: 0 2px 0 #d0d0cb, 0 4px 10px rgba(0,0,0,.08), inset 0 -10px 0 color-mix(in srgb, var(--c) 30%, transparent); border: 2px solid transparent; padding: 8px 10px; display: grid; align-content: start; gap: 1px; font-size: 12px; }
.meuble .initiale { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 900; font-style: italic; font-size: 12px; margin-bottom: 3px; }
.meuble span:not(.initiale) { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meuble small { color: var(--texte3); }
.meuble.libre { background: rgba(255,255,255,.6); border: 2px dashed #b5b5b0; box-shadow: none; }
.meuble.libre .initiale { background: transparent; color: #b5b5b0; }
.meuble.choisi { border: 2px solid var(--encre); }
.trace { position: absolute; border: 2px dashed var(--encre); background: rgba(20,20,20,.05); border-radius: 4px; display: grid; place-items: center; }
.trace span { background: var(--encre); color: #fff; font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.cadre-3d { position: relative; width: 100%; height: 100%; min-height: 560px; }
.inspecteur { background: var(--blanc); border-left: 1px solid var(--trait); overflow-y: auto; padding: 8px 24px 32px; }
.inspecte { background: var(--doux); border-radius: 14px; padding: 4px 16px 14px; margin-top: 16px; }
.inspecte .surtitre { margin: 14px 0 0; }
.inspecte .rangee { justify-content: space-between; }
.aide-plan { margin-top: 20px; font-size: 14px; color: var(--texte3); }
.nuancier { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille-couleur { width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; display: inline-block; flex: none; }
.pastille-couleur.grande { width: 34px; height: 34px; }
.pastille-couleur[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--encre); }
i.pastille-couleur { width: 16px; height: 16px; cursor: default; border-radius: 4px; }
.occupants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.occupants button { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--trait2); background: #fff; border-radius: 10px; padding: 6px 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.occupants button[aria-pressed="true"] { border-color: var(--encre); }
.occupants .initiale { width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 11px; }
.ligne-plan { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; text-align: left; }
.ligne-plan:hover, .ligne-plan.active { background: var(--doux2); }
.ligne-plan span:not(.carre) { flex: 1; }
.ligne-plan small { color: var(--texte4); font-size: 12px; }
.actions-plan { display: flex; gap: 8px; margin-top: 22px; }
.actions-plan .bouton { flex: 1; }

/* ---------- 5a · Vestiaire ---------- */
.selecteur-agents { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; }
.choix-vestiaire { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; font-weight: 700; font-size: 14px; }
.choix-vestiaire.actif { border-color: var(--encre); background: var(--doux); }
.corps-vestiaire { flex: 1; display: grid; grid-template-columns: 600px minmax(0, 1fr); min-height: 0; }
.cabine { position: relative; display: grid; align-content: center; justify-items: center; gap: 24px; padding: 32px; }
.hasard { position: absolute; top: 24px; right: 24px; background: #fff; box-shadow: var(--ombre-etiquette); }
.estrade { position: relative; width: 420px; height: 420px; }
.carreau { position: absolute; left: 60px; top: 150px; width: 300px; height: 300px; transform: rotateX(60deg) rotateZ(45deg); background-color: var(--sol); background-image: linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px); background-size: 50px 50px; border-radius: 10px; box-shadow: 1px 1px 0 #d8d8d4, 2px 2px 0 #d8d8d4, 3px 3px 0 #d0d0cb, 4px 4px 0 #d0d0cb, 5px 5px 0 #c8c8c3, 6px 6px 0 #c8c8c3, 10px 10px 30px rgba(0,0,0,.12); }
.debout { position: absolute; left: 90px; top: -20px; }
.debout::after { content: ""; position: absolute; left: 60px; bottom: -6px; width: 120px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.12); z-index: -1; }
.apercu-reponse { width: 100%; max-width: 480px; background: #fff; border-radius: 16px 16px 16px 4px; padding: 14px 16px; box-shadow: var(--ombre-etiquette); }
.apercu-reponse .qui { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--texte3); margin-bottom: 6px; }
.apercu-reponse p { white-space: pre-line; font-size: 14.5px; }
.reglages-vestiaire { background: var(--blanc); border-radius: 24px 0 0 24px; box-shadow: var(--ombre-panneau); overflow-y: auto; padding: 8px 32px 40px; }
.onglets-vestiaire { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--trait2); position: sticky; top: 0; background: #fff; z-index: 1; padding-top: 14px; }
.onglets-vestiaire button[aria-pressed] { border: 0; background: none; padding: 10px 0; font-weight: 800; font-size: 15px; color: var(--texte4); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.onglets-vestiaire button[aria-pressed="true"] { color: var(--encre); border-bottom-color: var(--encre); }
.onglets-vestiaire .info { margin-left: auto; }
.rangee-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ton { border: 0; background: var(--doux2); border-radius: 12px; padding: 10px 12px; text-align: left; cursor: pointer; display: grid; }
.ton small { font-size: 12px; opacity: .7; }
.ton[aria-pressed="true"] { background: var(--encre); color: #fff; }
.reglages-vestiaire .rangee-modele { margin-top: 12px; }
input[type="range"] { width: 100%; accent-color: var(--encre); }
.bornes { display: flex; justify-content: space-between; font-size: 12px; color: var(--texte4); }
.champ .rangee { justify-content: space-between; }
.champ .rangee > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--texte4); }
.instructions { background: #1d1d1d; color: #e8e8e4; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; padding: 14px 16px; border-radius: 12px; white-space: pre-wrap; margin: 0; }

/* Feuille « nouvelle mission » (mobile) */
.feuille { position: fixed; inset: 0; z-index: 40; background: #fff; overflow-y: auto; padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); }
.feuille header { display: flex; align-items: center; justify-content: space-between; }
.feuille h2 { font-size: 26px; }
.feuille .bouton.envoyer { width: 100%; min-height: 56px; border-radius: 16px; }
.fermer { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--doux2); font-size: 22px; cursor: pointer; }
.choix-agents { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.choix-agent { display: grid; justify-items: center; gap: 4px; border: 0; background: none; font-size: 12px; cursor: pointer; opacity: .45; padding: 0; }
.choix-agent .carre { box-shadow: 0 0 0 3px #fff, 0 0 0 5px transparent; }
.choix-agent.actif { opacity: 1; font-weight: 800; }
.choix-agent.actif .carre { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }

/* ---------- Mobile ---------- */
@media (max-width: 1180px) and (min-width: 861px) {
  .vue-plateau { grid-template-columns: minmax(0, 1fr) 340px; }
  .vue-agent { grid-template-columns: 400px minmax(0, 1fr); }
  .corps-vestiaire { grid-template-columns: 440px minmax(0, 1fr); }
  .estrade { transform: scale(.8); }
}
/* iPhone : pas de zoom au double tap ; un champ à moins de 16 px fait zoomer Safari dès qu'on le touche. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 860px) {
  body { font-size: 15px; }
  input, select, textarea, select.puce, .composer textarea { font-size: 16px !important; }
  .vue-plan, .vue-vestiaire, .vue-agent, .colonne-agent { max-width: 100vw; overflow-x: hidden; }
  .selecteur-agents { min-width: 0; max-width: 100%; }
  .cabine { overflow: hidden; }
  .estrade { transform: scale(.7); transform-origin: top center; margin: 0 -60px -120px; }
  .apercu-reponse { max-width: 100%; }
  .vue-plateau { display: block; height: auto; min-height: 100dvh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .barre, .legende-plateau { display: none; }
  .scene { overflow: visible; padding: 14px 18px 0; }
  .barre-mobile { display: block; }
  .rangee-mobile { display: flex; align-items: center; justify-content: space-between; }
  .rangee-mobile .pastille { height: 26px; font-size: 11px; }
  .barre-mobile h1 { font-size: 30px; margin-top: 10px; }
  .barre-mobile p { font-size: 13px; color: var(--texte3); }
  .plateau { flex: none; height: 210px; border-radius: 20px; background: var(--doux2); margin-top: 14px; overflow: hidden; }
  .zoom-aide { display: block; position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 11px; font-weight: 600; background: #fff; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
  .zoom-boutons { display: grid; position: absolute; right: 10px; bottom: 10px; z-index: 2; gap: 4px; }
  .zoom-boutons button { width: 44px; height: 40px; border: 0; border-radius: 10px; background: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.1); cursor: pointer; }
  .panneau { border: 0; background: transparent; padding: 18px; overflow: visible; }
  .bloc-equipe { display: block; background: #fff; border-radius: 16px; padding: 4px 14px; margin-top: 14px; }
  .bloc-equipe .surtitre { margin: 12px 0 4px; }
  .ligne-equipe:first-of-type { border-top: 0; }
  .ligne-valider { background: #fff; min-height: 64px; }
  .bloc-affichage { display: none; }
  .vue-plateau[data-onglet="bureau"] .bloc-activite { display: none; }
  .vue-plateau[data-onglet="activite"] :is(.bloc-a-valider, .bloc-equipe, .plateau, .barre-mobile) { display: none; }
  .vue-plateau[data-onglet="activite"] .bloc-activite { background: #fff; border-radius: 16px; padding: 4px 16px 10px; }
  .onglets-mobile { display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--trait); padding: 8px 18px calc(8px + env(safe-area-inset-bottom)); }
  .onglets-mobile .onglet-stock { text-decoration: none; font-size: 12px; font-weight: 700; color: var(--texte4); display: grid; justify-items: center; gap: 4px; min-height: 44px; align-content: center; }
  .onglets-mobile .onglet-stock i { width: 18px; height: 3px; opacity: 0; }
  .onglets-mobile .onglet-laurent { text-decoration: none; font-size: 12px; font-weight: 700; color: #5B6EE1; display: grid; justify-items: center; gap: 4px; min-height: 44px; align-content: center; }
  .onglets-mobile .onglet-laurent i { width: 18px; height: 3px; opacity: 0; }
  .onglets-mobile [data-onglet-mobile] { border: 0; background: none; font-size: 12px; font-weight: 700; color: var(--texte4); display: grid; justify-items: center; gap: 4px; min-height: 44px; cursor: pointer; }
  .onglets-mobile [data-onglet-mobile] i { width: 18px; height: 3px; border-radius: 2px; background: currentColor; opacity: 0; }
  .onglets-mobile [aria-pressed="true"] { color: var(--encre); }
  .onglets-mobile [aria-pressed="true"] i { opacity: 1; }
  .plus-mission { justify-self: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--encre); color: #fff; font-size: 28px; margin-top: -26px; box-shadow: 0 8px 20px rgba(0,0,0,.25); cursor: pointer; }

  .vue-agent { display: block; height: auto; }
  .vue-agent[data-ouvert="true"] .colonne-agent { display: none; }
  .vue-agent[data-ouvert="false"] .volet-mission { display: none; }
  .colonne-agent { padding: 14px 18px 40px; overflow: visible; }
  .poste-grand { height: 250px; }
  .poste-grand .stage.mini { transform: translate(-50%, -50%) translateY(50px) scale(.78) rotateX(60deg) rotateZ(45deg); }
  .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tuile strong { font-size: 16px; }
  .volet-mission { border-radius: 0; box-shadow: none; min-height: 100dvh; height: 100dvh; }
  .mobile-seul { display: inline-flex; }
  .entete-mission { padding: 10px 16px 12px; gap: 6px 10px; align-items: center; flex-wrap: wrap; }
  .entete-mission .retour { width: 44px; height: 44px; justify-content: center; padding: 0; font-size: 22px; background: var(--doux2); }
  .entete-mission h2 { font-size: 18px; line-height: 1.25; -webkit-line-clamp: 2; }
  .entete-mission > .statut { margin-left: auto; }
  .entete-mission > :is(.titres, div:not([class])) { order: 2; flex-basis: 100%; }
  .entete-mission .sous-titre { display: none; }
  .barre-decision { position: relative; gap: 8px; }
  .barre-decision > p { font-size: 13px; padding-right: 70px; }
  .barre-decision:has(.liens > .lien + .lien) > p { padding-right: 150px; }
  .barre-decision.faite { flex-wrap: wrap; }
  .barre-decision .boutons > .liens { position: absolute; right: 10px; top: 8px; }
  .barre-decision .boutons > .info:empty { display: none; }
  .fil-defilant { padding: 16px; }
  .bulle { max-width: 92%; }
  .carte-livrable { max-width: 100%; }
  .barre-decision { padding: 12px 16px; }
  .barre-decision .boutons { width: 100%; display: grid; grid-template-columns: 1fr 1.4fr; }
  .barre-decision .boutons .bouton { min-height: 56px; border-radius: 16px; white-space: normal; padding: 0 10px; text-align: center; min-width: 0; }
  .barre-decision .boutons :is(.info, .liens, .quand) { grid-column: 1 / -1; }
  .composer { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .composer .bouton.envoyer { height: 44px; padding: 0 14px; }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .ligne-tri { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .ligne-tri .heure { grid-column: 1 / -1; }
  .details { grid-column: 1 / -1; }

  .barre-plan { height: auto; min-height: 60px; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .barre-plan .info { display: none; }
  .corps-plan, .corps-vestiaire { display: block; }
  .zone-plan { padding: 16px; overflow-x: auto; place-items: start; }
  .cadre-plan { position: relative; top: 0; }
  .inspecteur { border: 0; }
  .cabine { padding: 18px; }
  .reglages-vestiaire { border-radius: 24px 24px 0 0; padding: 4px 18px 40px; }
  .selecteur-agents { flex-basis: 100%; margin-left: 0; }
  .rangee-champs { grid-template-columns: 1fr; }
}

/* 6 · Décisions (tableau à côté de ton bureau, puis la vue #/decisions) */
.pion-tableau { cursor: pointer; }
.pion-tableau > * { pointer-events: auto; }
.pion-etagere { cursor: pointer; pointer-events: auto; }
.etagere-stock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.etiquette-stock { background: var(--blanc); border-radius: 8px; padding: 4px 10px; display: grid; justify-items: center; box-shadow: var(--ombre-etiquette); }
.etiquette-stock strong { font-size: 12px; font-weight: 900; font-style: italic; }
.etiquette-stock .compte { font-size: 10px; font-weight: 700; color: var(--texte4); }
.etagere-stock .meuble-stock { line-height: 0; }
.etagere-stock .meuble-stock svg { display: block; }
.pion-etagere:hover .meuble-stock { filter: brightness(1.06); }
.tableau-decisions { position: relative; width: 96px; padding: 6px 7px 7px; background: var(--blanc); border: 3px solid var(--encre); border-radius: 6px; display: grid; gap: 2px; justify-items: center; text-align: center; box-shadow: 2px 2px 0 #c8c8c3, var(--ombre-etiquette); margin-bottom: 14px; }
/* Dans l'angle du plateau (pente de 26,565° des axes du sol) : le long du mur gauche ou du mur du fond. */
.tableau-decisions.mur-gauche { transform: skewY(-26.565deg); }
.tableau-decisions.mur-fond { transform: skewY(26.565deg); }
.tableau-decisions strong { font-size: 11px; line-height: 1.15; font-weight: 900; font-style: italic; }
.tableau-decisions .compte { font-size: 9px; line-height: 1.15; font-weight: 700; color: var(--texte4); }
.tableau-decisions.attend { border-color: var(--ambre); }
.tableau-decisions.attend .compte { color: var(--ambre-texte); }
.tableau-decisions .pieds { position: absolute; left: 50%; top: 100%; width: 60px; height: 14px; transform: translateX(-50%); border: solid var(--encre); border-width: 0 3px; }

.vue-decisions { height: 100dvh; display: flex; flex-direction: column; background: var(--scene); }
.dec-entete { height: 72px; flex: none; display: flex; align-items: center; gap: 20px; padding: 0 28px; background: var(--blanc); border-bottom: 1px solid var(--trait); }
.dec-entete h1 { margin: 0; font-size: 18px; font-weight: 900; font-style: italic; }
.dec-compteur { font-size: 14px; color: var(--texte3); }
.dec-espace { flex: 1; }
.dec-mono { font-family: var(--mono); font-size: 12px; color: var(--texte2); }
.dec-progres { width: 160px; height: 6px; border-radius: 3px; background: var(--trait2); overflow: hidden; }
.dec-progres i { display: block; height: 100%; background: var(--encre); transition: width .4s; }
.dec-clavier { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--texte4); }
.vue-decisions kbd { font-family: var(--mono); font-size: 11px; padding: 3px 7px; border-radius: 5px; background: var(--doux); border: 1px solid #e2e2de; color: var(--texte2); margin-left: 8px; }
.dec-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr) 300px; }

.dec-file { overflow-y: auto; padding: 22px 16px 22px 22px; display: grid; align-content: start; gap: 18px; }
.dec-file h3, .dec-histo h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texte4); display: flex; gap: 8px; }
.dec-element { width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1.5px solid transparent; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.dec-element:hover { background: var(--blanc); }
.dec-element.choisi { background: var(--blanc); border-color: var(--encre); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.dec-texte { display: grid; gap: 3px; min-width: 0; }
.dec-texte strong { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.dec-texte small { font-size: 12.5px; color: var(--texte3); }
.dec-avatar { flex: none; width: var(--t); height: var(--t); border-radius: 50%; background: #e2e2de; overflow: hidden; display: inline-block; box-shadow: inset 0 0 0 2px var(--c); }

.dec-carte { position: relative; margin: 22px 0; background: var(--blanc); border-radius: 24px; box-shadow: 0 2px 14px rgba(0,0,0,.05); display: flex; flex-direction: column; min-height: 0; transition: transform .26s ease, opacity .26s ease; }
.dec-carte.sort-droite { transform: translateX(80px) rotate(2deg); opacity: 0; }
.dec-carte.sort-gauche { transform: translateX(-80px) rotate(-2deg); opacity: 0; }
.dec-carte.sort-haut { transform: translateY(-40px); opacity: 0; }
.dec-defile { flex: 1; overflow-y: auto; padding: 30px 40px; }
.dec-contenu { max-width: 760px; margin: 0 auto; display: grid; gap: 22px; }
.dec-agent { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dec-agent strong { font-size: 16px; font-weight: 800; }
.dec-agent strong span { font-weight: 500; color: var(--texte3); }
.dec-agent small { display: block; color: var(--texte4); margin-top: 3px; }
.dec-puce { background: var(--doux); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.dec-puce.echeance { background: #fbf0dc; }
.dec-puce.echeance i { width: 7px; height: 7px; border-radius: 50%; background: var(--ambre); }
.dec-question { margin: 0; font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
.dec-bulle { font-size: 17px; line-height: 1.55; background: var(--doux); border-radius: 18px 18px 18px 4px; padding: 18px 20px; }
.dec-bulle > :first-child { margin-top: 0; }
.dec-bulle > :last-child { margin-bottom: 0; }
.dec-apercu { display: grid; place-items: center; aspect-ratio: 16 / 6; border-radius: 16px; overflow: hidden; background: repeating-linear-gradient(45deg, #262626 0 12px, #222 12px 24px); color: #bbb; }
.dec-apercu .dec-mono { color: #bbb; }
.quand-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.quand-posts .quand { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-transform: capitalize; }
.dec-visuels { display: flex; flex-wrap: wrap; gap: 10px; }
.dec-visuels a { display: block; border-radius: 12px; overflow: hidden; background: #262626; color: #bbb; font-size: 12px; }
.dec-visuels img, .dec-visuels video { display: block; height: 340px; max-width: 100%; object-fit: contain; }
.dec-apercu img, .dec-apercu video { width: 100%; height: 100%; object-fit: cover; }
.dec-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dec-option { position: relative; display: grid; gap: 4px; text-align: left; font: inherit; padding: 52px 16px 16px; border-radius: 16px; border: 2px solid #e2e2de; background: var(--blanc); cursor: pointer; }
.dec-option.choisie { border-color: var(--encre); }
.dec-option strong { font-size: 16px; font-weight: 800; }
.dec-option small { font-size: 13.5px; color: var(--texte3); }
.dec-option em { font-style: normal; font-size: 12px; font-weight: 700; }
.dec-num { position: absolute; left: 14px; top: 14px; }
.dec-coche { position: absolute; right: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #e2e2de; display: grid; place-items: center; color: #fff; font-size: 14px; }
.dec-option.choisie .dec-coche { background: var(--encre); border-color: var(--encre); }
.dec-faits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.dec-faits div { background: #fafaf8; border: 1px solid var(--trait2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; }
.dec-faits small { font-size: 12px; color: var(--texte4); }
.dec-faits strong { font-size: 15px; font-weight: 700; }
.dec-suites { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dec-suites h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texte4); }
.dec-suites h4.oui { color: var(--vert); }
.dec-suites p { margin: 0; font-size: 15px; line-height: 1.5; }
.dec-pourquoi { margin: 0; color: var(--texte4); }

.dec-actions { flex: none; border-top: 1px solid var(--trait2); padding: 18px 40px 22px; display: grid; gap: 12px; }
.dec-boutons { display: flex; align-items: center; gap: 12px; }
.dec-secondaire { font: inherit; font-size: 16px; font-weight: 700; padding: 14px 20px; border-radius: 12px; background: var(--blanc); border: 1.5px solid #dcdcd7; cursor: pointer; display: inline-flex; align-items: center; }
.dec-secondaire:hover { border-color: var(--encre); }
.dec-principal { font: inherit; font-size: 17px; font-weight: 800; padding: 15px 26px; border-radius: 12px; background: var(--encre); color: #fff; border: 0; cursor: pointer; display: inline-flex; align-items: center; margin-left: auto; white-space: nowrap; }
.dec-secondaire { white-space: nowrap; }
.dec-principal:hover { background: #3a3a3a; }
.dec-principal.inactif { background: #c9c9c5; cursor: default; }
.dec-principal kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.dec-correction > strong { font-size: 14px; font-weight: 700; }
.dec-correction textarea { height: 84px; resize: vertical; border: 1.5px solid var(--encre); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; }
.dec-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dec-chips .puce { background: var(--doux); border-radius: 999px; }
.dec-chips .puce:hover { background: #e9e9e6; }
.dec-bandeau { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--encre); color: #fff; border-radius: 999px; padding: 10px 12px 10px 18px; box-shadow: 0 14px 30px rgba(0,0,0,.25); font-size: 14px; white-space: nowrap; max-width: calc(100% - 32px); z-index: 2; }
.dec-bandeau i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dec-bandeau strong { font-weight: 800; }
.dec-bandeau span { color: #cfcfcc; overflow: hidden; text-overflow: ellipsis; }
.dec-bandeau button { font: inherit; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.dec-vide { margin: auto; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px; }
.dec-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--vert); color: #fff; display: grid; place-items: center; font-size: 30px; }
.dec-vide h2 { margin: 0; font-size: 30px; font-weight: 900; font-style: italic; }
.dec-vide p { margin: 0; color: var(--texte3); }

.dec-histo { overflow-y: auto; padding: 22px; display: grid; align-content: start; gap: 10px; }
.dec-histo .vide { color: var(--texte4); font-size: 13px; line-height: 1.5; margin: 0; }
.dec-fait { background: var(--blanc); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.dec-fait > div { display: grid; gap: 4px; min-width: 0; }
.dec-fait strong { font-size: 13px; font-weight: 700; }
.dec-fait small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--texte3); }
.dec-fait small i { width: 7px; height: 7px; border-radius: 50%; }
.dec-fait em { font-size: 12px; color: var(--texte3); }
.dec-pile { display: none; }

/* Écrans moyens : l'historique passe sous la file, la carte garde la place */
@media (max-width: 1280px) and (min-width: 861px) {
  .dec-corps { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dec-file { grid-column: 1; grid-row: 1; max-height: 55vh; }
  .dec-carte { grid-column: 2; grid-row: 1 / span 2; }
  .dec-histo { grid-column: 1; grid-row: 2; padding-top: 0; }
  .dec-carte { margin-right: 22px; }
  .dec-defile { padding: 26px 28px; }
  .dec-actions { padding: 16px 28px 20px; }
  .dec-clavier { display: none; }
}

@media (max-width: 860px) {
  .dec-entete { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 14px 16px; }
  .dec-entete h1 { font-size: 28px; }
  .dec-clavier, .dec-file, .dec-histo { display: none; }
  .dec-progres { flex: 1; width: auto; height: 5px; }
  .dec-corps { grid-template-columns: minmax(0, 1fr); padding: 0 12px 12px; }
  .dec-carte { margin: 12px 0 18px; box-shadow: 0 6px 20px rgba(0,0,0,.07); }
  .dec-pile { display: block; position: absolute; left: 16px; right: 16px; bottom: -8px; height: 12px; border-radius: 0 0 18px 18px; background: #f7f7f5; z-index: -1; }
  .dec-defile { padding: 20px; }
  .dec-question { font-size: 23px; }
  .dec-bulle { font-size: 15.5px; }
  .dec-apercu { aspect-ratio: 16 / 9; }
  .dec-choix, .dec-suites { grid-template-columns: 1fr; }
  .dec-option { padding: 14px 50px 14px 16px; }
  .dec-num { display: none; }
  .dec-actions { padding: 12px; }
  .dec-boutons { display: grid; grid-template-columns: 1fr 1fr 1.4fr; }
  .dec-boutons.quatre { grid-template-columns: 1fr 1fr 1fr 1.25fr; gap: 8px; }
  .dec-boutons.quatre > * { font-size: 14px; }
  .dec-boutons .dec-espace { display: none; }
  .dec-correction .dec-boutons { display: flex; }
  .dec-correction .dec-principal { flex: 1; height: 52px; }
  .dec-correction .dec-secondaire { height: 52px; }
  .dec-secondaire, .dec-principal { height: 64px; border-radius: 18px; justify-content: center; padding: 0 10px; margin: 0; }
  .dec-boutons > :only-child, .dec-boutons > .dec-principal:first-child { grid-column: 1 / -1; }
  .vue-decisions kbd, .dec-libelle { display: none; }
  .dec-bandeau { white-space: normal; width: calc(100% - 32px); border-radius: 18px; }
  .dec-bandeau span { display: none; }
  .vue-decisions { overflow-x: hidden; }
  .dec-correction textarea { height: 70px; }
  .dec-chips { flex-wrap: nowrap; overflow-x: auto; }
  .dec-bandeau { bottom: 96px; }
}

/* ---------- Stock ---------- */
.vue-stock { min-height: 100dvh; background: var(--scene); padding: 0 32px 48px; }
.stock-entete { display: flex; align-items: center; gap: 16px; height: 84px; }
.stock-entete h1 { margin: 0; font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.stock-aide { margin: 0 0 16px; color: var(--texte3); font-size: 14px; max-width: 720px; }
.stock-filtres { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 22px; }
.stock-filtre { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.stock-carte { background: var(--blanc); border-radius: 18px; box-shadow: 0 2px 14px rgba(0,0,0,.05); overflow: hidden; display: flex; flex-direction: column; }
.stock-apercu { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; background: repeating-linear-gradient(45deg, #262626 0 12px, #222 12px 24px); color: #bbb; text-decoration: none; }
.stock-apercu img, .stock-apercu video { width: 100%; height: 100%; object-fit: cover; }
.stock-nombre { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.stock-texte { padding: 14px 16px 6px; display: grid; gap: 6px; }
.stock-texte .qui { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--texte3); }
.stock-texte strong { font-size: 15px; line-height: 1.35; }
.stock-actions { margin-top: auto; padding: 10px 16px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stock-actions .lien { margin-left: auto; }
.stock-vide { background: var(--blanc); border-radius: 18px; padding: 40px; text-align: center; display: grid; gap: 8px; }
.stock-vide p { margin: 0; color: var(--texte3); }
@media (max-width: 860px) {
  .vue-stock { padding: 0 16px calc(32px + env(safe-area-inset-bottom)); }
  .stock-entete { height: auto; padding: 14px 0 10px; flex-wrap: wrap; gap: 8px 12px; }
  .stock-entete h1 { font-size: 28px; }
  .stock-filtre { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .stock-filtres { flex-direction: column; }
  .stock-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stock-texte { padding: 10px 10px 4px; }
  .stock-texte strong { font-size: 13.5px; }
  .stock-actions { padding: 8px 10px 12px; }
  .stock-actions .bouton { flex: 1 1 100%; justify-content: center; min-height: 44px; }
  .stock-actions .lien { margin: 0 auto; }
}
.poignee-taille { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 4px; background: var(--encre); border: 2px solid #fff; cursor: nwse-resize; touch-action: none; z-index: 2; }
.rangee-taille { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pas-taille { display: flex; align-items: center; gap: 6px; }
.pas-taille small { color: var(--texte3); font-size: 12px; min-width: 64px; }
.pas-taille strong { min-width: 34px; text-align: center; font-size: 13px; }
.pas-taille .puce { width: 30px; justify-content: center; font-size: 15px; }

/* ---------- Décoration (Floor builder) ---------- */
.deco { pointer-events: none; }
.deco svg { display: block; overflow: visible; }
.objet-deco { position: absolute; border: 1.5px dashed rgba(0,0,0,.18); border-radius: 4px; background: rgba(255,255,255,.35); display: grid; place-items: center; overflow: hidden; cursor: grab; }
.objet-deco svg { max-width: 100%; max-height: 100%; }
.objet-deco.choisi { border: 2px solid var(--encre); }
.palette-deco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.palette-deco button { display: grid; justify-items: center; align-content: end; gap: 4px; padding: 8px 4px 6px; min-height: 92px; border: 1.5px solid transparent; border-radius: 12px; background: var(--doux); cursor: pointer; font: inherit; }
.palette-deco button svg { max-width: 100%; max-height: 64px; }
.palette-deco button span { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; }
.palette-deco button[aria-pressed="true"] { border-color: var(--encre); background: var(--blanc); }
.apercu-deco { display: grid; place-items: center; padding: 10px; background: var(--doux); border-radius: 12px; }
.apercu-deco svg { max-width: 100%; }
.surface-bords { position: relative; padding: 34px; }
.bord-plan { position: absolute; border: 1.5px dashed #b5b5b0; background: rgba(255,255,255,.6); color: var(--texte3); font: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; cursor: pointer; }
.bord-plan:hover { border-color: var(--encre); color: var(--encre); background: #fff; }
.bord-plan.haut, .bord-plan.bas { left: 34px; right: 34px; height: 26px; }
.bord-plan.haut { top: 4px; } .bord-plan.bas { bottom: 4px; }
.bord-plan.gauche, .bord-plan.droite { top: 34px; bottom: 34px; width: 26px; writing-mode: vertical-rl; }
.bord-plan.gauche { left: 4px; } .bord-plan.droite { right: 4px; }

/* ---------- Salle de réunion ---------- */
.vue-reunion { min-height: 100dvh; display: flex; flex-direction: column; background: var(--scene); }
.reu-entete { display: flex; align-items: center; gap: 18px; padding: 0 28px; height: 72px; flex: none; background: var(--blanc); border-bottom: 1px solid var(--trait); }
.reu-entete h1 { margin: 0; font-size: 20px; font-weight: 900; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reu-alerte { margin: 24px 28px; }
.reu-accueil { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 24px 28px; align-items: start; }
.reu-nouvelle, .reu-liste { background: var(--blanc); border-radius: 22px; padding: 24px; display: grid; gap: 14px; }
.reu-nouvelle h2, .reu-liste h2 { margin: 0; font-size: 20px; font-weight: 900; font-style: italic; }
.reu-nouvelle textarea { border: 1.5px solid var(--trait); border-radius: 12px; padding: 12px; font: inherit; resize: vertical; }
.reu-element { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; background: var(--doux); }
.reu-element:hover { background: var(--doux2); }
.reu-element > span:last-child { display: grid; gap: 2px; min-width: 0; }
.reu-element small { color: var(--texte3); font-size: 12px; }
.reu-avatars { display: flex; gap: 2px; flex: none; }
.reu-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); gap: 20px; padding: 20px 28px; }
.reu-visio { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-content: start; }
.reu-vignette { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; background: #1f1f24; color: #fff; display: grid; place-items: center; align-content: center; gap: 4px; padding: 12px; overflow: hidden; outline: 3px solid transparent; transition: outline-color .2s, transform .2s; }
.reu-vignette::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); opacity: .55; }
.reu-vignette > * { position: relative; }
.reu-vignette .reu-tete { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; background: #e2e2de; box-shadow: 0 0 0 3px var(--c); }
.reu-vignette strong { font-size: 15px; font-weight: 800; }
.reu-vignette small { font-size: 12px; color: #c9c9c5; text-align: center; }
.reu-vignette.parle { outline-color: var(--c); transform: scale(1.02); }
.reu-vignette.parle small { color: #fff; }
.reu-vignette.vient { outline-color: color-mix(in srgb, var(--c) 45%, transparent); }
.reu-stock { grid-column: 1 / -1; background: var(--blanc); border-radius: 20px; padding: 14px 16px 16px; }
.reu-stock h2 { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.reu-stock-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.reu-stock-grille a { display: block; border-radius: 10px; overflow: hidden; background: #e2e2de; aspect-ratio: 4 / 5; overflow-wrap: anywhere; font-size: 11px; }
.reu-stock-grille img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reu-fil-zone { background: var(--blanc); border-radius: 22px; display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 112px); overflow: hidden; }
.reu-fil { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 240px; }
.reu-fil .bulle.agent { border-left: 3px solid var(--c); }
.reu-fil .reu-info { opacity: .8; font-size: 13px; }
.reu-fil .reu-compte_rendu { background: #eef6ef; }
.reu-tape { color: var(--texte3); font-style: italic; }
.reu-saisie { border-top: 1px solid var(--trait2); padding: 12px 16px 16px; display: grid; gap: 10px; }
.reu-saisie textarea { border: 1.5px solid var(--trait); border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; }
.reu-plan { border-top: 1px solid var(--trait2); padding: 14px 16px 16px; display: grid; gap: 10px; max-height: 50%; overflow-y: auto; }
.reu-ligne { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--doux); cursor: pointer; }
.reu-ligne input { margin-top: 4px; width: 18px; height: 18px; }
.reu-ligne div { display: grid; gap: 2px; }
.reu-ligne small { color: var(--texte3); font-size: 12px; }
.reu-ligne p { margin: 4px 0 0; font-size: 13px; color: var(--texte2); }
@media (max-width: 860px) {
  .reu-entete { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 6px 12px; }
  .reu-accueil, .reu-corps { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .reu-visio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .reu-vignette { aspect-ratio: 1; border-radius: 14px; padding: 6px; }
  .reu-vignette .reu-tete { width: 52px; height: 52px; }
  .reu-vignette small { display: none; }
  .reu-fil-zone { max-height: none; }
}
.reu-entete .retour { white-space: nowrap; flex: none; }

/* 9 · Centre de contrôle PhotoFader */
.ecran-controle { width: 104px; }
.ecran-controle.direct { border-color: var(--vert); }
.ecran-controle.direct .compte { color: var(--livre-texte); }
.cc-bandeau { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--ambre-fond); color: var(--ambre-texte); font-weight: 600; font-size: 14px; }
.cc-event { background: var(--blanc); border-radius: 18px; box-shadow: 0 2px 14px rgba(0,0,0,.05); padding: 20px 22px; margin-bottom: 20px; display: grid; gap: 16px; }
.cc-event-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cc-event-entete h2 { margin: 0; font-size: 22px; font-weight: 900; font-style: italic; }
.cc-event-entete p { margin: 2px 0 0; color: var(--texte3); font-size: 13px; }
.cc-liens { display: flex; gap: 14px; }
.cc-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.cc-tuile { background: var(--doux); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.cc-tuile strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cc-tuile span { font-size: 12px; color: var(--texte3); }
.cc-jauge { display: block; height: 6px; border-radius: 3px; background: var(--trait); margin-top: 6px; position: relative; overflow: hidden; }
.cc-jauge::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--vert); }
.cc-jauge.pleine::after { background: var(--rouge); }
.cc-photos { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.cc-photos a { flex: none; display: grid; gap: 4px; text-decoration: none; color: var(--texte3); font-size: 11px; text-align: center; }
.cc-photos img { height: 150px; width: auto; border-radius: 8px; background: var(--doux); display: block; }
.cc-vide-ligne { margin: 0; color: var(--texte4); font-size: 14px; }
.cc-bornes { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.cc-borne { display: grid; grid-template-columns: 150px 1fr; gap: 14px; border: 2px solid var(--trait2); border-radius: 14px; padding: 12px; }
.cc-borne.souci { border-color: var(--ambre); }
.cc-ecran { display: grid; gap: 4px; align-content: start; }
.cc-ecran img { width: 100%; border-radius: 8px; background: #222; display: block; }
.cc-ecran > span { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 8px; background: var(--doux); color: var(--texte4); font-size: 12px; }
.cc-ecran small { color: var(--texte4); font-size: 11px; text-align: center; }
.cc-borne-texte { display: grid; gap: 4px; align-content: start; min-width: 0; }
.cc-borne-titre { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.cc-soucis { margin: 0 0 4px; color: var(--rouge); font-weight: 700; font-size: 13px; }
.cc-ok { margin: 0 0 4px; color: var(--livre-texte); font-weight: 600; font-size: 13px; }
.cc-ligne { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--trait2); }
.cc-ligne span { color: var(--texte3); }
.cc-ligne strong { font-weight: 600; text-align: right; }
.cc-ligne.alerte strong { color: var(--rouge); }
@media (max-width: 860px) {
  .cc-event { padding: 16px; }
  .cc-bornes { grid-template-columns: 1fr; }
  .cc-borne { grid-template-columns: 84px 1fr; gap: 10px; }
  .cc-photos img { height: 120px; }
}

/* Stock matériel de l'étage PhotoFader */
.mat-recherche { width: 100%; max-width: 360px; margin: 0 0 16px; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--blanc); box-shadow: 0 2px 14px rgba(0,0,0,.05); }
.mat-bloc { gap: 10px; }
.mat-bloc h2 { margin: 0; font-size: 20px; font-weight: 900; font-style: italic; }
.mat-defile { overflow-x: auto; }
.mat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mat-table th, .mat-table td { padding: 8px 10px 8px 0; text-align: left; border-bottom: 1px solid var(--trait2); white-space: nowrap; }
.mat-table thead th { color: var(--texte3); font-size: 12px; font-weight: 600; }
.mat-table tbody th { font-weight: 700; }
.mat-table tbody tr:last-child > * { border-bottom: 0; }

/* Changer d'étage : un ascenseur. En montant, l'ancien plateau part vers le bas et le nouveau descend d'en haut. */
@keyframes etage-arrive-haut { from { opacity: 0; translate: 0 -85%; scale: .82; } 60% { opacity: 1; } }
@keyframes etage-arrive-bas { from { opacity: 0; translate: 0 85%; scale: .82; } 60% { opacity: 1; } }
@keyframes etage-part-bas { to { opacity: 0; translate: 0 85%; scale: .82; } }
@keyframes etage-part-haut { to { opacity: 0; translate: 0 -85%; scale: .82; } }
.plateau-zoom.monte { animation: etage-arrive-haut .9s cubic-bezier(.3, .9, .25, 1); }
.plateau-zoom.descend { animation: etage-arrive-bas .9s cubic-bezier(.3, .9, .25, 1); }
.plateau-zoom.part { pointer-events: none; }
.plateau-zoom.part.monte { animation: etage-part-bas .7s cubic-bezier(.5, 0, .8, .4) forwards; }
.plateau-zoom.part.descend { animation: etage-part-haut .7s cubic-bezier(.5, 0, .8, .4) forwards; }
@media (prefers-reduced-motion: reduce) { .plateau-zoom.monte, .plateau-zoom.descend { animation: none; } }

/* 8 · Carnet */
.carnet-ajout { display: flex; gap: 10px; max-width: 820px; margin-bottom: 22px; }
.carnet-ajout .carnet-champ { flex: 1; min-width: 0; }
.carnet-ajout .carnet-date { flex: 0 0 170px; }
.carnet-bloc { max-width: 820px; margin-bottom: 26px; }
.carnet-bloc h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--texte4); }
.carnet-bloc > p { margin: -4px 0 10px; font-size: 13px; }
.carnet-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.carnet-ligne { display: grid; grid-template-columns: 150px 1fr auto auto; align-items: center; gap: 12px; background: var(--blanc); border-radius: 14px; padding: 12px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.carnet-ligne.retard { box-shadow: inset 4px 0 0 var(--ambre), 0 2px 10px rgba(0,0,0,.04); }
.carnet-ligne.jour { box-shadow: inset 4px 0 0 var(--encre), 0 2px 10px rgba(0,0,0,.04); }
.carnet-quand { font-size: 12px; font-weight: 700; color: var(--texte3); overflow-wrap: anywhere; }
.carnet-ligne.retard .carnet-quand { color: var(--ambre-texte); }
.carnet-texte { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.carnet-num { font-size: 12px; }
@media (max-width: 860px) {
  .carnet-ajout { flex-wrap: wrap; }
  .carnet-ajout .carnet-champ { flex-basis: 100%; }
  .carnet-ajout .carnet-date { flex: 1; }
  .carnet-ligne { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .carnet-quand { grid-column: 1 / -1; }
  .carnet-num { display: none; }
}
