/* un élément masqué (attribut hidden) le reste, même si une règle lui donne un display (ex. liste des combinés de la fiche) */
[hidden] { display: none !important; }
:root {
  --ink: #2f3133;
  --muted: #6b7075;
  --line: #dcdfe3;
  --bg: #f4f5f2;
  --card: #ffffff;
  --brand: #a4c229;       /* vert du logo */
  --brand-dark: #5d7410;  /* vert lisible sur blanc */
  --accent: #2f3133;
  --ok: #2e7d32;
  --ok-bg: #e5f3e3;
  --warn: #9a6200;
  --warn-bg: #fff2d6;
  --err: #b3261e;
  --err-bg: #fbe4e2;
  --info: #1d4ed8;
  --info-bg: #e3ebfd;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand-dark); }
h1 { font-size: 1.5rem; margin: .3em 0 .4em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1.05rem; margin: 0 0 .4em; }
code { background: #eef0ea; padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.c { text-align: center; }

/* ---------- Barre de navigation ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--accent); color: #fff; padding: 8px 16px;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.brand img { height: 34px; border-radius: 4px; }
/* tête de robot en hologramme dans la barre du haut (hud.js) : logo CANB sur le front, suit la souris */
.brand .robot-holo-logo { display: none; }
.robot-holo { display: block; width: 40px; height: 52px; transform-style: preserve-3d; will-change: transform;
  filter: drop-shadow(0 0 6px rgba(64, 200, 255, .75)) drop-shadow(0 0 14px rgba(64, 200, 255, .35)); animation: rh-flotte 4s ease-in-out infinite; }
/* il parle : la bouche s'anime */
.robot-holo.parle .rh-bouche line { animation: rh-parle .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.robot-holo.parle .rh-bouche line:nth-child(2) { animation-delay: .06s; }
.robot-holo.parle .rh-bouche line:nth-child(3) { animation-delay: .12s; }
@keyframes rh-parle { to { transform: scaleX(.45); opacity: 1; } }
.robot-holo svg { width: 100%; height: 100%; overflow: visible; display: block; animation: rh-scintille 5.5s steps(1) infinite; }
.robot-holo .rh-tete, .robot-holo .rh-visage, .robot-holo .rh-yeux { transform-box: view-box; }
.robot-holo .rh-coque { stroke: #7fe3ff; stroke-width: 1.4; }
.robot-holo .rh-oreille { fill: rgba(64, 200, 255, .22); stroke: #5fd7ff; stroke-width: 1; }
.robot-holo .rh-trait { stroke: #7fe3ff; stroke-width: 1.2; }
.robot-holo .rh-antenne { fill: #e9fbff; animation: rh-antenne 1.6s ease-in-out infinite; }
.robot-holo .rh-bandeau { fill: rgba(8, 30, 48, .85); stroke: #7fe3ff; stroke-width: .8; }
/* nom du robot sur son front ; torse avec le logo CANB sur la poitrine, en hologramme bleuté translucide qui scintille */
.robot-holo .rh-cou { fill: rgba(64, 200, 255, .2); stroke: #5fd7ff; stroke-width: 1; }
.robot-holo .rh-plastron { fill: rgba(2, 10, 22, .55); stroke: #40c8ff; stroke-width: .8; }
.robot-holo .rh-voyant { fill: #a4c229; animation: rh-antenne 1.6s ease-in-out infinite; }
.robot-holo .rh-nom { fill: #bff3ff; font: 700 9.5px/1 ui-monospace, Consolas, monospace; letter-spacing: .6px; filter: drop-shadow(0 0 2px #40c8ff); }
.robot-holo .rh-logo-flotte { animation: rh-logo-flotte 3.2s ease-in-out infinite; transform-box: view-box; }
.robot-holo .rh-logo-fond { fill: #9be9ff; opacity: .8; animation: rh-logo-holo 4s ease-in-out infinite; }
.robot-holo .rh-logo-halo { fill: rgba(64, 200, 255, .12); }
@keyframes rh-logo-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes rh-logo-holo { 0%, 100% { opacity: .7; } 50% { opacity: .9; } 52% { opacity: .45; } 54% { opacity: .85; } }
.robot-holo .rh-visiere { fill: rgba(2, 10, 22, .78); stroke: #40c8ff; stroke-width: 1; }
.robot-holo .rh-pupille { fill: #f2fdff; }
.robot-holo .rh-oeil-g, .robot-holo .rh-oeil-d { transform-box: fill-box; transform-origin: center; transition: transform .07s; }
.robot-holo.cligne .rh-oeil-g, .robot-holo.cligne .rh-oeil-d { transform: scaleY(.12); }
.robot-holo .rh-bouche line { stroke: #7fe3ff; stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.robot-holo .rh-balayage { fill: rgba(191, 243, 255, .35); animation: rh-balaye 2.8s linear infinite; }
.robot-holo .rh-socle { fill: rgba(64, 200, 255, .45); }
@keyframes rh-flotte { 50% { translate: 0 -2px; } }
@keyframes rh-scintille { 0%, 100% { opacity: 1; } 47% { opacity: .82; } 48% { opacity: 1; } 71% { opacity: .9; } 72% { opacity: 1; } }
@keyframes rh-antenne { 50% { fill: #40c8ff; opacity: .5; } }
@keyframes rh-balaye { from { transform: translateY(0); } to { transform: translateY(72px); } }
@media (prefers-reduced-motion: reduce) { .robot-holo, .robot-holo svg, .robot-holo .rh-balayage, .robot-holo .rh-antenne { animation: none; } }

/* barre du haut agrandie pour le robot : il occupe la gauche sur deux lignes ; menus en haut ; en dessous, sa zone de parole
   (les bulles s'y ouvrent, jamais par-dessus la page ni les menus) */
.robot-console { display: none; }
body.robot-bandeau .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: 18px; row-gap: 4px;
  align-items: center; padding: 6px 16px 8px 10px; min-height: 150px; }
body.robot-bandeau .topbar .brand { grid-row: 1 / 3; grid-column: 1; align-self: center; }
body.robot-bandeau .topbar nav.modules { grid-row: 1; grid-column: 2; }
body.robot-bandeau .topbar .userbox { grid-row: 1; grid-column: 3; }
body.robot-bandeau .robot-holo { width: 112px; height: 146px; /* tête + torse de CanBot */ filter: drop-shadow(0 0 10px rgba(64, 200, 255, .8)) drop-shadow(0 0 26px rgba(64, 200, 255, .35)); }
body.robot-bandeau .robot-console { grid-row: 2; grid-column: 2 / 4; display: flex; align-items: center; min-height: 86px; position: relative; }
body.robot-bandeau .subnav { top: var(--haut-barre, 150px); }
.rc-veille { display: flex; align-items: center; gap: 10px; color: rgba(138, 160, 184, .75); font: 600 .78rem var(--hud-display, 'Orbitron', sans-serif);
  letter-spacing: .12em; text-transform: uppercase; padding-left: 4px; }
.rc-point { width: 8px; height: 8px; border-radius: 50%; background: #6fe06f; box-shadow: 0 0 8px #6fe06f; animation: rh-antenne 2s ease-in-out infinite; }
.robot-console.active .rc-veille { display: none; }

/* bulles holographiques : texte écrit lettre par lettre, boutons cliquables à droite */
.robot-bulle { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; max-width: 980px; padding: 10px 36px 10px 16px; color: #dff7ff;
  font: 600 1rem/1.35 var(--hud-font, 'Rajdhani', system-ui, sans-serif); letter-spacing: .01em;
  background: linear-gradient(180deg, rgba(10, 30, 52, .9), rgba(4, 12, 24, .92)), repeating-linear-gradient(0deg, rgba(191, 243, 255, .05) 0 1px, transparent 1px 3px);
  border: 1px solid #40c8ff; border-radius: 6px 16px 16px 6px; box-shadow: 0 0 22px rgba(64, 200, 255, .45), inset 0 0 18px rgba(64, 200, 255, .12);
  transform-origin: 0 50%; transform: scaleX(.05); opacity: 0; transition: transform .3s cubic-bezier(.2, 1.3, .4, 1), opacity .2s; }
.robot-bulle.ouverte { transform: none; opacity: 1; }
.robot-bulle::before { content: ''; position: absolute; left: -11px; top: 50%; translate: 0 -50%; border: 10px solid transparent; border-left: 0; border-right-color: #40c8ff; }
.robot-bulle.rb-ok { border-color: #6fe06f; box-shadow: 0 0 22px rgba(111, 224, 111, .4), inset 0 0 18px rgba(111, 224, 111, .1); }
.robot-bulle.rb-ok::before { border-right-color: #6fe06f; }
.robot-bulle.rb-warn { border-color: #fab219; box-shadow: 0 0 22px rgba(250, 178, 25, .4), inset 0 0 18px rgba(250, 178, 25, .1); }
.robot-bulle.rb-warn::before { border-right-color: #fab219; }
.robot-bulle.rb-err { border-color: #ff6b6b; box-shadow: 0 0 22px rgba(255, 107, 107, .45), inset 0 0 18px rgba(255, 107, 107, .12); }
.robot-bulle.rb-err::before { border-right-color: #ff6b6b; }
.robot-bulle .rb-texte { flex: 1; min-width: 0; min-height: 1.35em; max-height: 4.2em; overflow: auto; white-space: pre-line; }
.robot-bulle .rb-boutons { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; justify-content: flex-end; }
.robot-bulle .rb-bouton { display: inline-block; padding: 6px 14px; font: 700 .78rem var(--hud-display, 'Orbitron', sans-serif); letter-spacing: .08em; text-transform: uppercase;
  color: #e9fbff; text-decoration: none; cursor: pointer; background: rgba(64, 200, 255, .14); border: 1px solid rgba(64, 200, 255, .7);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); transition: background .15s, box-shadow .15s; }
.robot-bulle .rb-bouton:hover, .robot-bulle .rb-bouton:focus-visible { background: rgba(64, 200, 255, .35); box-shadow: 0 0 14px rgba(64, 200, 255, .8); outline: none; }
.robot-bulle .rb-x { position: absolute; top: 4px; right: 8px; background: none; border: 0; color: #8aa0b8; cursor: pointer; font-size: .9rem; padding: 2px 4px; }
.robot-bulle .rb-x:hover { color: #fff; }
/* petit écran : pas de grande barre ; la bulle s'affiche juste sous la barre, le temps du message */
body:not(.robot-bandeau) .robot-console.active { display: block; position: fixed; left: 8px; right: 8px; top: calc(var(--haut-barre, 50px) + 6px); z-index: 45; }
body:not(.robot-bandeau) .robot-bulle { flex-wrap: wrap; }

/* souris immobile : lasers ou neurones dessinés par-dessus la page (sans gêner les clics) */
.robot-effet { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 38; }

/* menu 🔊 : choix « souris immobile » */
.pc-choix { display: inline-flex; gap: 4px; margin-left: auto; }
.pc-choix button { min-height: 0; padding: 3px 8px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; color: #c3d4e6;
  background: rgba(64, 200, 255, .08); border: 1px solid rgba(64, 200, 255, .35); border-radius: 4px; }
.pc-choix button.on { color: #fff; background: rgba(64, 200, 255, .35); border-color: #40c8ff; box-shadow: 0 0 8px rgba(64, 200, 255, .6); }
@media print { .robot-holo, .robot-bulle, .robot-console, .robot-effet { display: none !important; } }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.topbar nav a, .userbox a { color: #e6e8e3; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.topbar nav a:hover, .topbar nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.topbar nav a.on { box-shadow: inset 0 -3px 0 var(--brand); }
.userbox { display: flex; gap: 4px; font-size: .9rem; }
.userbox a.on { background: rgba(255,255,255,.12); color: #fff; }

/* Modules : onglets du haut + menu du module */
:root { --mod-parlophone: #a4c229; --mod-colonnes: #2f80ed; }
.topbar nav.modules a { font-weight: 600; }
.topbar nav.modules a.mod-tab-parlophone.on { box-shadow: inset 0 -3px 0 var(--mod-parlophone); }
.topbar nav.modules a.mod-tab-colonnes.on { box-shadow: inset 0 -3px 0 var(--mod-colonnes); }
.subnav {
  display: flex; gap: 2px; flex-wrap: wrap; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 50px; z-index: 9;
}
.subnav a { padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--mod-parlophone); }
.mod-colonnes .subnav a.on { border-bottom-color: var(--mod-colonnes); }
.mod-colonnes .btn:not(.btn-ghost):not(.btn-danger):not(.btn-warn) { background: #1f5fbf; border-color: #1f5fbf; }
.mod-colonnes .tabs a.on { background: #1f5fbf; border-color: #1f5fbf; }
.mod-colonnes main a:not(.btn):not(.kpi) { color: #1f5fbf; }
.mod-colonnes main .tabs a.on { color: #fff; }
.mod-colonnes main .tabs a:not(.on) { color: var(--muted); }
.mod-colonnes .recherche input[type=search] { border-color: #1f5fbf; }

/* Accueil */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.module-card { border-top: 5px solid var(--mod-parlophone); }
.module-card.mod-colonnes { border-top-color: var(--mod-colonnes); }
.module-card h2 { margin: 0; }
.module-card h2 a { color: var(--ink); text-decoration: none; }
.module-card h3 { margin-top: 16px; }
.kpi-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.kpi { flex: 1 1 90px; background: #f7f8f5; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.kpi b { display: block; font-size: 1.5rem; line-height: 1.1; }
.kpi span { font-size: .82rem; color: var(--muted); }
a.kpi:hover { border-color: var(--mod-colonnes); }
.kpi-alerte b { color: var(--err); }
.kpi-avenir { background: #f3f6fd; border-style: dashed; }
.kpi-avenir b { font-size: 1rem; color: var(--info); }
.kpi .barre { margin-top: 6px; }
.mini-list { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.mini-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* Colonnes : avancement */
.barre { width: 140px; height: 8px; background: #e6e9ee; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.barre span { display: block; height: 100%; background: linear-gradient(90deg, #2f80ed, #10b981); }
.barre-lib { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.barre-lib .barre { width: 120px; height: 10px; }
.barre-txt { font-size: .85rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.barre-cpt .barre span { background: linear-gradient(90deg, #f59e0b, #10b981); }
a.lien-barre { text-decoration: none; }
.pastilles { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.pastilles i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: #d7dbe0; }
.pastilles i.p-termine { background: #10b981; }
.pastilles i.p-en_cours { background: #f59e0b; }
.pastilles i.p-sans_objet { background: transparent; border: 1.5px dashed #b6bcc4; }
.legende .pastilles { margin: 0 2px 0 8px; }
table.dossiers tr.clic { cursor: pointer; }
table.dossiers tr.clic:hover td { background: #f3f6fd; }
.dossier-cols { grid-template-columns: minmax(420px, 1.1fr) minmax(340px, 1fr); }
table.etapes { width: 100%; border-collapse: collapse; }
table.etapes th { text-align: left; font-weight: 600; padding: 7px 8px 7px 0; font-size: .93rem; white-space: nowrap; }
table.etapes tr { border-bottom: 1px solid #eef0f2; }
.segments { display: flex; gap: 0; }
.seg { flex-direction: row; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 6px 9px; font-size: .8rem; border: 1px solid var(--line); margin-left: -1px; background: #fff; color: var(--muted); white-space: nowrap; }
.seg:first-child span { border-radius: 6px 0 0 6px; }
.seg:last-child span { border-radius: 0 6px 6px 0; }
.seg input:focus-visible + span { outline: 2px solid var(--info); }
.seg-a_faire input:checked + span { background: #eef0f2; color: var(--ink); font-weight: 700; }
.seg-en_cours input:checked + span { background: #fef3c7; color: #92400e; border-color: #f59e0b; font-weight: 700; }
.seg-termine input:checked + span { background: #d1fae5; color: #065f46; border-color: #10b981; font-weight: 700; }
.seg-sans_objet input:checked + span { background: #f3f4f6; color: #6b7280; font-weight: 700; text-decoration: line-through; }
.jalons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.journal li { white-space: normal; }
.userbox .muted { color: #b9bcb5; }

/* règle générale : les pages et leurs tuiles prennent toute la largeur de l'écran du client (sauf tuiles posées côte à côte) */
main { max-width: none; margin: 0; padding: 16px clamp(12px, 1.6vw, 32px); }
main.wide { max-width: none; }

/* ---------- Composants ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 16px;
}
.card.narrow, .narrow { max-width: 520px; }
.card.link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.card.link:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cards .card { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpis { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: .92rem; }
.kpis b { color: var(--ink); }
.next { margin-top: 8px; font-size: .9rem; color: var(--brand-dark); }
.note { background: #fbfbe8; border-left: 4px solid var(--brand); padding: 8px 12px; margin: 8px 0; border-radius: 4px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 4px; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2, details > summary h3 { display: inline; }
details > summary::before { content: "▸ "; color: var(--muted); }
details[open] > summary::before { content: "▾ "; }
details[open] > summary { margin-bottom: 12px; }
details.more { margin-top: 10px; font-size: .92rem; }
details.more > summary { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .85rem; }

/* ---------- Formulaires ---------- */
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c9cdd2; border-radius: 8px; padding: 8px 10px; min-height: 40px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; }
textarea { resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 8px 0; }
.row > label { flex: 1 1 140px; }
.row.between { justify-content: space-between; }
.w-xs { width: 70px; flex: 0 0 auto !important; }
.w-sm { width: 110px; flex: 0 0 auto !important; }
.w-tel { min-width: 150px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0; }
fieldset.subtle { background: #fafbf8; }
legend { font-size: .9rem; font-weight: 600; padding: 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; border: 1px solid var(--brand-dark); background: var(--brand-dark); color: #fff;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none; min-height: 42px;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #c9cdd2; }
.btn-danger { background: #fff; color: var(--err); border-color: #e3a6a1; }
.btn-warn { background: #fff; color: var(--warn); border-color: #e8c98a; }
.btn-sm { padding: 5px 10px; min-height: 34px; font-size: .88rem; }
.btn-lg { padding: 14px 20px; font-size: 1.1rem; width: 100%; }
.icon { text-decoration: none; font-weight: 700; padding: 4px 8px; color: var(--muted); }

.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--err-bg); color: var(--err); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: #fff; font-size: .9rem; }
.tabs a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.b-libre { background: #eef0f2; color: var(--muted); }
.b-pris { background: var(--info-bg); color: var(--info); }
.b-fait { background: var(--ok-bg); color: var(--ok); }
.b-absent { background: var(--warn-bg); color: var(--warn); }
.b-annule { background: var(--err-bg); color: var(--err); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; }
.t-platine { background: #2f3133; color: #fff; }
.t-combines { background: var(--brand); color: #1f2a00; }
.t-attente { background: var(--warn-bg); color: var(--warn); }
.t-compteurs { background: #d1fae5; color: #065f46; }
.planning select.pick { min-width: 170px; margin-bottom: 3px; font-size: .82rem; color: var(--info); border-style: dashed; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
table.grid { border-collapse: collapse; width: 100%; font-size: .92rem; }
.grid th, .grid td { padding: 6px 8px; border-bottom: 1px solid #eceef0; text-align: left; vertical-align: middle; }
.grid th.r, .grid td.r { text-align: right; }
.grid thead th { background: #f7f8f5; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.grid tfoot th { background: #f7f8f5; }
.grid tr.dim td { opacity: .5; }
.grid input, .grid select { min-height: 34px; padding: 4px 6px; font-size: .9rem; }
.grid tr.sub td { border-top: 0; padding-top: 0; color: var(--muted); }
.card table.grid { border: 1px solid var(--line); }

.planning td { padding: 3px 4px; }
.planning input { min-width: 90px; }
.planning select { min-width: 170px; }
.planning select.st-select { min-width: 110px; }
.planning input.w-xs { min-width: 64px; }
.planning tr.st-fait td { background: #f1f8ef; }
.planning tr.st-absent td { background: #fff8e8; }
.planning tr.st-annule td { background: #fdf0ef; }
.planning tr.st-annule input, .planning tr.st-annule select { text-decoration: line-through; }
.planning tr.st-libre input { background: #fcfcfc; }
.planning tr.st-reporte td { color: var(--muted); }
.planning tr.st-attente td { background: #fffdf3; }
.planning select.rdv-select { min-width: 150px; font-weight: 600; }
.logements input[name$="[note]"] { min-width: 220px; }
.logements tfoot tr.ajout td { background: #f7f8f5; border-top: 2px dashed var(--line); }
.b-attente { background: var(--warn-bg); color: var(--warn); }
.b-reporte { background: #eef0f2; color: var(--muted); }
/* Gantt de la journée du technicien (planning.php) */
.gantt { margin: 10px 0 14px; }
.gantt-bilan { margin-bottom: 4px; }
.gantt-axe { position: relative; height: 16px; font-size: .72rem; color: var(--muted); margin: 0 12px; }
.gantt-axe span { position: absolute; transform: translateX(-50%); }
.gantt-piste { position: relative; background: #f6f7f4; border: 1px solid var(--line); border-radius: 6px; margin: 0 12px; overflow: hidden; }
.gantt-graduation { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #d6d9d0; }
.gantt-bloc { position: absolute; height: 30px; box-sizing: border-box; border-radius: 4px; padding: 2px 4px; font-size: .7rem; line-height: 26px;
  white-space: nowrap; overflow: hidden; color: #1f2a1f; text-decoration: none; border: 1px solid rgba(0,0,0,.12); }
.g-fait { background: #8fd18a; }
.g-pris { background: #fff; border-color: #6b8f3a; }
.g-retard { background: #ffd9d4; border-color: #d0574a; }
.g-config { background: #cfe0ff; border-style: dashed; }
.g-absent, .g-annule, .g-reporte { background: #f3d6a8; }
.g-libre { background: repeating-linear-gradient(45deg, #eceee8, #eceee8 4px, #f6f7f4 4px, #f6f7f4 8px); }
.gantt-maintenant { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #d0221a; z-index: 2; }
.gantt-maintenant::before { content: ''; position: absolute; top: -1px; left: -5px; border: 4px solid transparent; border-top-color: #d0221a; }
.gantt-legende { margin: 4px 12px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gantt-legende span { padding: 0 6px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); }

/* 2e créneau d'un combiné wifi (programmation) */
.b-config { background: #e6f0ff; color: #1d4f9a; }
.planning tr.st-config td { background: #f2f7ff; }
.rdv-line.st-config { border-left: 5px solid #6f9be0; background: #f5f9ff; }
.t-manuel { background: var(--info-bg); color: var(--info); margin-top: 2px; cursor: help; }
.page-tabs { margin: 8px 0 14px; }

label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
label.check input { width: 20px; flex: 0 0 auto; }

/* Relevé des poses signées (A4, ~10 lignes / page) */
.releve { font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 9.5pt; padding: 10mm 10mm 14mm; display: flex; flex-direction: column; }
.rl-head { display: flex; align-items: center; gap: 6mm; border-bottom: 2px solid #000; padding-bottom: 3mm; margin-bottom: 3mm; }
.rl-head img { width: 42mm; }
.rl-titre { flex: 1; }
.rl-titre h1 { font-size: 15pt; margin: 0 0 1mm; color: #00873c; }
.rl-page { font-size: 9pt; white-space: nowrap; }
.rl-table { width: 100%; border-collapse: collapse; }
.rl-table th { font-size: 8pt; text-transform: uppercase; background: #eef3dc; border: 1px solid #000; padding: 1.5mm; text-align: left; }
.rl-table td { border: 1px solid #000; padding: 1.2mm 1.5mm; vertical-align: middle; height: 21mm; }
.rl-table td.rl-sig { width: 62mm; text-align: center; padding: 0.5mm; }
.rl-sig img { max-width: 60mm; max-height: 17mm; display: block; margin: 0 auto; }
.rl-sig .small { font-size: 7pt; color: #444; }
.rl-total { margin-top: 4mm; border: 1.5px solid #000; padding: 2mm 3mm; align-self: flex-end; min-width: 90mm; }
.rl-total table { width: 100%; border-collapse: collapse; margin-top: 1mm; }
.rl-total td { padding: 0.8mm 1.5mm; }
.rl-total .rl-sum td { border-top: 1px solid #000; }
.rl-foot { margin-top: auto; padding-top: 3mm; font-size: 7.5pt; text-align: center; color: #555; }

/* Planning des phases (Gantt + calendrier) */
.planning-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
.cat-filtre { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: .88rem; color: var(--ink); cursor: pointer; }
.cat-filtre input { width: 16px; min-height: 16px; height: 16px; }
.cat-filtre i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.cat-filtre i.losange { background: #111; transform: rotate(45deg) scale(.75); }
.planning-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.planning-barre form.row { margin: 0; }
.planning-barre select { width: auto; min-height: 34px; padding: 4px 8px; }
.planning-barre .combo { min-width: 240px; }
.w-filtre { width: 200px !important; min-height: 34px; }
.txt-err { color: var(--err); }

.gantt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; position: relative; }
.g-row { display: flex; border-bottom: 1px solid #eef0f2; min-width: calc(230px + var(--jour) * var(--nbjours)); }
.g-row[hidden] { display: none; }
.g-label { flex: 0 0 230px; padding: 6px 10px; position: sticky; left: 0; background: #fff; z-index: 3; border-right: 1px solid var(--line); font-size: .88rem; line-height: 1.25; }
.g-label small { display: block; color: var(--muted); }
.g-track { position: relative; flex: 0 0 calc(var(--jour) * var(--nbjours)); min-height: 36px; cursor: copy;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--jour) - 1px), #f1f3f5 calc(var(--jour) - 1px), #f1f3f5 var(--jour)); }
.g-entete { position: sticky; top: 0; z-index: 5; background: #f7f8f5; }
.g-entete .g-label { background: #f7f8f5; font-weight: 700; display: flex; align-items: flex-end; }
.g-jours { height: 46px; cursor: default; background-image: none; }
.g-mois { position: absolute; top: 3px; font-size: .75rem; font-weight: 700; color: var(--ink); white-space: nowrap; padding-left: 4px; border-left: 2px solid #c9cdd2; }
.g-jour { position: absolute; bottom: 3px; width: var(--jour); text-align: center; font-size: .68rem; color: var(--muted); line-height: 1.1; }
.g-jour b { display: block; font-size: .78rem; color: var(--ink); }
.g-jour.we b { color: var(--muted); }
.g-jour.auj b { background: var(--err); color: #fff; border-radius: 4px; margin: 0 3px; }
.g-we { position: absolute; top: 0; bottom: 0; width: var(--jour); background: #f6f6f3; }
.g-auj { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--err); opacity: .5; z-index: 1; }
.g-bar { position: absolute; height: 22px; border-radius: 5px; background: var(--c); color: #fff; font-size: .74rem; font-weight: 600;
  padding: 0 8px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; cursor: grab; z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); text-decoration: none; touch-action: none; user-select: none; }
.g-bar span { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar.st-fait { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }
.g-bar.st-annule { opacity: .4; text-decoration: line-through; }
.g-bar.drag { cursor: grabbing; opacity: .85; outline: 2px solid #111; z-index: 4; }
.g-bar.ok { outline: 2px solid #10b981; }
.g-poignee { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: rgba(0,0,0,.15); }
.g-rdv { border-radius: 11px; justify-content: center; cursor: pointer; padding: 0; color: #fff !important; }
/* journée de RDV compteurs coupée en deux : matin (moitié claire, à gauche) | après-midi (moitié pleine, à droite) */
.g-rdv-demi { background: #fff; border: 2px solid var(--c); border-radius: 6px; padding: 0; gap: 0; align-items: stretch; box-shadow: none; }
.g-rdv-demi .demi, .leg-demi .demi { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; line-height: 1; }
.g-rdv-demi .demi-m, .leg-demi .demi-m { background: #fff; color: var(--c); }
.g-rdv-demi .demi-am, .leg-demi .demi-am { background: var(--c); color: #fff; }
.g-rdv-demi .lib { display: none; font-size: .62rem; font-weight: 700; margin-right: 2px; opacity: .85; }
.gantt-large .g-rdv-demi .lib { display: inline; }
.g-rdv-demi .demi.vide { background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.08) 0 3px, transparent 3px 6px); }
.g-rdv-demi .demi-am.vide { background-color: color-mix(in srgb, var(--c) 35%, #fff); }
.leg-demi { display: inline-flex; width: 44px; height: 18px; border: 2px solid var(--c); border-radius: 5px; overflow: hidden; margin-right: 5px; vertical-align: middle; }
.leg-demi .demi { font-size: .62rem; }
.cal-demis { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cal-demi { display: flex; justify-content: space-between; border: 1px solid var(--c); border-radius: 3px; padding: 0 5px; font-size: .7rem; white-space: nowrap; overflow: hidden; }
.phase-ligne .cal-demis { flex-direction: row; max-width: 280px; }
.phase-ligne .cal-demi { flex: 1 1 50%; }
.cal-demi.demi-m { background: #fff; color: var(--ink); }
.cal-demi.demi-am { background: var(--c); color: #fff; }
.cal-demi.vide { opacity: .35; }
.cal-rdv { white-space: normal; }
/* phases à la demi-journée */
.duree-rapide { gap: 6px; align-items: center; margin: 0; }
.duree-rapide .btn.on { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.duree-texte { margin: -4px 0 0; }
.date-demi { display: flex; gap: 6px; }
.date-demi input { flex: 1 1 auto; min-width: 0; }
.date-demi select { flex: 0 0 auto; width: auto; }
.tag-demi { display: inline-block; font-size: .62rem; font-weight: 800; text-transform: uppercase; background: rgba(255,255,255,.85); color: #333; border-radius: 3px; padding: 0 3px; margin-right: 4px; }
.g-jalon { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: #111; transform: rotate(45deg); z-index: 3; border: 2px solid #fff; cursor: help; }

.calendrier { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-tete { background: #f7f8f5; padding: 6px; font-size: .8rem; font-weight: 700; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-jour { min-width: 0; min-height: 118px; border-right: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; padding: 4px; cursor: copy; display: flex; flex-direction: column; gap: 2px; }
.cal-jour.we { background: #fafaf8; }
.cal-jour.hors { background: #f3f4f1; opacity: .6; }
.cal-jour.auj .cal-num { background: var(--err); color: #fff; border-radius: 4px; padding: 0 5px; }
.cal-num { font-size: .8rem; font-weight: 700; align-self: flex-start; }
.cal-evt { background: var(--c); color: #fff; border-radius: 4px; padding: 2px 6px; font-size: .72rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cal-evt.st-annule { opacity: .4; text-decoration: line-through; }
.cal-rdv { background: transparent; color: var(--ink) !important; border-left: 4px solid var(--c); }
.cal-jalon { font-size: .72rem; color: var(--ink) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.phases-liste { display: flex; flex-direction: column; gap: 5px; }
.phase-ligne { font-size: .88rem; padding: 6px 10px; white-space: normal; }
dialog.dialog { border: 0; border-radius: 12px; padding: 20px; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.dialog::backdrop { background: rgba(20,24,30,.45); }
dialog.dialog h2 { margin-top: 0; }
dialog .row.between { align-items: center; }

/* Recherche */
.recherche input[type=search] { max-width: 520px; flex: 1 1 280px; font-size: 1rem; border-color: var(--brand); }
.recherche-chantier { padding: 10px 14px; }
.recherche-chantier .table-wrap { margin: 8px 0 0; }
tr:target td { background: #fff3b8 !important; transition: background 1s; }
.combo { position: relative; min-width: 260px; }
.combo-input { width: 100%; min-height: 34px; padding: 4px 8px; font-size: .88rem; border: 1px dashed var(--info); color: var(--ink); }
.combo-list {
  position: absolute; z-index: 20; left: 0; top: 100%; min-width: 100%; width: max-content; max-width: 460px; max-height: 280px; overflow: auto;
  margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.combo-list li { padding: 7px 12px; cursor: pointer; font-size: .9rem; white-space: nowrap; }
.combo-list li:hover, .combo-list li.hl { background: #eef3dc; }
.combo-list li.on { font-weight: 700; }
.combo-list li.combo-clear { color: var(--muted); border-bottom: 1px solid var(--line); }
.combo-list li.combo-none { color: var(--muted); cursor: default; }
.histo { list-style: none; padding: 0; margin: 0; }
.histo li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sig-thumb { height: 30px; max-width: 90px; vertical-align: middle; }

/* ---------- Bâtiment / journées ---------- */
.journee { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.journee .table-wrap { border: 0; }
.jhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.jhead h2 { margin: 4px 0; }
.jlist { list-style: none; padding: 0; margin: 0 0 12px; }
.jlist li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Planning technicien ---------- */
.daynav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.daypick { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.daypick input, .daypick select { width: auto; flex: 1 1 150px; }
.dayname { margin-top: 12px; }
.day-card h2 { margin: 4px 0 2px; }
.rdv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rdv-line {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; background: #fff;
}
.rdv-line:active { background: #f2f5ea; }
.rdv-line, .journee { scroll-margin-top: 130px; }
.rdv-line .h { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 48px; }
.rdv-line .who { flex: 1; min-width: 0; }
.rdv-line .who small { display: block; color: var(--muted); }
.rdv-line.st-fait { border-left: 5px solid var(--ok); }
.rdv-line.st-pris { border-left: 5px solid var(--info); }
.rdv-line.st-absent { border-left: 5px solid var(--warn); }
.rdv-line.st-annule { border-left: 5px solid var(--err); opacity: .75; }
/* planning par technicien : bâtiment de chaque RDV, et RDV en chevauchement (même heure) */
.tag.t-site { background: #e8eef7; color: #24426e; text-transform: none; letter-spacing: 0; margin-right: 4px; }
.rdv-line.rdv-conflit { background: var(--err-bg); outline: 2px solid #e3a6a1; }
.card.card-aujourdhui, .journee.card-aujourdhui { outline: 2px solid var(--accent); }
/* planning du chantier : ligne du RDV ciblée depuis le tableau des résidents (« 📍 dans la journée ») */
.planning tr:target > td { background: #fff3b0 !important; box-shadow: inset 0 2px 0 #e0b800, inset 0 -2px 0 #e0b800; }
.planning tr:target { scroll-margin-top: 90px; }
.rdv-liens { margin-top: 2px; }
/* créneau libre mais technicien déjà occupé à cette heure dans une autre journée (autre bâtiment) */
.planning tr.st-indispo td { background: #f1f1ef; color: var(--muted); }
.planning tr.st-indispo input { opacity: .5; }
/* planning du chantier : doublon d'heure */
tr.rdv-conflit > td { background: var(--err-bg); }
/* chantier : estimation des jours à planifier */
.besoin { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.besoin-bloc { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 8px; }
.besoin-n { font-size: 1.6em; font-weight: 700; }
/* avancement de facturation : étapes sans objet (pas de plaque de propreté) */
table.etapes td { vertical-align: middle; }
table.etapes tr.etape-na td { opacity: .45; background: #f2f2f2; }
.tag.t-note { background: #fff4d6; color: #6b4e00; text-transform: none; letter-spacing: 0; }

/* ---------- Fiche d'intervention ---------- */
.fiche-head h1 { margin: 4px 0; }
.fiche-head .infos { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0; }
.fiche-head .tel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.poses { display: flex; flex-direction: column; gap: 8px; }
.pose { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.pose.on { border-color: var(--brand); background: #f6faea; }
.pose-label { font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper input { width: 56px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.step { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #c9cdd2; background: #fff; font-size: 1.4rem; cursor: pointer; }
.step:active { background: #eef3dc; }
.sigpad { position: relative; }
.sigpad canvas {
  width: 100%; height: 220px; display: block; touch-action: none;
  border: 2px dashed #b9bec4; border-radius: 10px; background: #fff;
}
.sigpad .sig-clear { position: absolute; top: 8px; right: 8px; }
.sig-full { max-width: 100%; max-height: 180px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- Plaque ---------- */
.plaque-svg { width: 100%; height: auto; display: block; }
.plaque-svg .pl-plate { fill: #fff; stroke: #000; stroke-width: 2.5; }
.plaque-svg .pl-cut { fill: #f3f5f7; stroke: #000; stroke-width: 2.5; }
.plaque-svg .pl-arrow { stroke: #1d3fd0; stroke-width: 2.5; }
.plaque-svg .pl-lbl rect { fill: #fff; stroke: #000; stroke-width: 1.5; }
.plaque-svg .pl-lbl text { font: 700 17px system-ui, Arial, sans-serif; fill: #000; }
.plaque-svg .pl-lbl.missing rect { stroke: #d33; stroke-dasharray: 4 3; }
.plaque-svg .pl-lbl.missing text { fill: #d33; }
.plaque-svg .pl-dec { font: 600 15px system-ui, Arial, sans-serif; fill: #555; }
.marges { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-areas: ". h ." "g c d" ". b ."; gap: 8px; align-items: center; }
.m-haut { grid-area: h; } .m-bas { grid-area: b; } .m-gauche { grid-area: g; } .m-droite { grid-area: d; }
.m-centre { grid-area: c; text-align: center; border: 2px solid var(--ink); border-radius: 4px; padding: 10px 4px; font-size: .85rem; }

/* ---------- Connexion ---------- */
.login { max-width: 400px; margin: 8vh auto 0; text-align: center; }
.login-logo { width: 240px; max-width: 80%; }
.login h1 { font-size: 1.2rem; color: var(--muted); font-weight: 500; }
.login form { text-align: left; }

/* ---------- Pages imprimables ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.print-page main { max-width: none; }
.sheet { background: #fff; margin: 0 auto 24px; box-shadow: 0 2px 12px rgba(0,0,0,.12); color: #000; }
.sheet.a4 { width: 210mm; min-height: 297mm; padding: 14mm 18mm; position: relative; }
.sheet.landscape { width: 297mm; padding: 10mm; }
.sheet-title { text-align: center; color: #c00000; font-size: 20pt; text-decoration: underline; margin: 0 0 2mm; font-weight: 500; }
.sheet-sub { text-align: center; margin-bottom: 4mm; }
table.paper { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.paper th, .paper td { border: 1px solid #000; padding: 3px 5px; }
.paper th { font-size: 9pt; font-weight: 600; }
.paper td.sig { width: 32mm; height: 12mm; padding: 1px; text-align: center; }
.paper td.sig img { max-height: 11mm; max-width: 31mm; }
.paper tr.st-annule td { color: #999; }

.affiche { font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 15pt; outline: none; }
.aff-head { text-align: center; font-size: 10.5pt; }
.aff-head img { width: 62mm; display: block; margin: 0 auto 2mm; }
.aff-title { text-align: center; color: #00b050; font-style: italic; text-decoration: underline; font-size: 28pt; margin: 6mm 0 0; }
.aff-alert { text-align: center; color: #e00000; text-decoration: underline; font-size: 26pt; font-weight: 700; margin: 5mm 0 2mm; }
.aff-alert-sub { text-align: center; color: #e00000; font-style: italic; font-weight: 700; text-decoration: underline; font-size: 12pt; }
.aff-body { margin-top: 10mm; }
.aff-body p { margin: 0 0 4mm; }
.aff-date { text-align: center; color: #00b050; font-weight: 700; text-decoration: underline; font-size: 17pt; margin: 8mm 0 !important; }
.aff-title-2 { font-size: 22pt; margin-top: 3mm; }
.aff-adresse { text-align: center; font-size: 11pt; margin: 1mm 0 0; }
.aff-platine { text-align: center; font-size: 11pt; font-style: italic; color: #444; margin: 3mm 0 0; }
.aff-dates { margin: 6mm 0; }
.aff-dates .aff-date { margin: 0 0 3mm !important; }
.aff-attention { border: 2px solid #e00000; border-radius: 3mm; padding: 2.5mm 4mm; font-weight: 700; color: #b00000; font-size: 13pt; }
/* version resserrée (nouvelle date, ou plus de 2 dates) pour tenir sur une page */
.affiche.compact { font-size: 13pt; }
.affiche.compact .aff-head img { width: 50mm; }
.affiche.compact .aff-title { font-size: 24pt; margin-top: 3mm; }
.affiche.compact .aff-title-2 { font-size: 19pt; margin-top: 1mm; }
.affiche.compact .aff-alert { font-size: 20pt; margin: 3mm 0 1mm; }
.affiche.compact .aff-body { margin-top: 5mm; }
.affiche.compact .aff-body p { margin-bottom: 3mm; }
.affiche.compact .aff-dates { margin: 3mm 0; }
.affiche.compact .aff-date { font-size: 15pt; }
.affiche.compact .aff-attention { font-size: 11.5pt; }
.aff-foot { position: absolute; bottom: 10mm; left: 0; right: 0; text-align: center; font-size: 9pt; }

.plaque-print { font-family: "Times New Roman", serif; font-size: 16pt; }
.pl-head { display: flex; gap: 8mm; align-items: center; margin-bottom: 6mm; font-size: 13pt; line-height: 1.2; }
.pl-head img { width: 62mm; }
.pl-box { border: 2px solid #000; padding: 1.5mm 3mm; margin-top: -2px; }
.pl-row { display: flex; gap: 6mm; margin-top: 4mm; }
.pl-box.small-box { font-size: 12pt; margin-top: 0; }
.plaque-print .plaque-svg { max-height: 175mm; margin-top: 4mm; }
.pl-notes { font-size: 11pt; border-top: 1px solid #000; padding-top: 2mm; }
.pl-row { flex-wrap: wrap; }
.plaque-svg .pl-lbl.total rect { stroke-width: 2.5; fill: #eef5d8; }
.plaque-svg .pl-dec-val { font-weight: 700; fill: #000; font-size: 17px; }
.final-box {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #eef5d8; border: 2px solid var(--brand); border-radius: var(--radius); padding: 12px 14px;
}
.final-box b { font-size: 1.4rem; }

/* ---------- Compte ENEDIS : filigrane « Données RGPD » uniquement sur les données masquées (noms, téléphones) ---------- */
.role-enedis .masque {
  display: inline-block; padding: 2px 6px 1px; margin: 1px 0;
  letter-spacing: .03em; line-height: 1.15; text-align: center; white-space: nowrap;
  background: #fdf1f0; border: 1px dashed #e3a6a1; border-radius: 4px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.role-enedis .masque::after {
  content: 'Données RGPD'; display: block;
  font-size: 7.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(179, 38, 30, .55);
}
fieldset.nu { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.nu:disabled .seg { cursor: default; }
fieldset.nu:disabled .seg:not(:has(input:checked)) { opacity: .45; }

/* ---------- Commandes ENEDIS, PPO : avertissements visibles partout ---------- */
.alertes-dossier:empty { display: none; }
.alertes-dossier { margin: 8px 0 12px; }
.alerte-secu { padding: 10px 14px; border-radius: 8px; margin: 0 0 6px; font-weight: 700; border: 2px solid; }
.alerte-err { background: var(--err-bg); color: var(--err); border-color: #e3a6a1; }
.alerte-warn { background: var(--warn-bg); color: var(--warn); border-color: #e8c98a; }
.alerte-secu.compact { padding: 6px 10px; font-size: .9rem; border-width: 1px; }
.ppo-lien { display: block; padding: 9px 14px; border-radius: 8px; margin: 0 0 6px; background: var(--info-bg); color: var(--info); font-weight: 700; text-decoration: none; border: 1px solid #b9c9f5; }
.ppo-lien.compact { padding: 6px 10px; font-size: .9rem; }
.ppo-lien small { font-weight: 400; }
.b-secu-err { background: var(--err-bg); color: var(--err); }
.b-secu-warn { background: var(--warn-bg); color: var(--warn); }
.etat-cmd { font-weight: 700; margin: 4px 0 8px; }
.etat-ok { color: var(--ok); }
.etat-warn { color: var(--warn); }
.etat-err { color: var(--err); }
form.inline { display: inline; }
ul.docs { list-style: none; padding: 0; margin: 0 0 10px; }
ul.docs li { padding: 6px 0; border-bottom: 1px solid #eef0f2; }
ul.docs li.doc-actuel { background: #f3f6fd; }
.t-doc-ppo { background: var(--err-bg); color: var(--err); }
.t-doc-commande { background: var(--info-bg); color: var(--info); }
.t-doc-autre { background: #eef0f2; color: var(--muted); }
/* Bande de couverture sous les phases du Gantt : vert = commande + PPO valides, rouge = pas de commande,
   jaune = pas de PPO, rouge + jaune = ni l'un ni l'autre */
.g-couv { position: absolute; bottom: 3px; height: 9px; z-index: 1; border-radius: 2px; }
.g-couv-ok { background: #22c55e; }
.g-hors-cmd { background: #dc2626; }
.g-hors-ppo { background: #eab308; }
.g-hors-deux { background: repeating-linear-gradient(45deg, #dc2626 0 5px, #eab308 5px 10px); }
.g-legende { position: static; display: inline-block; width: 30px; height: 14px; vertical-align: middle; margin: 0 4px 0 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 3px; }
.legende-couverture { margin-bottom: 2px; }
.g-bar.hors-cmd, .cal-evt.hors-cmd { outline: 3px solid var(--err); outline-offset: 1px; }
.g-alerte { display: inline-block; margin-left: 4px; font-size: .75rem; font-weight: 700; color: var(--err); background: var(--err-bg); border-radius: 999px; padding: 0 6px; cursor: help; }

/* ---------- Chiffrage ENEDIS et situations ---------- */
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash.small { padding: 6px 10px; margin: 0 0 6px; }
.w-auto { flex: 0 0 auto !important; }
.neg { color: var(--err); font-weight: 700; }
/* bandeau « ‹ Retour au pointage » : page ouverte depuis le point facturation (reste collé en haut) */
.fil-point { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; padding: 8px 12px; margin: 0 0 12px;
  background: #eef4ff; border: 1px solid var(--info); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.fil-point-x { margin-left: auto; text-decoration: none; color: var(--muted); font-size: 1rem; }
body.jarvis .fil-point { background: rgba(6, 12, 24, .97); border-color: #40c8ff; box-shadow: 0 0 16px rgba(64, 200, 255, .35); }
/* montant négatif repéré automatiquement (app.js) : rouge partout ; rouge vif sur les fonds sombres du Pointage affaire, rouge foncé sur les feuilles blanches */
.neg-auto { color: var(--err) !important; font-weight: 600; }
body.mod-casier .neg-auto { color: #ff6b6b !important; }
body.jarvis .neg-auto, body.mod-casier .neg-auto { text-shadow: 0 0 10px rgba(255, 90, 90, .35) !important; }
.sheet .neg-auto { color: #b3261e !important; }
.chif-params { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.chif-conf th { font-weight: 500; font-size: .9rem; }
.chif-conf select { min-width: 150px; }
.chif-grandeurs td { padding: 3px 8px; font-size: .88rem; }
.chif-niveaux { width: auto; }
.chif-niveaux th, .chif-niveaux td { padding: 2px 4px; text-align: center; }
.chif-niveaux thead th[data-bloc] { border-left: 2px solid var(--line); }
.chif-niveaux .n-in { width: 52px; min-height: 30px; padding: 2px 4px; text-align: center; }
.chif-niveaux td.distri { color: var(--info); font-weight: 600; min-width: 34px; background: #f6f8fd; }
.chif-table .qte-in, .sit-table .sq { width: 84px; text-align: right; }
.chif-table .qte-in::placeholder { color: var(--info); opacity: 1; font-weight: 600; }
.chif-table .qte-in.force { background: #fff6db; border-color: #e8c98a; font-weight: 700; }
.chif-table tr.cable td:nth-child(5) { color: var(--warn); font-weight: 600; }
.chif-titre td { background: #f3f4ef; font-size: .86rem; }
.tag-auto { background: var(--info-bg); color: var(--info); cursor: help; }
.sit-table tr.saisie td { background: #f5f9ec; }
.sit-table tr.saisie td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.savebar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
/* fiche dossier : notes & journal dans une barre repliée collée en bas de l'écran (ouverte : notes, ajout d'une entrée, journal) */
body:has(.journal-barre) main { padding-bottom: 64px; }
.journal-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.journal-barre > summary { display: flex; align-items: center; gap: 12px; padding: 9px 72px 9px 18px; cursor: pointer; font-weight: 700; list-style: none; }
.journal-barre > summary::-webkit-details-marker { display: none; }
.journal-barre > summary::before { content: none; }
.journal-barre > summary::after { content: '▲'; margin-left: auto; font-size: .75rem; color: var(--muted); }
.journal-barre[open] > summary::after { content: '▼'; }
.journal-barre .journal-dernier { font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 1; }
.journal-barre .journal-corps { max-height: 58vh; overflow: auto; padding: 4px 18px 16px; display: grid; gap: 10px; max-width: 1100px; margin: 0 auto; }
.journal-barre .note { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
/* fiche dossier : devis de génie civil bien visibles */
.gc-resume .gc-liste { display: grid; gap: 8px; margin-top: 10px; }
.gc-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.gc-ligne.gc-afaire { border-left: 4px solid var(--warn); }
.gc-ligne.gc-ok { border-left: 4px solid var(--ok, #2e7d32); }
.gc-ligne .gc-montant { font-weight: 700; }
.gc-ligne .gc-pct { min-width: 160px; flex: 0 1 220px; }
/* accueil : grosses tuiles d'accès (Tableau de bord, modules, Actions) */
.accueil-tete h1 { margin-bottom: 2px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 18px; }
.tuile { --t: #40c8ff; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 190px; padding: 20px 22px;
  border-radius: 18px; text-decoration: none; color: var(--ink, #1d2329); background: var(--card, #fff); border: 1px solid var(--line);
  border-top: 4px solid var(--t); box-shadow: 0 4px 18px rgba(0, 0, 0, .06); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.tuile:hover, .tuile:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0, 0, 0, .14), 0 0 0 1px var(--t); outline: none; }
.tuile::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--t); opacity: .08; }
.tuile-icone { font-size: 1.9rem; line-height: 1; }
.tuile-titre { font-size: 1.2rem; font-weight: 800; letter-spacing: .02em; }
.tuile-gros { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--t); margin-top: auto; }
.tuile-sous { font-size: .85rem; color: var(--muted); }
.tuile-desc { margin-top: auto; }
.tuile-dash { --t: #8b7cf6; }
.tuile-parlo { --t: #a4c229; }
.tuile-col { --t: #2f80ed; }
.tuile-pc { --t: #f0a020; }
.tuile-actions { --t: #2fbf71; }
.tuile-anniv { --t: #ec5fa4; }
.tuile-affichage { --t: #3fd0c9; }
.tuile-actions.a-faire { --t: #e5484d; }
.tuile-relance { position: absolute; top: 16px; right: 16px; padding: 3px 10px; border-radius: 12px; font-size: .8rem; font-weight: 800;
  color: #fff; background: #f08a24; box-shadow: 0 0 12px rgba(240, 138, 36, .6); }
body.jarvis .tuile { color: var(--hud-ink, #dce9f6); border-color: rgba(64, 200, 255, .25); border-top-color: var(--t); }
body.jarvis .tuile:hover, body.jarvis .tuile:focus-visible { box-shadow: 0 0 26px color-mix(in srgb, var(--t) 55%, transparent), 0 0 0 1px var(--t); }
/* tuiles de l'accueil en hologrammes flottants : lévitation décalée d'une tuile à l'autre, lignes de balayage, léger scintillement ;
   souris posée 0,5 seconde sur une tuile : elle se brouille comme du bruit numérique (tranches décalées, couleurs séparées, grain) */
body.jarvis .tuile { background: linear-gradient(160deg, rgba(20, 60, 96, .55), rgba(4, 16, 32, .62)); backdrop-filter: blur(2px);
  border: 1px solid color-mix(in srgb, var(--t) 55%, transparent); border-top: 3px solid var(--t);
  box-shadow: 0 0 22px color-mix(in srgb, var(--t) 35%, transparent), inset 0 0 26px color-mix(in srgb, var(--t) 14%, transparent);
  animation: tuile-flotte 5.5s ease-in-out infinite, tuile-scintille 7s steps(1) infinite; }
body.jarvis .tuile:nth-child(2n) { animation-delay: -1.4s, -2s; animation-duration: 6.2s, 7s; }
body.jarvis .tuile:nth-child(3n) { animation-delay: -2.9s, -4.5s; animation-duration: 5s, 7s; }
body.jarvis .tuile:nth-child(5n) { animation-delay: -3.7s, -1s; }
/* lignes de balayage de l'hologramme + reflet qui descend */
body.jarvis .tuile::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(191, 243, 255, .07) 0 1px, transparent 1px 3px),
              linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--t) 22%, transparent) 50%, transparent 100%) 0 -100% / 100% 40% no-repeat;
  animation: tuile-balaye 4.5s linear infinite; }
body.jarvis .tuile > *:not(.tuile-relance) { position: relative; z-index: 3; }
body.jarvis .tuile > * { z-index: 3; text-shadow: 0 0 8px color-mix(in srgb, var(--t) 60%, transparent); }
body.jarvis .tuile:hover, body.jarvis .tuile:focus-visible { animation-play-state: paused; transform: translateY(-6px) scale(1.02); }
/* souris immobile 0,5 s sur une tuile de l'accueil, un onglet de module ou un onglet dans un module : 0,5 s de brouillage numérique (hud.js : classe .brouille + bruitage) */
body.jarvis .tuile.brouille::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .95 0 0 0 0 1 0 0 0 1.6 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(191, 243, 255, .1) 0 1px, transparent 1px 3px);
  opacity: .6; animation: tuile-grain .12s steps(2) infinite; }
body.jarvis .tuile.brouille > * { animation: tuile-brouille .32s steps(1) infinite; }
body.jarvis .tuile.brouille .tuile-gros, body.jarvis .tuile.brouille .tuile-titre { animation: tuile-brouille .32s steps(1) infinite, tuile-rvb .2s steps(1) infinite; }
/* tout autre bouton ou lien-bouton (réglage « Partout » du menu 🔊) : image décalée par tranches, couleurs séparées, lueur — sans changer sa mise en page */
.brouille:not(.tuile) { animation: tuile-brouille .26s steps(1) infinite, tuile-rvb .18s steps(1) infinite, brouille-lueur .12s steps(2) infinite; }
@keyframes brouille-lueur { 50% { box-shadow: 0 0 0 1px rgba(191, 243, 255, .7), 0 0 14px rgba(64, 200, 255, .55); filter: brightness(1.35) contrast(1.2); } }
body.jarvis .topbar nav a.brouille, body.jarvis .subnav a.brouille { animation: tuile-brouille .26s steps(1) infinite, tuile-rvb .18s steps(1) infinite; position: relative; }
body.jarvis .topbar nav a.brouille::after, body.jarvis .subnav a.brouille::after { content: ''; position: absolute; inset: -2px; pointer-events: none; border-radius: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .95 0 0 0 0 1 0 0 0 1.6 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .55; mix-blend-mode: screen; animation: tuile-grain .1s steps(2) infinite; }
@keyframes tuile-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tuile-scintille { 0%, 100% { opacity: 1; } 43% { opacity: .82; } 44% { opacity: 1; } 78% { opacity: .9; } 79% { opacity: 1; } }
@keyframes tuile-balaye { to { background-position: 0 0, 0 260%; } }
@keyframes tuile-grain-on { to { opacity: .55; } }
@keyframes tuile-grain { 0% { background-position: 0 0, 0 0; } 50% { background-position: -37px 21px, 0 1px; } 100% { background-position: 53px -44px, 0 2px; } }
@keyframes tuile-brouille {
  0% { transform: translate(0, 0); clip-path: inset(0 0 0 0); filter: none; }
  15% { transform: translate(-4px, 1px); clip-path: inset(12% 0 58% 0); }
  30% { transform: translate(5px, -1px); clip-path: inset(48% 0 22% 0); filter: hue-rotate(70deg) saturate(2); }
  45% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); filter: none; }
  60% { transform: translate(3px, 2px); clip-path: inset(70% 0 4% 0); }
  75% { transform: translate(-5px, -2px); clip-path: inset(30% 0 40% 0); filter: hue-rotate(-60deg) brightness(1.6); }
  90% { transform: translate(1px, 0); clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes tuile-rvb { 0% { text-shadow: -3px 0 rgba(255, 40, 90, .8), 3px 0 rgba(40, 220, 255, .8); } 50% { text-shadow: 2px 1px rgba(255, 40, 90, .8), -2px -1px rgba(40, 255, 160, .8); } }
@media (prefers-reduced-motion: reduce) {
  body.jarvis .tuile, body.jarvis .tuile::before, body.jarvis .tuile:hover > *, body.jarvis .tuile:hover .tuile-gros, body.jarvis .tuile:hover .tuile-titre { animation: none; }
}
/* onglet Actions : filtres « personne » en gros boutons ronds */
.act-ronds { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 10px 0 16px; }
.act-rond { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 84px; text-decoration: none; color: inherit; text-align: center; }
.act-rond-cercle { position: relative; width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; border: 2px solid rgba(64, 200, 255, .45); background: rgba(64, 200, 255, .08); transition: transform .15s, box-shadow .15s; }
.act-rond:hover .act-rond-cercle { transform: scale(1.06); box-shadow: 0 0 16px rgba(64, 200, 255, .6); }
.act-rond.on .act-rond-cercle { border-color: #40c8ff; background: radial-gradient(circle at 35% 30%, rgba(120, 220, 255, .55), rgba(10, 40, 70, .95)); color: #fff;
  box-shadow: 0 0 20px rgba(64, 200, 255, .75); }
.act-rond-nom { font-size: .78rem; font-weight: 700; line-height: 1.15; }
.act-rond-nb { position: absolute; top: -4px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e5484d; color: #fff;
  font-size: .72rem; line-height: 22px; text-align: center; }
.act-rond-rel { position: absolute; bottom: -4px; right: -8px; font-size: .7rem; padding: 0 5px; border-radius: 9px; background: #f08a24; color: #fff; line-height: 18px; }
/* barre du haut : onglet général « Actions » et son nombre d'actions à faire */
.nb-actions { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #e5484d; color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
.btn-esabora { white-space: nowrap; }
@media print { .journal-barre, .btn-esabora { display: none !important; } }
/* RC : bouton « poste à 100 % » sur la ligne de titre d'un poste */
.chif-titre .poste-100 { float: right; margin: -3px 0; }
.b-sit-brouillon { background: var(--warn-bg); color: var(--warn); }
.b-sit-deposee { background: var(--info-bg); color: var(--info); }
.b-attente-fss { background: #efe3fb; color: #6b21a8; }
.b-sit-fss { background: #efe3fb; color: #6b21a8; }
.b-sit-facturee { background: var(--ok-bg); color: var(--ok); }
table.grid tr.sel td { background: #eef5d8; }
th.triable { cursor: pointer; user-select: none; }
th.triable:hover { color: var(--ink); }
th.triable::after { content: ' ↕'; opacity: .35; }
th.tri-asc::after { content: ' ▲'; opacity: 1; }
th.tri-desc::after { content: ' ▼'; opacity: 1; }
table.grid tr.ecart-indice td { background: var(--warn-bg); }
.prix-point { align-items: center; margin: 0 0 12px; }
.prix-point select { min-width: 340px; font-weight: 600; }
.onglets-param { margin: 0 0 14px; }
.onglets-phase { margin: 0 0 12px; }
/* planning : couleurs par technicien, légende, vue par technicien */
.coul-mode { margin-left: auto; font-size: .85rem; color: var(--muted); }
.coul-mode a { margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); background: #fff; }
.coul-mode a.on { background: #1f5fbf; color: #fff !important; border-color: #1f5fbf; }
.legende-techs, .filtre-techs { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px; font-size: .88rem; }
.filtre-techs.card { padding: 8px 12px; }
.leg-tech { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; cursor: default; margin: 0; font-weight: 500; }
.filtre-techs .leg-tech { cursor: pointer; }
.leg-tech i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.leg-tech input { width: 16px; min-height: 16px; height: 16px; }
.g-label-tech { border-left: 5px solid var(--c); }
.g-label-tech .barre-lib { margin-top: 3px; }
.g-label-tech .barre-pleine .barre span { background: var(--err); }
.pastille-tech { display: none; }
input.coul-tech { width: 42px; min-height: 30px; padding: 1px; }
.onglets-phase a { font-size: 1rem; font-weight: 600; padding: 7px 16px; }
.b-etude { background: #f1e8fb; color: #6b3fa0; }
.b-travaux { background: var(--info-bg); color: var(--info); }
.ppo-dates { margin: 2px 0 4px; gap: 6px; }
.ppo-dates input { min-height: 30px; padding: 2px 6px; font-size: .85rem; }
.barre-fact .barre span { background: var(--info); }

/* documents imprimables sur plusieurs pages (récapitulatif, situation) */
.sheet.doc { min-height: 0; }
.sheet.landscape.doc { padding: 8mm; }
.recap-head { width: 100%; border-collapse: collapse; margin-bottom: 3mm; font-size: 10pt; }
.recap-head th { text-align: left; width: 38mm; padding: 1mm 2mm; }
.recap-head td { padding: 1mm 2mm; }
.recap-logo { height: 14mm; }
.recap-table { font-size: 7.5pt; }
.recap-table th, .recap-table td { padding: 1px 3px; }
.recap-table thead th { background: #eef0ea; }
.recap-table tr.recap-titre td { background: #f3f4ef; }
.recap-table tr.recap-totaux td { background: #fffbe6; font-size: 8.5pt; }
.situation-doc { font-size: 10pt; }
.sd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; margin-bottom: 5mm; }
.sd-logo { width: 55mm; display: block; margin-bottom: 2mm; }
.sd-titre { text-align: right; }
.sd-titre h1 { margin: 0 0 1mm; font-size: 18pt; }
.sd-brouillon { display: inline-block; margin-top: 2mm; border: 1px solid #b3261e; color: #b3261e; padding: 0 3mm; font-weight: 700; }
.sd-infos { border-collapse: collapse; margin-bottom: 5mm; width: 100%; }
.sd-infos th { text-align: left; width: 30mm; padding: 1mm 2mm 1mm 0; font-weight: 600; }
.sd-infos td { padding: 1mm 0; }
.sd-table { font-size: 9.5pt; }
.sd-table thead th { background: #eef0ea; }
.sd-table tr.sd-sec td { background: #f3f4ef; font-weight: 600; font-size: 8.5pt; }
.sd-table tfoot th { font-size: 10.5pt; }
.sd-recap { margin: 5mm 0 0 auto; border-collapse: collapse; min-width: 95mm; }
.sd-recap th { text-align: left; font-weight: 500; padding: 1mm 4mm 1mm 0; }
.sd-recap td { text-align: right; padding: 1mm 0; white-space: nowrap; }
.sd-foot { margin-top: 8mm; text-align: center; font-size: 8pt; color: #555; }

@media (max-width: 900px) {
  .chif-params { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  main { padding: 12px; }
  h1 { font-size: 1.3rem; }
  .topbar { gap: 8px; padding: 6px 10px; }
  .brand span { display: none; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .card { padding: 12px; }
  .sheet.a4, .sheet.landscape { width: 100%; min-height: 0; padding: 12px; }
}

@media print {
  body { background: #fff; }
  .no-print, .topbar, .toolbar, .flash { display: none !important; }
  main { padding: 0; max-width: none; }
  .sheet { box-shadow: none; margin: 0; page-break-after: always; }
  .sheet:last-of-type { page-break-after: auto; }
  .sheet.a4 { width: auto; min-height: 0; height: 296mm; overflow: hidden; }
  .sheet.landscape { width: auto; padding: 0; }
  .sheet.a4.doc { height: auto; overflow: visible; padding: 0; }
  .doc thead { display: table-header-group; }
  .doc tr { page-break-inside: avoid; }
  .savebar { display: none; }
  .card, .table-wrap { border: 0; }
  a { color: inherit; text-decoration: none; }
}

/* Suivi e-plans d'un RC : création -> dépôt -> FSS -> facture */
.suivi-etapes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.suivi-etapes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 6px; }
.suivi-etapes li > b { min-width: 150px; }
.suivi-etapes li label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.suivi-etapes li input { width: auto; margin: 0; }
.suivi-etapes li input[type=file] { max-width: 260px; }
.suivi-etapes li.fait { border-left-color: var(--ok); }
.suivi-etapes li.attente { border-left-color: var(--warn); background: var(--warn-bg); }
.attente-j { font-weight: 600; white-space: nowrap; }
.attente-j.j30 { color: var(--warn); }
.attente-j.j60 { color: var(--err); }
.suivi-lot label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.suivi-lot input, .suivi-lot select { width: auto; margin: 0; }
.suivi-lot { align-items: center; position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 10px 0; }
.accueil-rc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
/* Revue de portefeuille (accueil) : seuil de jours sans FSS ; à l'impression, seule la revue est imprimée */
.seuil-fss { align-items: center; gap: 8px 12px; }
.seuil-fss label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.seuil-fss input[type=number] { width: 5em; margin: 0; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
a.chip { color: inherit; text-decoration: none; cursor: pointer; }
a.chip:hover { border-color: var(--accent); }
a.chip.on { color: #fff; }
.revue-fss { margin-top: 16px; }
.print-only { display: none; }
/* « Document généré par e-suivi-colonne / e-suivi-parlophone » en pied des documents */
.doc-genere { margin-top: 18px; padding-top: 4px; border-top: 1px solid #ddd; font-size: 10px; color: #777; text-align: right; }
footer .doc-genere { margin-top: 3px; padding-top: 0; border-top: 0; text-align: center; font-size: 9px; }
@media print {
  .print-only { display: block; }
  body:has(#revue-fss) main > *:not(#revue-fss) { display: none !important; }
}
/* Fiche dossier : navigation vers le dossier précédent / suivant de la liste */
.nav-dossiers { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -6px 0 6px; }
@media print { .nav-dossiers { display: none; } }

/* Marges (coûts Esabora) : rouge < -200 €, orange entre -200 et +200 €, vert au-delà */
.marge-neg { color: var(--err); font-weight: 600; }
.marge-eq { color: var(--warn); }
.marge-pos { color: var(--ok); }
#tbl-couts td:first-child { min-width: 190px; }
.creer-absent { flex-wrap: nowrap; gap: 6px; align-items: center; }
.creer-absent input, .creer-absent select { margin: 0; width: auto; }
.creer-absent input[name=nom] { min-width: 170px; }
.creer-absent input[name=num_enedis] { width: 165px; }
.absents summary h2 { font-size: 1.1rem; }
.absents td:nth-child(2) { min-width: 240px; }

/* Fiche dossier : RC hors chiffrage et devis génie civil (saisie en ligne) */
.annexes input, .annexes select { margin: 0; width: 100%; min-width: 70px; }
.annexes input[type=date] { min-width: 120px; }
.annexes .w-xs { min-width: 80px; }
.annexes tr.ligne-ajout td { background: var(--bg); }

/* Favoris de mise à jour (à glisser dans la barre de favoris) */
.btn.favori { background: var(--brand); color: #1d2a05; font-weight: 700; cursor: grab; }

/* Relances : champs à copier */
.champ-copie { align-items: flex-end; flex-wrap: nowrap; }
.champ-copie label { flex: 1; }
.mail-relance textarea { font-family: inherit; font-size: .9rem; }
/* Photos de la fiche compteur */
.photos-liste { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos-liste figure { position: relative; margin: 0; }
.photos-liste img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #ddd); display: block; }
.photo-suppr { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 50%; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.photo-ajout { display: inline-block; cursor: pointer; }
/* aperçu du mail groupé tel qu'il sera collé (liens e-plans cliquables) ; le texte brut reste dessous, réduit */
.mail-apercu { background: #fff; color: #222; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 10px 16px; max-height: 60vh; overflow: auto; }
.mail-relance .mail-texte { font-size: .75rem; color: var(--muted); }
/* Pointage affaire (module réservé) : onglet, carte d'accueil, droits dans Utilisateurs (le reste est dans casier.css) */
.topbar nav.modules a.mod-tab-casier.on { box-shadow: inset 0 -3px 0 #40c8ff; }
.module-card.mod-casier-card { border-top-color: #40c8ff; background: linear-gradient(180deg, #0a1220, #111c2e); color: #dce9f6; }
.module-card.mod-casier-card h2 a { color: #fff; letter-spacing: .08em; }
.module-card.mod-casier-card .muted { color: #8aa0b8; }
.module-card.mod-casier-card .kpi { background: rgba(64, 200, 255, .08); border-color: rgba(64, 200, 255, .3); color: #dce9f6; }
.module-card.mod-casier-card .kpi b { color: #fff; }
.badge-super { font-size: .75rem; font-weight: 700; color: #0a1220; background: #40c8ff; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
label.check.reserve { color: #1a6f99; font-weight: 600; }

/* fiche dossier colonnes en tuiles : cartes de chiffres (avancement technique et facturation, RDV compteurs) */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.carte { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f5;
  color: var(--ink); text-decoration: none; min-width: 0; }
a.carte:hover { border-color: #40c8ff; box-shadow: 0 0 12px rgba(64, 200, 255, .3); }
.carte b { font-size: 1.25rem; line-height: 1.15; }
.carte span { font-size: .8rem; color: var(--muted); }
.carte.carte-alerte { border-color: var(--warn); }
body.jarvis .carte { background: rgba(64, 200, 255, .06); border-color: rgba(64, 200, 255, .22); color: var(--hud-ink); }
body.jarvis .carte b { color: var(--hud-cyan); }
.alertes-lien { cursor: pointer; }
.chif-resume { padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* ---------- module Anniversaires ---------- */
.anniv-liste { display: grid; gap: 0; padding: 6px 0; }
.anniv-ligne { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 10px 16px; border-bottom: 1px dashed var(--line); }
.anniv-ligne.passe { opacity: .55; }
.anniv-ligne.jour-j { background: rgba(232, 121, 249, .12); box-shadow: inset 4px 0 0 #e879f9; opacity: 1; }
.anniv-date { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.anniv-date b { font-size: 1.6rem; }
.anniv-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.anniv-we { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .76rem; }
.anniv-modif { grid-column: 2 / 4; }
/* ligne « aujourd'hui » : elle se place entre ce qui est passé et ce qui vient, et descend au fil de l'année */
.anniv-aujourdhui { position: relative; height: 0; border-top: 2px solid #e879f9; margin: 8px 0; box-shadow: 0 0 10px rgba(232, 121, 249, .8); }
.anniv-aujourdhui span { position: absolute; left: 16px; top: -11px; padding: 1px 10px; border-radius: 10px; font-size: .74rem; font-weight: 700; color: #fff; background: #c026d3; }
/* accueil : carte flottante du prochain anniversaire */
.anniv-flottant { position: fixed; left: 22px; bottom: 22px; z-index: 34; display: flex; flex-direction: column; gap: 3px; max-width: 290px; padding: 12px 16px;
  border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid #e879f9; box-shadow: 0 0 22px rgba(232, 121, 249, .45);
  animation: tuile-flotte 6s ease-in-out infinite; }
.anniv-flottant:hover { box-shadow: 0 0 32px rgba(232, 121, 249, .85); }
.anniv-flottant .af-titre { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #e879f9; }
.anniv-flottant .af-noms { font-size: 1.2rem; }
.anniv-flottant .af-date, .anniv-flottant .af-croissants { font-size: .84rem; color: var(--muted); }
.anniv-flottant .af-we { font-size: .8rem; color: var(--warn); font-weight: 700; }
.anniv-flottant.chante .af-titre::after { content: ' ♪ ♫ ♪'; animation: tuile-scintille .6s steps(1) infinite; }
.anniv-flottant.jour-j { border-width: 2px; }
body.jarvis .anniv-flottant { background: linear-gradient(160deg, rgba(60, 20, 70, .85), rgba(10, 6, 24, .92)); color: var(--hud-ink); }
/* jour fêté : grand bandeau + feu d'artifice (canvas par-dessus la page, sans gêner les clics) */
.anniv-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.anniv-bandeau { position: fixed; left: 50%; top: 110px; transform: translateX(-50%); z-index: 61; display: flex; align-items: center; gap: 16px; padding: 14px 22px;
  border-radius: 20px; background: linear-gradient(120deg, #c026d3, #6d28d9 55%, #0ea5e9); color: #fff; box-shadow: 0 0 40px rgba(192, 38, 211, .7);
  animation: anniv-arrivee .8s cubic-bezier(.2, 1.4, .4, 1); cursor: pointer; max-width: calc(100vw - 32px); }
.anniv-bandeau .ab-gateau { font-size: 2.6rem; animation: tuile-flotte 1.2s ease-in-out infinite; }
.anniv-bandeau b { display: block; font-size: 1.4rem; }
.anniv-bandeau span { font-size: .9rem; opacity: .9; }
.anniv-bandeau button { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
@keyframes anniv-arrivee { from { transform: translate(-50%, -40px) scale(.6); opacity: 0; } }
@media (max-width: 700px) { .anniv-flottant { left: 10px; right: 10px; max-width: none; bottom: 70px; } .anniv-ligne { grid-template-columns: 52px 1fr; } .anniv-croissants { grid-column: 2; } }

/* barre du haut : onglets resserrés (Accueil, Tableau de bord, modules, Actions tiennent sur une ligne) */
body.robot-bandeau .topbar .userbox a { padding-inline: 4px; }
body.robot-bandeau .topbar .userbox { gap: 10px; }

/* page Paramètres : le menu 🔊 affiché dans la page */
.pc-audio-menu.pc-audio-inline { position: static !important; width: auto !important; max-width: 520px; box-shadow: none !important; }
.pc-audio-ligne.pc-sous { padding-left: 22px; }

.pc-piste-min input { width: 3.4em; }

/* menu 🔊 : lignes sans bouton ON/OFF (morceau, effet sur souris immobile, délai) : le libellé prend sa place */
body.jarvis .pc-audio-ligne.pc-piste, body.jarvis .pc-audio-ligne.pc-delai { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto; }
body.jarvis .pc-audio-ligne.pc-regard { grid-template-columns: auto auto; grid-template-rows: auto; justify-content: space-between; }
body.jarvis .pc-audio-ligne.pc-delai .pc-audio-vol { grid-column: 2 / 3; }
body.jarvis .pc-audio-ligne .pc-audio-nom { white-space: nowrap; }
.pc-piste-choix { margin-left: 0; max-width: none; width: 100%; font-size: .8rem; }
.pc-piste-min { font-size: .78rem; white-space: nowrap; }
body.jarvis .pc-audio-menu.pc-audio-inline { width: 100%; }

/* fiche RDV parlophone : combiné choisi (le tableau s'ouvre après l'alerte « validation du Bureau ») */
.combine-choisi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.combine-choisi.modifie { border-color: var(--warn); }

.note-chantier { padding: 10px 0; border-top: 1px dashed var(--line); display: grid; gap: 4px; }

.btn-chiffrage.desactive { opacity: .45; cursor: not-allowed; filter: grayscale(1); }

/* boîte « Planifier une phase » : jours déjà pris du technicien (6 semaines, du lundi au vendredi) */
.evt-occupation { display: grid; gap: 6px; }
.occ-grille { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.occ-jour { font: inherit; font-size: .8rem; padding: 4px 0; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: var(--ok-bg); color: var(--ink); font-variant-numeric: tabular-nums; }
.occ-jour.occ-pris { background: var(--err-bg, #fde2e2); cursor: not-allowed; }
.occ-jour.occ-demi { background: linear-gradient(135deg, var(--err-bg, #fde2e2) 50%, var(--ok-bg) 50%); }
.occ-jour.occ-choix { outline: 2px solid var(--brand); outline-offset: -2px; font-weight: 700; }
.occ-jour.occ-conflit { outline-color: var(--err, #c62828); animation: occ-clignote 1s steps(2) infinite; }
@keyframes occ-clignote { 50% { opacity: .55; } }
.occ-leg { display: inline-block; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line); }
.occ-leg.occ-libre { background: var(--ok-bg); } .occ-leg.occ-pris { background: var(--err-bg, #fde2e2); }
.occ-leg.occ-demi { background: linear-gradient(135deg, var(--err-bg, #fde2e2) 50%, var(--ok-bg) 50%); } .occ-leg.occ-choix { outline: 2px solid var(--brand); outline-offset: -2px; }
/* page Utilisateurs : champs assez larges pour lire nom et rôle, modules sur une ligne */
#tbl-users input[name="nom"] { min-width: 9em; }
#tbl-users select[name="role"] { min-width: 15em; }
#tbl-users td.nowrap label.check { display: inline-flex; margin: 2px 12px 2px 0; }
#tbl-users input[name="pass"] { min-width: 9em; }main.wide:has(#tbl-users) { max-width: none; }

/* Paramètres › phrases du robot : menu « Le savais-tu ? / Blague » assez large pour être lu */
select.phrase-type { min-width: 12em; }

/* tuile Colonnes montantes de l'accueil : second chiffre (études en cours), même taille que les travaux */
.tuile .tuile-gros2 { margin-top: 6px; }

/* page Mises à jour : une carte par source */
.maj-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.maj-grille .card { margin: 0; }

/* carte flottante de l'accueil : les deux prochains anniversaires, l'un sous l'autre */
.anniv-flottant .af-ligne { display: flex; flex-direction: column; gap: 1px; }
.anniv-flottant .af-ligne + .af-ligne { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(232, 121, 249, .35); }

/* tuile Anniversaire de l'accueil : les deux prochains anniversaires et leurs viennoiseries */
.tuile-anniv-ligne { display: flex; flex-direction: column; gap: 1px; font-size: .9rem; text-align: center; }
.tuile-anniv-ligne + .tuile-anniv-ligne { margin-top: 6px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--t) 35%, transparent); }
.tuile-anniv-ligne b { font-size: 1.2rem; }
.tuile-anniv-ligne .tal-croissants { opacity: .85; font-size: .82rem; }
.tuile-anniv.jour-j { box-shadow: 0 0 28px rgba(255, 210, 63, .6); }
/* tuile d'information (pas de lien) : Anniversaire pour les techniciens */
.tuile.tuile-info { cursor: default; }

/* menu « Son et effets » (🔊) : largeur selon son contenu, jamais plus large ni plus haut que l'écran (hud.js ajuste aussi à la place
   disponible au-dessus du bouton) ; les lignes à choix (Lasers / Neurones / Rien…) passent à la ligne plutôt que d'être coupées */
.pc-audio-menu:not(.pc-audio-inline) { width: max-content !important; min-width: min(300px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  max-height: calc(100vh - 90px); overflow-y: auto; overflow-x: hidden; box-sizing: border-box; }
body.jarvis .pc-audio-ligne .pc-audio-nom, .pc-audio-menu .pc-audio-nom { white-space: normal; }
body.jarvis .pc-audio-ligne.pc-regard, .mod-casier .pc-audio-ligne.pc-regard { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.pc-choix { flex-wrap: wrap; }
/* chiffrage d'un devis : boutons Esabora et Evernote avec leurs logos */
.btns-chiffrage { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.btn-chiffrage svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- onglets des modules (barre du haut) et sous-onglets : même style, plus grands, sur toutes les pages (Pointage affaire compris) ---------- */
html body .topbar nav.modules { gap: 6px; row-gap: 6px; }
html body .topbar nav.modules a { font-family: var(--hud-font, 'Rajdhani', system-ui, 'Segoe UI', sans-serif); font-size: 1.12rem; font-weight: 700; letter-spacing: .03em;
  line-height: 1.2; padding: 8px 14px; border-radius: 6px; white-space: nowrap; color: #c3d4e6; text-decoration: none;
  background: rgba(10, 18, 32, .55); border: 1px solid rgba(64, 200, 255, .18); transition: background .15s, border-color .15s, color .15s; }
html body .topbar nav.modules a:hover { background: rgba(64, 200, 255, .16); border-color: rgba(64, 200, 255, .5); color: #fff; }
html body .topbar nav.modules a.on { background: rgba(64, 200, 255, .2); border-color: rgba(64, 200, 255, .6); color: #fff; box-shadow: inset 0 -3px 0 var(--hud-cyan, #40c8ff); }
html body .topbar nav.modules a.mod-tab-parlophone.on { box-shadow: inset 0 -3px 0 #a4c229; }
html body .topbar nav.modules a.mod-tab-colonnes.on { box-shadow: inset 0 -3px 0 #7fb4ff; }
html body .topbar nav.modules a.mod-tab-casier.on { box-shadow: inset 0 -3px 0 #f0a020; }
html body .topbar nav.modules a .nb-actions { font-size: .8rem; }
html body .subnav a { font-family: var(--hud-display, 'Orbitron', system-ui, sans-serif); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; padding: 10px 14px; }
/* bulle « 🔢 N° déjà pris » (parlophone : planning du chantier, fiche RDV) : liste par bâtiment puis n° croissant */
.bulle-nprog { position: relative; display: inline-block; }
.bulle-nprog > summary { list-style: none; cursor: pointer; }
.bulle-nprog > summary::-webkit-details-marker { display: none; }
.bulle-nprog-pop { position: absolute; z-index: 60; left: 0; top: calc(100% + 6px); min-width: 260px; max-width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
body.jarvis .bulle-nprog-pop { background: rgba(4, 9, 18, .97); border-color: rgba(64, 200, 255, .5); }
.bulle-nprog-pop .bn-bat { font-weight: 700; margin: 6px 0 2px; color: var(--brand-dark); }
body.jarvis .bulle-nprog-pop .bn-bat { color: #a4c229; }
.bulle-nprog-pop ul { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 2px; }
.bulle-nprog-pop li { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; }
.bulle-nprog-pop li b { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.bulle-nprog-pop li span { color: var(--muted); }
.bulle-nprog-pop li em { font-style: normal; font-size: .8rem; }
.bulle-nprog-pop li.courant b { color: var(--brand-dark); }
.bulle-nprog-pop li.doublon b, .bulle-nprog-pop li.doublon em { color: var(--err); }
.nprog-alerte { display: block; flex-basis: 100%; color: var(--err); font-weight: 700; font-size: .9rem; }
.champ-doublon { border-color: var(--err) !important; box-shadow: 0 0 0 2px rgba(220, 60, 60, .25); }
.nprog-jour .bulle-nprog-pop { left: auto; right: 0; } /* planning du jour : bulle ouverte vers la gauche (bouton à droite) */

/* fiche RDV : « ⇄ Décaler le RDV » (bureau ; grisé pour le technicien) */
.decaler-rdv { display: inline-block; position: relative; margin-left: 8px; }
.decaler-rdv > summary { list-style: none; cursor: pointer; }
.decaler-rdv > summary::-webkit-details-marker { display: none; }
.decaler-pop { position: absolute; z-index: 60; left: 0; top: calc(100% + 6px); min-width: 300px; max-width: calc(100vw - 32px); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); color: var(--ink); }
body.jarvis .decaler-pop { background: rgba(4, 9, 18, .97); border-color: rgba(64, 200, 255, .5); }
.btn.desactive { opacity: .45; cursor: not-allowed; filter: grayscale(1); margin-left: 8px; }
/* Chantiers : carte entièrement cliquable (lien étiré) avec des boutons Esabora par-dessus */
.carte-couverte { position: relative; }
.carte-couverte h3 a.couvre { color: inherit; text-decoration: none; }
.carte-couverte a.couvre::after { content: ''; position: absolute; inset: 0; }
.carte-couverte .au-dessus { position: relative; z-index: 1; margin-top: .5rem; gap: .4rem; }
/* N° d'affaire Esabora : préfixe AF fixe devant les 6 chiffres */
.saisie-af { display: inline-flex; align-items: center; gap: .3rem; }
.saisie-af > b { font-family: ui-monospace, Consolas, monospace; }

/* Tableau des logements : Propriétaire et Occupant étroits (même largeur), retour à la ligne si le nom est long ; note en infobulle et en grand */
.logements td.col-nom, .logements td.col-occupant { width: 13%; min-width: 8rem; max-width: 16rem; }
.logements textarea.champ-lignes { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 0; resize: none; overflow: hidden; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.logements .note-case { display: flex; align-items: flex-start; gap: 4px; }
.logements textarea.champ-note { flex: 1; resize: none; overflow: hidden; white-space: pre; line-height: 1.3; font: inherit; }
.logements textarea.champ-note:focus { white-space: pre-wrap; height: auto; min-height: 5.5em; overflow: auto; position: relative; z-index: 2; }
.bulle-note { position: fixed; z-index: 1000; max-width: min(520px, calc(100vw - 16px)); max-height: 70vh; overflow: auto; padding: 10px 12px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.4; pointer-events: none;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
body.jarvis .bulle-note { background: rgba(4, 9, 18, .97); border-color: rgba(64, 200, 255, .5); }
.dlg-note { width: min(720px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.dlg-note::backdrop { background: rgba(0, 0, 0, .5); }
.dlg-note textarea { width: 100%; font: inherit; line-height: 1.4; }
body.jarvis .dlg-note { background: rgba(4, 9, 18, .97); border-color: rgba(64, 200, 255, .5); }

/* Tableau des logements resserré pour que la colonne Note tienne à l'écran */
.logements input[type=checkbox] { min-width: 0; }
.logements td:last-child, .logements th:last-child { width: 2.2rem; }
.logements select { min-width: 0; }
.logements select.rdv-select { max-width: 11rem; }
.logements input.w-sm { min-width: 0; width: 4.5rem; }
.logements input.w-tel { min-width: 0; width: 6rem; }
.logements input.w-xs { min-width: 0; width: 3.5rem; }
.logements td.nowrap { white-space: normal; }
.logements textarea.champ-note { min-width: 100px; }
.logements thead th { white-space: normal; }
.logements select:not(.rdv-select) { min-width: 7rem; }
@media (max-width: 1500px) { .logements select:not(.rdv-select) { max-width: 7rem; } } /* petit écran : choix resserré (libellé complet au survol de la liste) */
.logements .rdv-liens { white-space: normal; }.logements select.rdv-select { min-width: 8rem; }
/* Planning du chantier : le tableau des rendez-vous prend toute la largeur de l'écran */
main.wide:has(#tbl-logements) { max-width: none; }
/* Jours à planifier par entrée : boutons « Planifier » sur une ligne */
.jours-entree .btn { white-space: nowrap; margin-left: 6px; }
/* Jours à planifier : regroupement par entrée (en-tête d'entrée, puis une ligne Platine et une ligne Combinés) */
.jours-entree tr.entree-tete th { text-align: left; padding-top: 10px; border-top: 2px solid var(--line); font-size: .95rem; }
.jours-entree td.entree-travail { padding-left: 1.6rem; }
/* Module Enedis : onglets Colonnes | Branchements, grosses cases à cocher (saisie au téléphone), liens d'appel */
.onglets-famille { margin-bottom: 10px; }
.onglets-famille a { font-size: 1.05rem; font-weight: 700; }
.gros-check { font-size: 1rem; gap: 10px; }
.gros-check input[type=checkbox] { width: 22px; height: 22px; }
.gros-lien a { font-size: 1.05rem; font-weight: 600; }

/* Branchements : collecte des données — gros boutons Oui (vert) / Non (rouge), choix de typologie, lignes de questions */
.tuile-collecte summary h2 { display: inline; }
.collecte-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.collecte-ligne:last-of-type { border-bottom: 0; }
.collecte-q { flex: 0 0 15rem; max-width: 100%; font-weight: 600; }
.oui-non { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.oui-non label { position: relative; cursor: pointer; }
.oui-non input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oui-non label > span { display: inline-block; min-width: 4.5rem; padding: 10px 16px; border: 2px solid var(--line); border-radius: 10px; text-align: center; font-weight: 700; font-size: 1rem; }
.oui-non input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.oui-non .on-oui input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.oui-non .on-non input:checked + span { background: var(--err); border-color: var(--err); color: #fff; }
.oui-non .on-choix input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.oui-non input:disabled + span { opacity: .6; cursor: not-allowed; }
.on-pastille { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.on-pastille.on-oui { background: var(--ok); color: #fff; }
.on-pastille.on-non { background: var(--err); color: #fff; }
.on-pastille.on-vide { border: 1px dashed var(--line); }
.btn-gros { padding: 12px 22px; font-size: 1.05rem; }
@media (max-width: 640px) { .collecte-q { flex-basis: 100%; } .oui-non label > span { min-width: 5.5rem; padding: 14px 18px; } }

/* Branchements : planning du chargé d'étude (placement du RDV d'étude) */
.dlg-planning { width: min(980px, calc(100vw - 24px)); }
.planning-rdv td, .planning-rdv th { padding: 2px 4px; text-align: center; }
.planning-rdv td.pr-occupe { background: var(--line); color: var(--muted); font-size: .75rem; cursor: help; }
.planning-rdv .pr-libre { width: 100%; padding: 4px 2px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; font-size: .8rem; cursor: pointer; }
.planning-rdv .pr-libre:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.planning-rdv .pr-actuel { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* Branchements : les bannettes (bacs à dossiers) et la mamie à canne */
.mamie { width: 1.6em; height: 1.6em; vertical-align: -0.35em; }
.mamie-grande { width: 2.4em; height: 2.4em; vertical-align: -0.6em; }
.titre-bannettes { display: flex; align-items: center; gap: .4rem; }
.bannettes { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); margin: 12px 0 18px; }
.bannette { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: inherit; text-decoration: none; text-align: center; transition: transform .12s, border-color .12s; }
.bannette:hover { transform: translateY(-2px); border-color: var(--brand); }
.bannette.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.bannette.vide { opacity: .55; }
.bannette-bac { display: flex; align-items: flex-end; justify-content: center; width: 5.2rem; height: 2.6rem; padding-bottom: 4px;
  border: 3px solid var(--brand); border-top: 0; border-radius: 0 0 10px 10px; background: linear-gradient(to top, rgba(127, 127, 127, .18), transparent); }
.bannette-bac b { font-size: 1.5rem; line-height: 1; }
.bannette-lib { font-weight: 700; font-size: .92rem; }
.bannette-groupe { grid-column: span 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; }
.bannette-groupe-titre { grid-column: 1 / -1; font-weight: 700; font-size: .9rem; }
.bannette.sous { padding: 8px 6px; }
.bannette.sous .bannette-bac { width: 4.2rem; height: 2.1rem; }
@media (max-width: 640px) { .bannette-groupe { grid-column: 1 / -1; } }

/* Branchements : le robot déplace le dossier d'une bannette à l'autre (après confirmation) */
.robot-scene { position: fixed; inset: 0; z-index: 2000; background: rgba(4, 9, 18, .72); opacity: 0; transition: opacity .2s; pointer-events: none; }
.robot-scene.on { opacity: 1; }
.robot-scene.fin { opacity: 0; }
.robot-bras { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.robot-bras .rb-bras { fill: none; stroke: #8fd3ff; stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(64, 200, 255, .7)); }
.robot-bras .rb-coude { fill: #40c8ff; stroke: #e8f7ff; stroke-width: 2; }
.robot-tete { position: absolute; left: 50%; top: 6vh; width: 92px; height: 70px; margin-left: -46px; border-radius: 22px; background: linear-gradient(#dfe8f1, #9fb2c4);
  box-shadow: 0 0 22px rgba(64, 200, 255, .6); display: flex; align-items: center; justify-content: center; gap: 18px; }
.robot-tete::before { content: ''; position: absolute; top: -18px; left: 50%; width: 4px; height: 16px; margin-left: -2px; background: #9fb2c4; }
.robot-tete::after { content: ''; position: absolute; top: -26px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #40c8ff; box-shadow: 0 0 10px #40c8ff; animation: rb-clignote .6s infinite alternate; }
.robot-tete i { width: 16px; height: 16px; border-radius: 50%; background: #0b1622; box-shadow: inset 0 0 0 4px #40c8ff; }
.robot-tete .robot-nom { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font: 700 11px/1 ui-monospace, Consolas, monospace; color: #0b1622; letter-spacing: .5px; }
.robot-tete b { position: absolute; bottom: 12px; left: 50%; width: 30px; height: 6px; margin-left: -15px; border-radius: 0 0 8px 8px; background: #0b1622; }
.robot-bac { position: absolute; top: 58vh; width: min(34vw, 260px); height: 92px; display: flex; align-items: flex-end; justify-content: center; padding: 0 8px 8px;
  border: 4px solid #40c8ff; border-top: 0; border-radius: 0 0 16px 16px; background: linear-gradient(to top, rgba(64, 200, 255, .22), transparent); color: #e8f7ff; text-align: center; }
.robot-bac.rb-de { left: 10vw; }
.robot-bac.rb-vers { right: 10vw; border-color: #a4c229; background: linear-gradient(to top, rgba(164, 194, 41, .22), transparent); }
.robot-bac.recu { animation: rb-recu .45s ease-out; }
.robot-bac .rb-lib { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.robot-pince { position: absolute; width: 0; height: 0; }
.robot-pince i { position: absolute; top: -6px; width: 6px; height: 26px; border-radius: 3px; background: #8fd3ff; transform-origin: top center; transition: transform .12s; }
.robot-pince i:first-child { left: -10px; transform: rotate(-8deg); }
.robot-pince i:last-child { left: 4px; transform: rotate(8deg); }
.robot-pince.ouverte i:first-child { transform: rotate(-30deg); }
.robot-pince.ouverte i:last-child { transform: rotate(30deg); }
.robot-dossier { position: absolute; font-size: 42px; line-height: 1; transform: translate(-50%, -30%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
@keyframes rb-clignote { to { opacity: .35; } }
@keyframes rb-recu { 50% { transform: scale(1.07); box-shadow: 0 0 26px #a4c229; } }
@media (max-width: 640px) { .robot-bac { width: 40vw; } .robot-bac.rb-de { left: 4vw; } .robot-bac.rb-vers { right: 4vw; } }

/* Menu 🔊 : case « délai » en secondes à côté de chaque effet sur souris immobile */
.pc-audio-menu label.pc-delai-s { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0 0 0 8px; font-size: .8rem; white-space: nowrap; }
.pc-audio-menu label.pc-delai-s input { width: 3.6rem; min-width: 0; padding: 2px 4px; text-align: right; }

/* Page du chantier (parlophone) : fil d'étapes, « À faire maintenant », une tuile repliée par étape */
.fil-etapes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; counter-reset: etape; }
.fil-etapes a { flex: 1 1 9rem; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; }
.fil-etapes a span { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--line); font-size: .85rem; flex: none; }
.fil-etapes a.fait span { background: var(--ok); border-color: var(--ok); color: #fff; }
.fil-etapes a.fait { opacity: .8; }
.fil-etapes a.courante { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.fil-etapes a.courante span { border-color: var(--brand); }
.a-faire { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--brand); border-radius: 12px; background: rgba(164, 194, 41, .08); }
.a-faire-lib { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--brand); }
.a-faire-txt { flex: 1 1 18rem; font-weight: 600; }
details.etape > summary h2 { display: inline; font-size: 1.15rem; }
.etape-n { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; margin-right: 4px; border-radius: 50%; border: 2px solid var(--brand); font-size: .95rem; vertical-align: middle; }
details.etape-faite .etape-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.etape-corps { margin-top: 10px; }
.etape-corps details.pc-bloc { border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
.etape-corps details.pc-bloc > summary { display: none; }
.etape-corps details.pc-bloc::before, .etape-corps details.pc-bloc::after { display: none; }
details.sous-bloc { margin: 10px 0; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 10px; }
details.sous-bloc > summary h3 { display: inline; font-size: 1rem; }
.menu-docs { position: relative; display: inline-block; }
.menu-docs > summary { list-style: none; }
.menu-docs > summary::-webkit-details-marker { display: none; }
.menu-docs-liste { position: absolute; right: 0; z-index: 40; min-width: 14rem; margin-top: 4px; padding: 6px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.menu-docs-liste a { padding: 7px 10px; border-radius: 6px; color: inherit; text-decoration: none; }
.menu-docs-liste a:hover { background: rgba(127, 127, 127, .15); }
body.jarvis .menu-docs-liste { background: rgba(4, 9, 18, .97); border-color: rgba(64, 200, 255, .5); }
.info { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid currentColor; font-size: .72rem; font-weight: 700; cursor: help; opacity: .7; }
.etape-corps form.card.row { border-style: dashed; }
.etape-corps form.card.row select, .etape-corps form.card.row input[type=date] { max-width: 16rem; }

/* Ancres : on s'arrête sous la barre du haut et les menus collants (le titre de la tuile reste visible) */
main [id] { scroll-margin-top: calc(var(--haut-barre, 60px) + 56px); }
/* Prise de RDV épurée : grosses tuiles des chantiers, puis le tableau des RDV seul */
.tuiles-rdv { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 14px; margin-top: 14px; }
.tuile-rdv { display: flex; flex-direction: column; gap: 6px; min-height: 8.5rem; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  color: inherit; text-decoration: none; transition: transform .12s, border-color .12s, box-shadow .12s; }
.tuile-rdv:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tuile-rdv-nom { font-size: 1.45rem; font-weight: 800; line-height: 1.15; }
.tuile-rdv-adr { font-size: .9rem; opacity: .75; }
.tuile-rdv-chiffres { margin-top: auto; font-size: .95rem; }
.tuile-rdv-chiffres b { font-size: 1.2rem; color: var(--brand); }
.prise-rdv-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.prise-rdv-tete h1 { margin: 0; }
body.prise-rdv details.pc-bloc { border: 0; padding: 0; background: none; box-shadow: none; }
body.prise-rdv details.pc-bloc > summary { display: none; }
body.prise-rdv .recherche input[type=search] { font-size: 1.15rem; padding: 10px 14px; max-width: 34rem; }
body.prise-rdv #logements .jhead > div > .muted.small { display: none; }

/* Tableau de bord Parlophone : gros bouton « Prise de RDV » */
.gros-bouton-rdv { display: flex; align-items: center; gap: 18px; max-width: 34rem; margin: 10px 0 18px; padding: 18px 24px; border: 2px solid var(--brand); border-radius: 18px;
  background: linear-gradient(135deg, rgba(164, 194, 41, .22), rgba(64, 200, 255, .1)); color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.gros-bouton-rdv:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(164, 194, 41, .3); }
.gros-bouton-rdv .gbr-icone { font-size: 3rem; line-height: 1; animation: gbr-sonne 2.6s ease-in-out infinite; }
.gros-bouton-rdv b { display: block; font-size: 1.6rem; }
.gros-bouton-rdv small { display: block; opacity: .8; margin-top: 2px; }
@keyframes gbr-sonne { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(14deg); } 92% { transform: rotate(-10deg); } 96% { transform: rotate(8deg); } }

/* Planning du chantier : une tuile par journée (résumé sur une ligne, détail au clic) ; recherche « tous les chantiers » de la prise de RDV */
details.jour-tuile { margin: 8px 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
details.jour-tuile > summary.jour-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; cursor: pointer; }
details.jour-tuile[open] > summary.jour-resume { border-bottom: 1px solid var(--line); }
details.jour-tuile > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.jour-tuile .jour-resume-txt { font-size: .88rem; opacity: .85; }
details.jour-tuile .jhead h2 { display: none; }
details.jour-tuile.jour-passe { opacity: .7; }
.recherche-rdv input[type=search] { font-size: 1.15rem; padding: 12px 16px; max-width: 40rem; flex: 1 1 22rem; }
#res-tous { margin-bottom: 14px; }

/* Bannettes de Mamie : sa devise */
.devise-mamie { margin: 2px 0 0 3.2em; font-style: italic; font-size: 1.05rem; opacity: .85; }

/* Page du chantier : 6 grosses tuiles illustrées, une par étape (chaque tuile ouvre sa sous-page) */
.tuiles-etapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 14px; margin: 6px 0 12px; }
.tuile-etape { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 10.5rem; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: inherit; text-decoration: none; overflow: hidden; transition: transform .12s, border-color .12s, box-shadow .12s; }
.tuile-etape:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.tuile-etape-icone { font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.tuile-etape-n { position: absolute; top: 14px; right: 16px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.tuile-etape-titre { margin-top: 8px; font-size: 1.35rem; font-weight: 800; }
.tuile-etape-res { font-size: .88rem; opacity: .8; }
.tuile-etape.faite { border-color: var(--ok); }
.tuile-etape.faite .tuile-etape-n { color: var(--ok); opacity: 1; }
.tuile-etape.courante { border: 2px solid var(--brand); box-shadow: 0 0 0 3px rgba(164, 194, 41, .18); }
.tuile-etape.courante .tuile-etape-n { color: var(--brand); opacity: 1; }
.tuile-etape::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(64, 200, 255, .18), transparent 70%); }
.lien-reglages { margin: 0 0 14px; }
/* sous-page d'une étape */
.fil-etapes a.vue { background: var(--brand); border-color: var(--brand); color: #0b1622; }
.fil-etapes a.fil-retour { flex: 0 0 auto; font-weight: 700; }
.etape-page > h2 { margin-top: 0; }
.etape-icone { font-size: 1.6rem; margin-right: 4px; vertical-align: -2px; }

/* Mamie relance les chargés de projet (bannette « En attente de FSS ») */
.gros-bouton-mamie { font-size: 1.05rem; padding: 10px 18px; }
.gros-bouton-mamie .mamie { width: 2em; height: 2em; vertical-align: -0.55em; }

/* sous-page d'une étape du chantier : retour aux tuiles, en haut à droite */
.etape-page { position: relative; }

/* barre de progression de l'avancement du chantier (tuile et sous-page) */
.barre-avancement { position: relative; display: block; height: 14px; margin-top: 8px; border-radius: 999px; background: rgba(127, 127, 127, .22); overflow: hidden; }
.barre-avancement i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--ok)); transition: width .4s; }
.barre-avancement b { position: relative; display: block; text-align: center; font-size: .72rem; line-height: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.barre-avancement.grande { height: 26px; margin: 4px 0 14px; }
.barre-avancement.grande b { font-size: .9rem; line-height: 26px; }
.barre-avancement.mini { display: inline-block; vertical-align: middle; width: 4.5em; height: 13px; margin: 0 0 0 8px; }
.barre-avancement.mini b { font-size: .65rem; line-height: 13px; }
.fil-etapes a.vue .barre-avancement { background: rgba(11, 22, 34, .25); }
.fil-etapes a.vue .barre-avancement i { background: #0b1622; }

/* boutons de retour : en haut à gauche, un peu plus gros */
.btn-retour { font-size: 1rem; padding: 10px 18px; font-weight: 700; }
.etape-page > .retour-tuiles { float: none; display: inline-flex; margin: 0 0 12px; }
/* boutons de retour colorés (cyan, distincts des boutons d'action verts) */
.btn.btn-retour { background: rgba(64, 200, 255, .16); border: 1px solid rgba(64, 200, 255, .75); color: #7fdcff; box-shadow: 0 0 10px rgba(64, 200, 255, .25); }
.btn.btn-retour:hover { background: rgba(64, 200, 255, .3); color: #fff; box-shadow: 0 0 16px rgba(64, 200, 255, .45); }
@media print { .btn.btn-retour { display: none; } }
/* bandeau des étapes du chantier : reste visible en haut quand on fait défiler la sous-page */
.fil-etapes { position: sticky; top: calc(var(--haut-barre, 50px) + var(--haut-subnav, 44px)); z-index: 8; padding: 6px 0; background: var(--bg); box-shadow: 0 6px 10px -8px rgba(0, 0, 0, .5); }
main .etape-page [id] { scroll-margin-top: calc(var(--haut-barre, 60px) + var(--haut-subnav, 44px) + 70px); }
/* tableau de bord parlophone : grosses tuiles côte à côte (Prise de RDV, Planning) */
.gros-boutons { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 14px; }
.gros-boutons .gros-bouton-rdv { flex: 1 1 20rem; margin: 0; }

/* tableau de bord parlophone : statistiques discrètes, tuile « Tous les chantiers » */
.stats-discretes { opacity: .55; font-size: .9em; transition: opacity .2s; }
.stats-discretes:hover { opacity: 1; }
.stats-discretes .kpi b { font-size: 1.2rem; }
.tuile-archives { border-style: dashed; }
.tuile-archives .tuile-rdv-nom { font-size: 1.15em; }
.icone-archives { font-size: 2.6em; line-height: 1; vertical-align: -0.3em; margin-right: 6px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .4)); }

/* tambour des statistiques (tableau de bord parlophone) : prisme à 3 faces qui tourne sur l'axe horizontal */
.tambour { --h: 92px; height: var(--h); margin-top: 12px; cursor: pointer; }
.tambour-rouleau { position: relative; height: 100%; transform-style: preserve-3d; }
.tambour-face { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 10px; backface-visibility: hidden;
  transform: rotateX(calc(var(--i) * -120deg)) translateZ(calc(var(--h) / 3.464)); }
.tambour-face .kpi { flex: 1 1 0; margin: 0; }
.tambour-periode { flex: 0 0 8.5rem; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; font-size: .85rem; border-radius: 10px; color: #7fdcff; border: 1px solid rgba(64, 200, 255, .6); background: rgba(64, 200, 255, .12); }
@media (prefers-reduced-motion: reduce) { .tambour-rouleau { transition: none; } }
@media (max-width: 700px) { .tambour { --h: 170px; } .tambour-face { flex-wrap: wrap; } .tambour-periode { flex-basis: 100%; } }
/* tambour : prisme triangulaire en rotation lente et continue (une face lisible toutes les ~3 s), pause au survol */
.tambour { perspective: 700px; }
.tambour-rouleau { transition: none; }
.tambour:hover .tambour-rouleau { animation-play-state: paused; }
.tambour-face { background: var(--card, #0b1622); border: 1px solid rgba(64, 200, 255, .35); border-radius: 12px; padding: 6px; box-sizing: border-box; }
@keyframes tambour-tourne { from { transform: rotateX(0deg); } to { transform: rotateX(360deg); } }
@media (prefers-reduced-motion: reduce) { .tambour-rouleau { animation-duration: 30s; } }
/* tambour : chaque face reste lisible 2 s, puis passe à la suivante en 3 s (cycle de 15 s) */
.tambour-rouleau { animation: tambour-pas 15s infinite; }
@keyframes tambour-pas {
  0%, 13.33% { transform: rotateX(0deg); animation-timing-function: ease-in-out; }
  33.33%, 46.67% { transform: rotateX(120deg); animation-timing-function: ease-in-out; }
  66.67%, 80% { transform: rotateX(240deg); animation-timing-function: ease-in-out; }
  100% { transform: rotateX(360deg); }
}
/* bouton de retour flottant (en haut à gauche quand on a fait défiler) */
.btn.btn-retour.btn-retour-flottant { position: fixed; left: 16px; z-index: 40; background: rgba(6, 18, 30, .92); backdrop-filter: blur(4px); box-shadow: 0 4px 16px rgba(0, 0, 0, .5), 0 0 12px rgba(64, 200, 255, .35); }
@media print { .btn-retour-flottant { display: none !important; } }
/* fenêtre de confirmation / d'alerte intégrée (canbConfirme, canbAlerte) */
.canb-dialogue { width: min(480px, 92vw); }
.canb-dialogue-msg { white-space: pre-line; font-size: 1.02rem; line-height: 1.45; margin: 0 0 16px; }
.canb-dialogue-btns { justify-content: flex-end; gap: 10px; }

/* signature : bouton « Effacer » bien visible sur le fond blanc du cadre */
.sigpad .btn.sig-clear { background: #c62828 !important; color: #fff !important; border: 2px solid #fff !important; font-weight: 800; font-size: .95rem;
  padding: 8px 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); z-index: 2; }
.sigpad .btn.sig-clear:hover { background: #e53935 !important; }
/* bannettes : mamie qui parle, bulle qui sort de sa bouche */
.mamie-parle { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 6px; }
.mamie-xl { width: 5.5em; height: 5.5em; flex: 0 0 auto; }
.bulle-mamie { position: relative; margin: 1.15em 0 0 14px; padding: 12px 18px; border-radius: 18px; background: #fff8e7; color: #4a3520;
  font-family: "Comic Sans MS", "Comic Neue", "Segoe Print", cursive; font-size: 1.15rem; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); border: 2px solid #8e6bb8; }
.bulle-mamie::before { content: ''; position: absolute; left: -16px; top: 14px; border: 9px solid transparent; border-right: 16px solid #8e6bb8; border-left: 0; }
.bulle-mamie::after { content: ''; position: absolute; left: -11px; top: 16px; border: 7px solid transparent; border-right: 12px solid #fff8e7; border-left: 0; }.mamie-parle .mamie-xl { width: 7em; height: 7em; }
.mamie-parle .bulle-mamie { margin-top: 1.7em; margin-left: 4px; }

/* Branchements : changement de bannette — CanBot pousse Mamie, qui déplace le dossier */
.rb-sol { position: absolute; left: 4vw; right: 4vw; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(64, 200, 255, .6), transparent); }
.mamie-acteur { position: absolute; width: 110px; height: 110px; transform: translate(-50%, -100%); }
.mamie-acteur svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.mamie-dit { position: absolute; bottom: 100%; left: 55%; margin-bottom: 6px; padding: 6px 12px; border-radius: 14px; white-space: nowrap; background: #fff8e7; color: #4a3520;
  border: 2px solid #8e6bb8; font: 700 .95rem "Comic Sans MS", "Comic Neue", "Segoe Print", cursive; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; }
.mamie-dit.on { opacity: 1; transform: none; }
.mamie-dit::after { content: ''; position: absolute; top: 100%; left: 14px; border: 7px solid transparent; border-top-color: #8e6bb8; }
.robot-pousseur { position: absolute; width: 74px; height: 118px; transform: translate(-50%, -100%); }
.rp-tete { position: absolute; top: 0; left: 6px; width: 62px; height: 46px; border-radius: 16px; background: linear-gradient(#dfe8f1, #9fb2c4); box-shadow: 0 0 16px rgba(64, 200, 255, .6);
  display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 8px; }
.rp-tete span { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font: 700 9px/1 ui-monospace, Consolas, monospace; color: #0b1622; }
.rp-tete i { width: 11px; height: 11px; border-radius: 50%; background: #0b1622; box-shadow: inset 0 0 0 3px #40c8ff; }
.rp-tete::after { content: ''; position: absolute; top: -12px; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: #40c8ff; box-shadow: 0 0 8px #40c8ff; animation: rb-clignote .6s infinite alternate; }
.rp-corps { position: absolute; top: 50px; left: 12px; width: 50px; height: 44px; border-radius: 10px; background: linear-gradient(#b8c8d8, #6f8499); border: 2px solid #40c8ff; }
.rp-bras { position: absolute; top: 62px; left: 52px; width: 0; height: 7px; border-radius: 4px; background: #8fd3ff; box-shadow: 0 0 8px rgba(64, 200, 255, .7); transition: width .35s; }
.robot-pousseur.pousse .rp-bras { width: 46px; }
.rp-roue { position: absolute; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(#0b1622 35%, #40c8ff 38%, #40c8ff 52%, #1d2a38 55%); }
.rp-roue:first-of-type { left: 8px; } .rp-roue:last-of-type { right: 8px; }
.robot-pousseur.roule .rp-roue { animation: rp-tourne .5s linear infinite; }
@keyframes rp-tourne { to { transform: rotate(360deg); } }
.robot-scene .robot-dossier { z-index: 2; }
/* bannettes rangées par catégorie (sans titre) : un bloc teinté par groupe */
.bannettes { display: flex; flex-direction: column; gap: 10px; }
.bannette-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 12px; padding: 10px; border-radius: 14px; border-left: 4px solid var(--cat, #40c8ff);
  background: color-mix(in srgb, var(--cat, #40c8ff) 7%, transparent); }
.bannette-cat:nth-child(1) { --cat: #ff7a59; }   /* ce jour / retard */
.bannette-cat:nth-child(2) { --cat: #40c8ff; }   /* étude-audit */
.bannette-cat:nth-child(3) { --cat: #a4c229; }   /* travaux */
.bannette-cat:nth-child(4) { --cat: #f5b83d; }   /* attentes */
.bannette-cat:nth-child(5) { --cat: #8e6bb8; }   /* fin de dossier */
/* bulle de Mamie : les phrases défilent */
.bulle-mamie { transition: opacity .35s; }
.bulle-mamie.change { opacity: 0; }
/* bouton vert « Valider » (quantités des forfaits / attachements) */
.btn.btn-vert { background: #2e9e4f !important; border-color: #2e9e4f !important; color: #fff !important; }
.btn.btn-vert:hover { background: #38b85d !important; }
/* planning des RDV de branchement : jours passés grisés (restent cliquables) */
.planning-rdv .pr-passe { opacity: .45; }
.planning-rdv .pr-passe:hover { opacity: .85; }

/* titre du dossier branchement : bannette(s) où il est rangé */
.tag-bannette { display: inline-block; margin-left: 8px; padding: 3px 12px; border-radius: 999px; font-size: .5em; font-weight: 700; vertical-align: middle; text-decoration: none;
  color: #4a3520; background: #fff8e7; border: 2px solid #8e6bb8; }
.tag-bannette:hover { background: #8e6bb8; color: #fff; }

/* bannettes : poids financier (bureau) */
.bannette-poids { font-weight: 700; color: #a4c229; font-variant-numeric: tabular-nums; }

/* poids financier : déjà réglé (FSS reçues) en vert, reste à percevoir en rouge */
.poids-regle, .poids-percevoir { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poids-regle { color: #4cd07d; }
.poids-percevoir { color: #ff5c6c; }
.poids-regle + .poids-percevoir::before { content: ' · '; color: var(--muted, #8aa0b4); font-weight: 400; }
.bannette-poids { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; font-size: .78rem; }
.poids-cellule .poids-percevoir, .poids-cellule .poids-regle { display: block; }
.poids-cellule .poids-regle + .poids-percevoir::before { content: none; }
.poids-titre { margin-left: 10px; font-size: .5em; vertical-align: middle; }

/* bannettes : « Mamie, crée un dossier » à côté de sa bulle */
.mamie-parle { flex-wrap: wrap; }
.btn-creer-mamie { align-self: center; margin-left: 18px; margin-top: 1.2em; }

/* dans une bannette : les dossiers en tuiles */
.dossier-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 14px; margin-top: 10px; }
.dossier-tuile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s; }
.dossier-tuile:hover, .dossier-tuile:focus { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); outline: none; }
.dt-haut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-af { font-variant-numeric: tabular-nums; }
.dt-nom { font-size: 1.15rem; font-weight: 800; text-decoration: none; color: inherit; }
.dt-info { padding: 6px 8px; border-radius: 8px; background: rgba(64, 200, 255, .07); }
.dt-autres .tag { margin: 2px 2px 0 0; }

/* fiche branchement : le placard de Mamie (étagères = catégories, bacs = bannettes ; le dossier est dans les bacs allumés) */
.placard-scene { display: flex; flex-wrap: wrap; }
.placard-mamie { display: flex; align-items: flex-start; flex: 0 1 22rem; min-width: 0; }
.mamie-placard { flex: 0 0 auto; }
.placard-mamie .bulle-mamie { margin-top: .6em; font-size: 1rem; }
.placard { flex: 1 1 30rem; min-width: 0; position: relative; padding: 0 12px 0; border: 6px solid #3a2614; border-bottom: 0; border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, #5a3d22, #6e4b2a 50%, #5a3d22); box-shadow: 0 10px 24px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .05); }
.placard-fronton { margin: 0 -12px 8px; padding: 6px 10px; text-align: center; font: 700 .85rem "Comic Sans MS", "Comic Neue", "Segoe Print", cursive; color: #f6e2c2;
  background: #3a2614; letter-spacing: .04em; }
.placard-etagere { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 6px 10px; margin-bottom: 8px; border-bottom: 7px solid #3a2614; background: rgba(0, 0, 0, .22); border-radius: 4px 4px 0 0; }
.placard-bac { flex: 1 1 8rem; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 2.4rem; padding: 4px 8px; border-radius: 6px 6px 3px 3px;
  background: #2a1c10; border: 1px solid rgba(255, 255, 255, .08); color: #b9a284; font-size: .8rem; text-align: center; text-decoration: none; line-height: 1.15; }
.placard-bac:hover { color: #f6e2c2; border-color: #c9a07a; }
.placard-bac.ici { background: #fff8e7; color: #4a3520; border: 2px solid #8e6bb8; font-weight: 800; box-shadow: 0 0 14px rgba(255, 220, 140, .75); }
.placard-dossier { font-size: 1.3rem; animation: placard-dossier 1.6s ease-in-out infinite; }
@keyframes placard-dossier { 50% { transform: translateY(-3px) rotate(-6deg); } }
.placard-pieds { display: flex; justify-content: space-between; margin: 0 -12px; height: 10px; }
.placard-pieds i { width: 18px; height: 10px; background: #3a2614; border-radius: 0 0 4px 4px; margin: 0 6px; }
@media (prefers-reduced-motion: reduce) { .placard-dossier { animation: none; } }
.placard-mamie { flex-basis: 26rem; }
.placard-mamie .bulle-mamie { flex: 1 1 auto; }

/* placard compact (fiche branchement) : une étagère, seulement les bannettes du dossier */
.placard-scene { align-items: center; gap: 8px; margin: 2px 0 12px; }
.mamie-placard { width: 3.2em; height: 3.2em; }
.placard-scene .bulle-mamie { margin: 0 6px 0 4px; padding: 6px 12px; font-size: .9rem; }
.placard-scene .placard { flex: 0 1 auto; padding: 6px 8px 0; border-width: 4px; border-radius: 8px 8px 0 0; }
.placard-scene .placard-etagere { margin: 0; padding: 6px; border-bottom-width: 6px; }
.placard-scene .placard-bac { flex: 0 0 auto; min-height: 0; padding: 5px 12px; font-size: .85rem; }
.placard-scene .placard-bac.ici { box-shadow: 0 0 8px rgba(255, 220, 140, .6); }

/* Placard des bannettes : meuble en bois, une étagère par catégorie, étiquettes manuscrites */
.placard-meuble { position: relative; gap: 0; border: 8px solid #3a2614; border-bottom: 0; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, #4f351d, #6a4828 18%, #6e4b2a 50%, #6a4828 82%, #4f351d); box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 40px rgba(0, 0, 0, .35); }
.meuble-fronton { text-align: center; background: linear-gradient(#4a321c, #3a2614); color: #f6e2c2; letter-spacing: .05em; font: 700 1.15rem "Segoe Print", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive; border-bottom: 3px solid #2a1c10; }
.placard-meuble .bannette-cat { position: relative; border: 0; border-radius: 4px 4px 0 0; background: rgba(0, 0, 0, .28); box-shadow: inset 0 8px 14px rgba(0, 0, 0, .35); border-bottom: 10px solid #3a2614; }
.placard-meuble .bannette-cat::after { content: ''; position: absolute; left: -6px; right: -6px; bottom: -10px; height: 3px; background: #8a6440; opacity: .55; } /* reflet du bord de l'étagère */
.etiquette-cat { position: absolute; left: 14px; padding: 3px 14px 4px; background: #fff8e7; color: #3b2a18; border: 1px solid #d6c3a0; border-radius: 3px; font: 700 1.05rem "Segoe Print", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive; transform: rotate(-2deg); box-shadow: 0 3px 6px rgba(0, 0, 0, .4); z-index: 1; }
.etiquette-cat::before { content: ''; position: absolute; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #c0392b; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); } /* punaise */
.placard-meuble .bannette { background: linear-gradient(#2e2012, #241809); border-color: rgba(255, 255, 255, .08); }
.placard-meuble .bannette:hover { border-color: #c9a07a; }
.placard-meuble .bannette-lib { color: #f0dcc0; }
.meuble-pieds { display: flex; justify-content: space-between; }
.meuble-pieds i { margin: 0 10px; background: #3a2614; border-radius: 0 0 6px 6px; }
.etiquette-cat { padding-left: 24px; }
.etiquette-cat::before { left: 9px; top: 50%; margin: -4px 0 0; }

/* placard compact : largeur des tuiles seulement, moins haut */
.placard-meuble { width: max-content; max-width: 100%; padding: 0 10px; margin-top: 10px; border-width: 6px; }
.meuble-fronton { margin: 0 -10px 8px; padding: 4px 8px; font-size: 1rem; }
.placard-meuble .bannette-cat { display: flex; flex-wrap: wrap; margin-bottom: 10px; border-bottom-width: 7px; }
.placard-meuble .bannette { flex: 0 0 auto; }

.placard-meuble .bannette-lib { line-height: 1.15; text-align: center; }

.etiquette-cat { top: -8px; padding-top: 1px; padding-bottom: 2px; }
.meuble-pieds { margin: 0 -10px; height: 10px; }
.meuble-pieds i { height: 10px; width: 20px; }
/* Mamie à côté du placard (bouton fixe en haut, bulle dessous, Mamie en grand) ; placard un peu plus grand */
.placard-et-mamie { display: flex; gap: 18px; flex-wrap: wrap; }
.mamie-colonne { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mamie-colonne .btn-creer-mamie { margin: 0; width: 100%; justify-content: center; }
.mamie-colonne .bulle-mamie.bulle-haut { width: 100%; min-height: 4.6em; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0; box-sizing: border-box; }
.bulle-mamie.bulle-haut::before { top: auto; bottom: -16px; left: 50%; margin-left: -9px; border: 9px solid transparent; border-top: 16px solid #8e6bb8; border-bottom: 0; }
.bulle-mamie.bulle-haut::after { top: auto; bottom: -11px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top: 12px solid #fff8e7; border-bottom: 0; }
.mamie-geante { width: 11rem; height: 11rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.placard-et-mamie .placard-meuble { margin-top: 0; }
.placard-meuble .bannette { width: 11rem; padding: 8px 8px; gap: 4px; }
.placard-meuble .bannette-bac { width: 4.4rem; height: 2.2rem; }
.placard-meuble .bannette-bac b { font-size: 1.35rem; }
.placard-meuble .bannette-lib { font-size: .88rem; }
.placard-meuble .bannette-poids { font-size: .75rem; }
.placard-meuble .bannette-cat { gap: 10px; padding: 26px 10px 10px; }
.etiquette-cat { font-size: 1rem; }
@media (max-width: 760px) { .mamie-colonne { flex-basis: 100%; } .mamie-geante { width: 7rem; height: 7rem; } }

/* placard : étagère fermée à clé (technicien) — deux portes en bois, un cadenas, Mamie qui prévient */
.etagere-fermee { min-height: 6.5rem; }
.portes-fermees { position: relative; display: flex; align-items: stretch; width: 100%; min-height: 4.6rem; }
.portes-fermees .porte { flex: 1; background: repeating-linear-gradient(90deg, #6e4b2a 0 22px, #64431f 22px 24px); border: 3px solid #3a2614; border-radius: 4px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .45); }
.portes-fermees .porte:first-child { border-right-width: 1px; }
.portes-fermees .porte:last-of-type { border-left-width: 1px; }
.portes-fermees .cadenas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 1.6rem; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); z-index: 1; }
.mamie-cle { position: absolute; right: 10px; bottom: 4px; display: flex; align-items: flex-end; gap: 2px; z-index: 1; }
.mamie-mini { width: 2.6em; height: 2.6em; }
.bulle-cle { margin-bottom: 1.6em; padding: 3px 10px; border-radius: 12px; background: #fff8e7; color: #4a3520; border: 2px solid #8e6bb8;
  font: 700 .85rem "Segoe Print", "Comic Sans MS", "Comic Neue", cursive; white-space: nowrap; }

/* dans une bannette : les dossiers rangés dans le placard, en chemises cartonnées */
.meuble-bannette { width: auto; margin-top: 12px; }
.meuble-bannette .bannette-cat { display: block; }
.meuble-bannette .dossier-tuiles { margin-top: 0; }
.meuble-bannette .dossier-tuile { position: relative; margin-top: 10px; border: 0; border-radius: 0 10px 10px 10px; color: #3b2a18;
  background: linear-gradient(#ecd6a8, #ddc38e); box-shadow: 0 6px 12px rgba(0, 0, 0, .45); }
.meuble-bannette .dossier-tuile::before { content: ''; position: absolute; top: -10px; left: 0; width: 42%; height: 12px; border-radius: 8px 8px 0 0; background: #ecd6a8; } /* onglet de la chemise */
.meuble-bannette .dossier-tuile:hover, .meuble-bannette .dossier-tuile:focus { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 12px 22px rgba(0, 0, 0, .55); }
.meuble-bannette .dossier-tuile .muted, .meuble-bannette .dt-af { color: #6b5232; }
.meuble-bannette .dt-nom { color: #2a1c10; }
.meuble-bannette .dt-info { background: rgba(255, 255, 255, .45); color: #3b2a18; }
.meuble-bannette .dt-info b { color: #2a1c10; }
.meuble-bannette .dt-poids { background: #2a1c10; border-radius: 6px; padding: 3px 8px; align-self: flex-start; }
.meuble-bannette .dt-autres .tag { background: #fff8e7; color: #4a3520; border: 1px solid #c9a07a; }
.etagere-vide { margin: 4px 0; color: #e6d2b4; font: 700 1rem "Segoe Print", "Comic Sans MS", "Comic Neue", cursive; }
.meuble-bannette .dossier-tuile .badge { background: #8e6bb8; color: #fff; border-color: #6d4f94; }

/* dans une bannette : un grand bac à courrier, les dossiers empilés à plat vus de la tranche (chemise kraft + feuilles) */
.grande-bannette { position: relative; margin: 14px auto 6px; max-width: 1100px; padding: 0 22px; }
.gb-etiquette { display: inline-block; margin: 0 0 -2px 18px; padding: 4px 16px; background: #fff8e7; color: #3b2a18; border: 1px solid #d6c3a0; border-bottom: 0; border-radius: 6px 6px 0 0;
  font: 700 1rem "Segoe Print", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive; }
.gb-pile { display: flex; gap: 3px; min-height: 5rem; padding: 18px 26px 10px; border: 5px solid #40c8ff; border-top: 0; border-radius: 0 0 18px 18px; background: linear-gradient(to top, rgba(64, 200, 255, .2), rgba(64, 200, 255, .04)); box-shadow: inset 0 -10px 22px rgba(0, 0, 0, .45), 0 0 18px rgba(64, 200, 255, .25); }
.gb-rebord { height: 14px; margin: -8px 6px 0; border-radius: 0 0 14px 14px; background: linear-gradient(#2a8fbf, #1b5f80); box-shadow: 0 8px 16px rgba(0, 0, 0, .5); } /* lèvre avant du bac */
.dossier-tranche { position: relative; display: flex; flex-direction: column; cursor: pointer; transform: translateX(var(--decal, 0)) rotate(var(--penche, 0deg));
  transition: transform .15s, filter .15s; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.dossier-tranche:hover, .dossier-tranche:focus { transform: translateX(calc(var(--decal, 0px) + 16px)) rotate(0deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); outline: none; z-index: 2; }
.dt-couverture { height: 6px; border-radius: 3px 8px 3px 3px; background: linear-gradient(#e9cf9b, #d2b47a); }
.dt-couverture.dt-dessous { border-radius: 3px 3px 8px 3px; background: linear-gradient(#cfae72, #b8965b); }
 /* tranche des feuilles */
.dt-etiquette { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow: hidden; padding: 2px 10px; border-radius: 3px; background: #fff8e7; color: #3b2a18; border: 1px solid #d6c3a0; font-size: .82rem; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.dt-etiquette .dt-af { font-variant-numeric: tabular-nums; color: #6b5232; }
.dt-etiquette .dt-nom { font-weight: 800; color: #2a1c10; text-decoration: none; }
.dt-etiquette .dt-ville { color: #7a6143; }
.dt-etiquette .dt-info { color: #3b2a18; overflow: hidden; text-overflow: ellipsis; }
.dt-etiquette .dt-poids { margin-left: auto; padding: 1px 6px; border-radius: 4px; background: #2a1c10; font-size: .78rem; }
.dt-etiquette .tag { background: #e8eef4; color: #23384a; flex: 0 0 auto; }
@media (max-width: 760px) { .dt-etiquette { left: 4%; } .dt-etiquette .dt-ville, .dt-etiquette .tag { display: none; } }

/* tranche plus lisible : étiquette sur la gauche, feuilles visibles à droite et qui dépassent un peu */
.dt-feuilles { height: calc(var(--feuilles, 4) * 5px); margin: 0 calc(-1 * var(--feuilles, 4) * 1px) 0 3px; background: repeating-linear-gradient(#fefefb 0 4px, #c9ced4 4px 5px); border-radius: 0 2px 2px 0; }
.dt-etiquette { left: 1.5%; right: auto; max-width: 70%; }
/* la grande bannette posée dans le placard ; l'étiquette est collée au fond du bac, en haut */
.meuble-bannette .bannette-cat { padding: 16px 14px 12px; }
.meuble-bannette .grande-bannette { margin: 0 auto; }
.gb-pile { position: relative; padding-top: 52px; }
.gb-fond { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 4px 16px; background: #fff8e7; color: #3b2a18; border: 1px solid #d6c3a0; border-radius: 3px; white-space: nowrap; opacity: .92;
  font: 700 .95rem "Segoe Print", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.gb-poids { padding: 1px 8px; border-radius: 4px; background: #2a1c10; font: 700 .82rem system-ui, sans-serif; }

/* pile de dossiers : de haut en bas dans l'ordre choisi (« Mamie, classe-les ») */
.gb-pile { flex-direction: column; }

/* placard : portes qui se ferment devant les étagères (« Mamie, ferme le placard ») */
.placard-meuble { overflow: hidden; }
.meuble-portes { position: absolute; left: 0; right: 0; top: 2.6rem; bottom: 14px; display: flex; pointer-events: none; perspective: 1400px; z-index: 3; }
.meuble-portes .porte { flex: 1; position: relative; border: 4px solid #3a2614; background: repeating-linear-gradient(90deg, #6e4b2a 0 26px, #64431f 26px 28px);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .5); transition: transform .9s cubic-bezier(.5, 0, .25, 1); }
.meuble-portes .porte-g { transform-origin: left center; transform: rotateY(-100deg); }
.meuble-portes .porte-d { transform-origin: right center; transform: rotateY(100deg); }
.meuble-portes .porte i { position: absolute; top: 50%; width: 10px; height: 46px; margin-top: -23px; border-radius: 5px; background: linear-gradient(#e0c27a, #a27c2e); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.meuble-portes .porte-g i { right: 14px; } .meuble-portes .porte-d i { left: 14px; }
.placard-meuble.ferme .meuble-portes { pointer-events: auto; }
.placard-meuble.ferme .meuble-portes .porte { transform: rotateY(0); }
.btn-placard { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .meuble-portes .porte { transition: none; } }

/* bouton « vintage » avec Mamie à côté (« Mamie, classe-les ») */
.mamie-bouton { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mamie-a-cote { width: 3.4em; height: 3.4em; flex: 0 0 auto; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.btn-vintage { cursor: pointer; padding: 9px 22px; border-radius: 6px; border: 3px double #6b4a26; background: linear-gradient(#fbf1d9, #ead7ad); color: #4a3520;
  font: 700 1.05rem "Segoe Print", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive; letter-spacing: .02em; box-shadow: 0 3px 0 #8a6a3c, 0 6px 12px rgba(0, 0, 0, .35);
  transition: transform .08s, box-shadow .08s; }
.btn-vintage:hover { background: linear-gradient(#fff6e2, #f0dfb8); }
.btn-vintage:active { transform: translateY(3px); box-shadow: 0 0 0 #8a6a3c, 0 3px 6px rgba(0, 0, 0, .3); }
/* placard : Mamie à gauche, commandes vintage à droite */
.placard-et-mamie { align-items: flex-end; }
.mamie-colonne { flex: 0 0 14rem; }
.commandes-colonne { flex: 0 0 15rem; display: flex; flex-direction: column; gap: 14px; align-self: center; }
.commandes-colonne .btn-vintage { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; }
@media (max-width: 900px) { .commandes-colonne { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; } }
a.btn-vintage, a.btn-vintage:visited, a.btn-vintage:hover { color: #4a3520 !important; text-decoration: none !important; }
/* boutons vintage : texte noir, lisible (plus fort que les couleurs de lien du thème) */
html body .btn-vintage, html body a.btn-vintage, html body a.btn-vintage:visited, html body a.btn-vintage:hover, html body .btn-vintage span { color: #111 !important; -webkit-text-fill-color: #111; text-shadow: none !important; }

/* « Mamie, cherche un dossier » */
.dlg-cherche { width: min(640px, 94vw); }
.dlg-cherche input[type="search"] { width: 100%; font-size: 1.1rem; margin: 6px 0 10px; }
.cherche-res { list-style: none; margin: 0 0 10px; padding: 0; max-height: 50vh; overflow: auto; }
.cherche-res li { border-bottom: 1px solid var(--line); }
.cherche-res a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 6px; text-decoration: none; }
.cherche-res a:hover { background: rgba(217, 164, 65, .14); }
.cherche-ban { flex-basis: 100%; opacity: .85; }
/* Mamie qui court prendre une bannette */
.mamie-court { position: fixed; z-index: 2500; pointer-events: none; transition: transform .45s cubic-bezier(.4, 0, .2, 1); transform-origin: 50% 85%; }
.placard-meuble .bannette.prise { transform: translateY(-10px) rotate(-3deg); box-shadow: 0 14px 22px rgba(0, 0, 0, .55); border-color: #d9a441; transition: transform .2s, box-shadow .2s; }

/* portes posées sans animation (arrivée dans le module : déjà fermées) */
.placard-meuble.sans-anim .meuble-portes .porte { transition: none; }

/* Les petites victoires : ruban des terminés sur l'étagère « Fin de dossier » */
.ruban-victoire { display: inline-block; margin: 0 0 6px 10px; padding: 3px 12px 3px 10px; background: #3f7d4e; color: #fff8e6; font-weight: 700; font-size: .85rem;
  border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, .45); clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%); padding-right: 22px; }
/* La fête : Mamie, confettis */
.mamie-victoire { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: rgba(20, 12, 4, .45); transition: opacity .5s; cursor: pointer; }
.mamie-victoire.partie { opacity: 0; }
.victoire-carte { position: relative; display: flex; gap: 18px; align-items: center; max-width: min(620px, 92vw); padding: 20px 24px; background: #f4ead2; color: #2a1a0a;
  border: 4px solid #6e4b2a; border-radius: 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); animation: victoire-entre .5s cubic-bezier(.2, 1.4, .4, 1); }
.victoire-carte .mamie-fete { width: 130px; height: 130px; flex: none; animation: mamie-saute .6s ease-in-out 3; }
.victoire-titre { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.victoire-carte .bulle-mamie { margin: 0 0 8px; }
.victoire-carte .btn-vintage { margin-top: 6px; }
.confettis { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confettis i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; animation: confetti-tombe linear forwards; }
@keyframes confetti-tombe { to { top: 105%; transform: rotate(720deg) translateX(40px); } }
@keyframes victoire-entre { from { transform: scale(.6); opacity: 0; } }
@keyframes mamie-saute { 50% { transform: translateY(-14px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .confettis { display: none; } .victoire-carte, .victoire-carte .mamie-fete { animation: none; } }
/* Le carnet de Mamie : le temps gagné sur le papier */
.carnet-mamie { margin-top: 10px; padding: 10px 12px 10px 18px; background: repeating-linear-gradient(#fbf4df 0 21px, #c9d7e8 21px 22px); color: #2a1a0a;
  border-left: 3px solid #c0504d; border-radius: 3px; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); transform: rotate(-1deg); font-size: .88rem; line-height: 22px; }
.carnet-mamie .carnet-titre { margin: 0; font-weight: 800; }
.carnet-mamie ul { list-style: none; margin: 0; padding: 0; }
.carnet-mamie .carnet-total { margin: 0; font-weight: 800; color: #3f5d2e; }
/* le ruban des terminés : accroché en haut à droite de l'étagère, il ne prend pas la place d'une bannette */
.placard-meuble .bannette-cat .ruban-victoire { position: absolute; top: -8px; right: 14px; margin: 0; z-index: 2; }

/* Collecte / RDV : les numéros du client, là où on l'appelle pour fixer le RDV */
.appel-client { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 4px 0 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 8px; }
.appel-num { font-size: 1.35rem; font-weight: 800; }
.appel-num a { text-decoration: none; }
.appel-client .btn-planning-esabora, .appel-client > a.btn { margin-left: auto; }

/* Créer les dossiers branchement depuis Esabora */
.import-esabora td { vertical-align: top; }
.import-esabora td input:not([type=checkbox]) { width: 100%; min-width: 7rem; }
.import-esabora tr.ligne-doute td { background: rgba(240, 183, 90, .10); }

/* parlophone : RDV en double sous la journée (orange : à corriger, pas une erreur d'enregistrement) */
.alerte-doublon { color: var(--warn); font-weight: 600; }

/* corbeille : chantier / dossier supprimé en entier (à restaurer avant ses éléments) */
.corbeille-entier td { font-weight: 600; }

/* Étude branchement : forfait et pré-attachement sur un seul écran, dans deux cadres bien distincts */
.etude-cadres { display: grid; grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr)); gap: 16px; align-items: start; }
.cadre-etude { border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 0; min-width: 0; }
.cadre-etude legend { padding: 2px 10px; border-radius: 6px; font-weight: 800; font-size: 1.05rem; }
.cadre-forfait { border-color: #5b8bd6; } .cadre-forfait legend { background: #5b8bd6; color: #fff; }
.cadre-preattachement { border-color: #5aa469; } .cadre-preattachement legend { background: #5aa469; color: #fff; }
.etude-boutons { align-items: flex-end; gap: 12px; }

/* Étude branchement : les trois issues, bien en évidence */
.etude-trois-boutons { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px; align-items: stretch; margin-top: 6px; }
.btn-etude-bloc { display: flex; flex-direction: column; gap: 6px; }
.btn-etude-bloc label { display: flex; align-items: center; gap: 8px; justify-content: center; }
.btn-etude { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 4.6rem; padding: 10px 16px; border-radius: 10px;
  font-size: 1.15rem; font-weight: 800; cursor: pointer; border: 3px solid transparent; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); width: 100%; }
.btn-etude small { font-size: .82rem; font-weight: 600; opacity: .9; }
.btn-etude:hover:not([disabled]) { transform: translateY(-1px); filter: brightness(1.06); }
.btn-etude[disabled] { opacity: .45; cursor: not-allowed; }
.btn-etude-enreg { background: #e9f5e4; color: #1f4d1f; border-color: #5aa469; }
.btn-etude-depot { background: #5b8bd6; color: #fff; border-color: #2f5d8a; }
.btn-etude-docs { background: #f6c76b; color: #4a2c00; border-color: #c98a1a; }
.docs-manquants-saisie { margin-top: 10px; padding: 12px; border: 2px dashed #c98a1a; border-radius: 10px; }
.docs-manquants-saisie textarea { width: 100%; }
.docs-manquants-saisie .btn-etude { width: auto; min-height: 0; font-size: 1rem; }

/* Étude branchement : « Enregistrer » flottant, collé au bas visible de chaque cadre (forfait, pré-attachement) */
.cadre-enreg { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; margin-top: 10px; pointer-events: none; }
.cadre-enreg .btn-etude { width: auto; min-height: 0; padding: 8px 18px; font-size: 1.05rem; pointer-events: auto; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }

/* « Mais où j'ai pu ranger ce dossier ?! » (fiche du dossier) : plus grand et plus lisible */
.placard-scene { gap: 12px; margin: 6px 0 16px; }
.mamie-placard { width: 4.6em; height: 4.6em; }
.placard-scene .bulle-mamie { margin: 0 8px 0 4px; padding: 10px 16px; font-size: 1.12rem; line-height: 1.35; }
.placard-scene .placard { padding: 8px 10px 0; border-width: 5px; }
.placard-scene .placard-etagere { gap: 10px; padding: 8px; }
.placard-scene .placard-bac { padding: 9px 18px; font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; }
.placard-scene .placard-bac.ici { background: #fffaf0; color: #2a1a0a; border: 3px solid #d9a441; box-shadow: 0 0 0 3px rgba(217, 164, 65, .35), 0 4px 10px rgba(0, 0, 0, .45); }
.placard-scene .placard-bac.ici:hover { background: #fff3d6; color: #1a0f05; }

/* Étude branchement : ③ préparation des travaux (temps, apprenti, technicien) saisie dès l'étude */
.cadre-prep-travaux { border-color: #b0894e; margin-top: 14px; } .cadre-prep-travaux legend { background: #b0894e; color: #fff; }
.prep-travaux { align-items: center; gap: 10px 22px; }

/* ---------------------------------------------------------------- Le salon de Mamie (« Viens Mamie, on cause de la vie ») */
.salon { --bois: #6e4b2a; position: relative; display: grid; grid-template-rows: auto auto auto; border-radius: 14px; overflow: hidden; color: #2a1a0a;
  border: 6px solid #3a2614; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); font-family: Georgia, 'Times New Roman', serif; }
.salon-mur { position: relative; height: 300px;
  background: radial-gradient(circle at 12px 12px, rgba(160, 90, 90, .28) 0 3px, transparent 4px) 0 0 / 48px 48px,
    radial-gradient(circle at 36px 36px, rgba(90, 120, 80, .25) 0 3px, transparent 4px) 0 0 / 48px 48px,
    repeating-linear-gradient(90deg, #efe0bf 0 22px, #e9d7b1 22px 24px); border-bottom: 14px solid var(--bois); }
.salon-fenetre { position: absolute; left: 6%; top: 34px; width: 210px; height: 170px; border: 10px solid #f4ead2; outline: 4px solid var(--bois); border-radius: 6px 6px 0 0;
  background: linear-gradient(#0d1a3a, #233a6e); overflow: hidden; box-shadow: inset 0 0 30px rgba(0, 0, 0, .6); }
.salon-fenetre::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: #f4ead2; }
.salon-fenetre::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 6px; margin-top: -3px; background: #f4ead2; }
.etoile { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff8dc; box-shadow: 0 0 6px #fff; animation: scintille 3s ease-in-out infinite; }
.e1 { left: 20%; top: 20%; } .e2 { left: 70%; top: 15%; animation-delay: .7s; } .e3 { left: 35%; top: 62%; animation-delay: 1.3s; } .e4 { left: 82%; top: 70%; animation-delay: 2s; } .e5 { left: 58%; top: 38%; animation-delay: 2.6s; }
.etoile-papy { left: 25%; top: 38%; width: 6px; height: 6px; background: #ffe9a8; box-shadow: 0 0 10px 3px #ffd56a; animation: papy 2.4s ease-in-out infinite; }
.salon.etoile-vive .etoile-papy { width: 9px; height: 9px; box-shadow: 0 0 22px 8px #ffd56a; }
.lune { position: absolute; right: 14%; top: 12%; width: 26px; height: 26px; border-radius: 50%; box-shadow: -7px 4px 0 0 #fff3c4; }
@keyframes scintille { 50% { opacity: .35; } }
@keyframes papy { 50% { transform: scale(1.5); filter: brightness(1.3); } }
.salon-cadre { position: absolute; left: 34%; top: 46px; margin: 0; padding: 10px 10px 4px; background: #f4ead2; border: 9px solid #8a5a2b; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); text-align: center; transform: rotate(-1.5deg); }
.salon-cadre svg { width: 96px; height: 112px; display: block; }
.salon-cadre figcaption { font: italic .78rem Georgia, serif; color: #5a3d22; margin-top: 3px; }
.salon-pendule { position: absolute; right: 30%; top: 24px; width: 64px; height: 200px; background: linear-gradient(90deg, #5a3a1e, #7a5230, #5a3a1e); border-radius: 30px 30px 6px 6px; box-shadow: 0 6px 12px rgba(0, 0, 0, .45); }
.cadran { position: absolute; left: 7px; top: 8px; width: 50px; height: 50px; border-radius: 50%; background: #fbf4df; border: 3px solid #d9a441; }
.cadran i { position: absolute; left: 50%; top: 50%; width: 2px; background: #2a1a0a; transform-origin: 50% 100%; }
.aig1 { height: 16px; margin: -16px 0 0 -1px; transform: rotate(40deg); } .aig2 { height: 21px; margin: -21px 0 0 -1px; animation: tour 60s linear infinite; }
.balancier { position: absolute; left: 50%; top: 66px; width: 2px; height: 110px; margin-left: -1px; background: #d9a441; transform-origin: 50% 0; animation: balance 2s ease-in-out infinite alternate; }
.balancier::after { content: ''; position: absolute; left: -11px; bottom: -12px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe7a3, #b8862e); }
@keyframes balance { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes tour { to { transform: rotate(360deg); } }
.salon-etagere { position: absolute; right: 4%; top: 120px; display: flex; align-items: flex-end; gap: 14px; padding: 0 12px; border-bottom: 9px solid var(--bois); font-size: 2.3rem; line-height: 1; }
.salon-etagere .chat { transition: transform .8s; display: inline-block; }
.salon.chat-vient .salon-etagere .chat { transform: translate(-40px, 150px) scale(1.15); }
.salon-scene { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4%; min-height: 170px; padding: 0 4% 6px;
  background: repeating-linear-gradient(90deg, #7a5230 0 70px, #6e4b2a 70px 72px), #7a5230; }
.salon-fauteuil { position: relative; width: 210px; height: 190px; margin-top: -70px; background: radial-gradient(ellipse at 50% 35%, #b34a3c, #7a2a22 75%); border-radius: 90px 90px 26px 26px; box-shadow: 0 10px 20px rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
.salon-mamie { width: 170px; height: 170px; margin-bottom: 6px; animation: respire 4s ease-in-out infinite; }
@keyframes respire { 50% { transform: translateY(-2px) scale(1.01); } }
.salon-table { position: relative; width: 330px; height: 120px; margin-top: -40px; }
.salon-table .nappe { position: absolute; inset: 22px 0 0; border-radius: 50% 50% 18px 18px / 40% 40% 18px 18px;
  background: radial-gradient(circle at 8px 8px, rgba(255, 255, 255, .9) 0 3px, transparent 4px) 0 0 / 16px 16px, #fbf6ea; box-shadow: 0 10px 18px rgba(0, 0, 0, .45); }
.theiere { position: absolute; left: 40%; top: -26px; font-size: 3.4rem; }
.vapeur { position: absolute; left: 22px; top: 0; width: 8px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(3px); animation: vapeur 3s ease-in-out infinite; opacity: 0; }
.v2 { left: 32px; animation-delay: 1s; } .v3 { left: 14px; animation-delay: 2s; }
@keyframes vapeur { 0% { transform: translateY(0) scaleX(1); opacity: 0; } 30% { opacity: .8; } 100% { transform: translateY(-40px) scaleX(1.8); opacity: 0; } }
.tasse { position: absolute; top: 18px; font-size: 2rem; } .t1 { left: 14%; } .t2 { right: 16%; }
.madeleines { position: absolute; left: 34%; top: 54px; font-size: 1.5rem; }
.salon-dialogue { position: relative; padding: 16px 22px 18px; background: #f8efd9; border-top: 5px solid #b0894e;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(110, 150, 200, .18) 27px 28px); }
.salon-nom { display: inline-block; margin: -32px 0 8px; padding: 3px 14px; background: #8e6bb8; color: #fff; border-radius: 8px; font: 700 1rem "Segoe Print", "Bradley Hand", cursive; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.salon-texte { height: 11rem; overflow: auto; font-size: 1.12rem; line-height: 1.55; cursor: pointer; }
.salon-texte p { margin: 0 0 8px; }
.salon-texte em { color: #7a5a3a; }
.salon-suite { text-align: right; } .salon-suite [hidden] { display: none; }
.salon-choix { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.salon-bouton { font-size: 1rem; }
.salon-bouton.deja { opacity: .78; }
.salon-bouton.deja::after { content: ' ✓'; color: #3f7d4e; }
@media (max-width: 900px) { .salon-pendule, .salon-etagere { display: none; } .salon-cadre { left: auto; right: 6%; } .salon-table { width: 220px; } }
@media (prefers-reduced-motion: reduce) { .etoile, .balancier, .vapeur, .salon-mamie, .aig2 { animation: none; } }

/* ---------------------------------------------------------------- « Le Veilleur » : l'affaire Marcel (administrateurs) */
.mod-tab-histoire { opacity: .8; } .mod-tab-histoire:hover, .mod-tab-histoire.on { opacity: 1; }
.affaire { --liege: #b98a54; color: #2a1a0a; }
.affaire h1, .affaire h2, .affaire h3 { color: #f6e2c2; }
.affaire-tete { padding: 16px 20px; margin-bottom: 14px; background: #f4ead2; border: 2px solid #8a5a2b; border-radius: 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); font-family: 'Courier New', monospace; }
.affaire-tete h1 { color: #7a1f14; margin-top: 0; font-family: Georgia, serif; }
.liege { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 22px; padding: 26px 22px; border-radius: 10px;
  background: radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .08) 0 2px, transparent 3px) 0 0 / 14px 14px, radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .08) 0 2px, transparent 3px) 0 0 / 18px 18px, var(--liege);
  border: 10px solid #5a3a1e; box-shadow: inset 0 0 40px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .55); }
.polaroid { position: relative; padding: 14px 14px 18px; background: #fbf8f0; color: #2a1a0a; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); transform: rotate(var(--r, 0deg)); transition: transform .2s; }
.polaroid:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.polaroid.manque { background: #e9e2d2; color: #6b5a43; }
.punaise { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #b0261a); box-shadow: 0 3px 4px rgba(0, 0, 0, .5); }
.polaroid-lettre { float: right; margin: 0 0 6px 8px; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 3px double #7a1f14; color: #7a1f14; font: 800 1.3rem 'Courier New', monospace; transform: rotate(8deg); }
.polaroid-titre { display: block; font-family: Georgia, serif; font-size: 1.05rem; margin-bottom: 6px; }
.polaroid p { margin: 0; font-size: .92rem; line-height: 1.45; } .polaroid p.flou { font-style: italic; }
.polaroid-date { display: block; margin-top: 8px; font-size: .75rem; color: #8a7a60; }
.puzzle { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); aspect-ratio: 700 / 260; max-width: 900px; margin: 22px auto; border: 8px solid #5a3a1e; border-radius: 6px;
  background: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20700%20260%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22n%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%230e1b3d%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%233a2a4a%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22700%22%20height%3D%22260%22%20fill%3D%22url%28%23n%29%22%2F%3E%3Cg%20opacity%3D%22.18%22%20stroke%3D%22%23cfe6ff%22%20fill%3D%22none%22%3E%3Crect%20x%3D%22470%22%20y%3D%2240%22%20width%3D%22120%22%20height%3D%2290%22%20rx%3D%2222%22%2F%3E%3Crect%20x%3D%22490%22%20y%3D%2266%22%20width%3D%2280%22%20height%3D%2230%22%20rx%3D%2214%22%2F%3E%3Crect%20x%3D%22455%22%20y%3D%22140%22%20width%3D%22150%22%20height%3D%2290%22%20rx%3D%2214%22%2F%3E%3Cpath%20d%3D%22M530%2040V18%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M0%2040%20Q175%2095%20350%2040%20T700%2040%22%20stroke%3D%22%238a6a3a%22%20stroke-width%3D%222%22%20fill%3D%22none%22%2F%3E%3Cg%3E%3Ccircle%20cx%3D%2235%22%20cy%3D%2248%22%20r%3D%2211%22%20fill%3D%22%23e8503a%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22105%22%20cy%3D%2261%22%20r%3D%2211%22%20fill%3D%22%23f6c344%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22175%22%20cy%3D%2265%22%20r%3D%2211%22%20fill%3D%22%235bb4e8%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22245%22%20cy%3D%2260%22%20r%3D%2211%22%20fill%3D%22%237dd17a%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22315%22%20cy%3D%2247%22%20r%3D%2211%22%20fill%3D%22%23e88ac4%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22385%22%20cy%3D%2231%22%20r%3D%2211%22%20fill%3D%22%23e8503a%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22455%22%20cy%3D%2218%22%20r%3D%2211%22%20fill%3D%22%23f6c344%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22525%22%20cy%3D%2214%22%20r%3D%2211%22%20fill%3D%22%235bb4e8%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22595%22%20cy%3D%2219%22%20r%3D%2211%22%20fill%3D%22%237dd17a%22%20opacity%3D%22.95%22%2F%3E%3Ccircle%20cx%3D%22665%22%20cy%3D%2232%22%20r%3D%2211%22%20fill%3D%22%23e88ac4%22%20opacity%3D%22.95%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28250%2095%29%22%3E%3Ccircle%20cx%3D%2240%22%20cy%3D%2220%22%20r%3D%2214%22%20fill%3D%22%23f2c9a5%22%2F%3E%3Cpath%20d%3D%22M28%2012c4-10%2020-10%2024%200%22%20fill%3D%22%234a3020%22%2F%3E%3Cpath%20d%3D%22M18%20120%20L28%2040%20Q40%2030%2052%2040%20L62%20120%20Z%22%20fill%3D%22%232f4f7f%22%2F%3E%3Ccircle%20cx%3D%22105%22%20cy%3D%2224%22%20r%3D%2213%22%20fill%3D%22%23f2c9a5%22%2F%3E%3Cpath%20d%3D%22M92%2018c3-11%2023-11%2026%200c-8-4-18-4-26%200z%22%20fill%3D%22%233a2614%22%2F%3E%3Cpath%20d%3D%22M75%20128%20Q105%2040%20135%20128%20Z%22%20fill%3D%22%23c0405a%22%2F%3E%3Cpath%20d%3D%22M55%2055%20Q80%2040%2095%2055%22%20stroke%3D%22%23f2c9a5%22%20stroke-width%3D%226%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3Ctext%20x%3D%22350%22%20y%3D%22228%22%20text-anchor%3D%22middle%22%20fill%3D%22%23f6d68a%22%20font-family%3D%22Georgia%2Cserif%22%20font-size%3D%2217%22%20font-weight%3D%22bold%22%3ENice%20%C2%B7%2014%20juillet%201961%3C%2Ftext%3E%3Ctext%20x%3D%22350%22%20y%3D%22250%22%20text-anchor%3D%22middle%22%20fill%3D%22%23f6e2c2%22%20font-family%3D%22Georgia%2Cserif%22%20font-size%3D%2215%22%20font-style%3D%22italic%22%3E%C2%AB%20Je%20viens%20de%20r%C3%A9tablir%20le%20courant.%20Entre%20nous%20aussi%2C%20j%E2%80%99esp%C3%A8re.%20%C2%BB%3C%2Ftext%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; box-shadow: 0 10px 26px rgba(0, 0, 0, .55); overflow: hidden; }
.puzzle .piece { background: repeating-linear-gradient(45deg, #3a2614 0 10px, #33210f 10px 20px); border-right: 2px dashed rgba(246, 214, 138, .25); display: grid; place-items: center; transition: opacity 1.2s; }
.puzzle .piece::after { content: '?'; color: rgba(246, 214, 138, .4); font: 800 2rem Georgia, serif; }
.puzzle .piece.posee { background: transparent; border-right-color: rgba(255, 255, 255, .12); } .puzzle .piece.posee::after { content: ''; }
.puzzle-compte { position: absolute; right: 8px; bottom: 6px; padding: 2px 10px; background: rgba(0, 0, 0, .6); color: #f6d68a; border-radius: 10px; font-weight: 700; }
.code-final { max-width: 900px; margin: 0 auto 20px; padding: 18px 22px; background: #fbf8f0; color: #2a1a0a; border: 3px solid #7a1f14; border-radius: 8px; display: grid; gap: 12px; justify-items: center; }
.code-final .enigme { font: italic 1.1rem Georgia, serif; text-align: center; margin: 0; }
.code-final .lettres { display: flex; gap: 8px; } .code-final .lettres span { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 2px solid #7a1f14; font: 800 1.4rem 'Courier New', monospace; color: #7a1f14; background: #fff; }
.code-final input { font: 800 1.3rem 'Courier New', monospace; text-transform: uppercase; letter-spacing: .2em; text-align: center; }
.tableau-enqueteurs .vainqueurs { list-style: none; padding: 0; font-size: 1.1rem; } .tableau-enqueteurs .vainqueurs li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tableau-enqueteurs .medaille { font-size: 1.4rem; }
.en-cours { list-style: none; padding: 0; } .en-cours li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.en-cours .barre { flex: 0 0 12rem; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; } .en-cours .barre i { display: block; height: 100%; background: #d9a441; }
.atelier, .verite { max-width: 980px; margin: 0 auto; padding: 22px 26px; border-radius: 10px; background: #2b1d10; color: #f2e6cc; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); border: 1px solid #5a3a1e; }
.atelier h1, .verite h1 { color: #f6d68a; margin-top: 0; font-family: Georgia, serif; }
.atelier-intro { font-style: italic; color: #d8c6a4; }
.atelier-etabli { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; padding: 18px; background: repeating-linear-gradient(90deg, #6e4b2a 0 60px, #64431f 60px 62px); border-radius: 6px; }
.plan-veilleur { margin: 0; transform: rotate(-1.5deg); } .plan-veilleur svg { width: 100%; height: auto; display: block; box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }
.plan-veilleur figcaption { font: italic .85rem Georgia, serif; color: #f2e6cc; margin-top: 6px; }
.lettre-lea { padding: 18px 20px; background: #fbf8f0; color: #1f2a44; font: 1rem "Segoe Print", "Bradley Hand", cursive; line-height: 1.6; transform: rotate(1deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .5);
  background-image: repeating-linear-gradient(transparent 0 25px, rgba(110, 150, 200, .3) 25px 26px); }
.lettre-lea p { margin: 0 0 10px; } .lettre-signature { text-align: right; }
.verite p { font-size: 1.1rem; line-height: 1.7; max-width: 70ch; } .verite-fin { text-align: center; color: #f6d68a; font-style: italic; margin-top: 24px; }
@media (max-width: 860px) { .atelier-etabli { grid-template-columns: 1fr; } }
/* la carte d'un indice trouvé */
.hist-carte { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: rgba(10, 6, 2, .65); opacity: 0; transition: opacity .4s; }
.hist-carte.ouverte { opacity: 1; }
.hist-carte-in { position: relative; max-width: min(560px, 92vw); padding: 22px 26px; background: #fbf8f0; color: #2a1a0a; border: 2px solid #7a1f14; box-shadow: 0 20px 50px rgba(0, 0, 0, .7);
  transform: rotate(-2deg) scale(.9); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); font-family: Georgia, serif; }
.hist-carte.ouverte .hist-carte-in { transform: rotate(-1deg) scale(1); }
.hist-carte h3 { margin: 4px 0 10px; color: #7a1f14; font-size: 1.35rem; }
.hist-carte-sur { margin: 0; font: 700 .85rem 'Courier New', monospace; color: #8a5a2b; text-transform: uppercase; letter-spacing: .08em; }
.hist-carte-lettre { position: absolute; top: -18px; right: -14px; width: 3rem; height: 3rem; display: grid; place-items: center; background: #7a1f14; color: #fff; font: 800 1.6rem 'Courier New', monospace; border-radius: 50%; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
.hist-carte-pied { margin: 14px 0 0; font-size: .95rem; } .hist-carte-pied a { color: #7a1f14; } .hist-carte-pied button { background: none; border: 0; color: #6b5a43; cursor: pointer; text-decoration: underline; }
/* CanBot qui « bugue » */
.robot-glitch { animation: glitch .18s steps(2) infinite; filter: hue-rotate(160deg) saturate(2); }
@keyframes glitch { 0% { transform: translate(1px, -1px); } 50% { transform: translate(-2px, 1px) skewX(4deg); } 100% { transform: translate(1px, 1px); } }
/* Mamie sous le choc ; le dossier fantôme */
.mamie-choc { animation: choc .5s ease-in-out 3; } @keyframes choc { 50% { transform: translateY(-6px) rotate(-6deg); } }
.dossier-fantome { background: repeating-linear-gradient(0deg, rgba(122, 31, 20, .08) 0 2px, transparent 2px 4px); border-left: 4px solid #7a1f14; }
/* le salon : pendule arrêtée à 23 h 47, message de l'étoile, Fusible qui saute, la clé */
.salon-pendule.arretee .balancier { animation: none; transform: rotate(-14deg); } .salon-pendule.arretee .aig2 { animation: none; transform: rotate(282deg); } .salon-pendule.arretee .aig1 { transform: rotate(353deg); }
.salon-pendule.arretee .cadran { box-shadow: 0 0 0 3px #7a1f14; }
.salon.etoile-message .etoile-papy { width: 16px; height: 16px; box-shadow: 0 0 40px 18px #ffd56a; }
.chat-saute { animation: saute 1s ease-out forwards; } @keyframes saute { 40% { transform: translate(-30px, -50px) rotate(-20deg); } 100% { transform: translate(-70px, 0); } }
.cle-atelier { background: none; border: 0; font-size: 1.8rem; cursor: pointer; animation: brille 1.2s ease-in-out infinite; } @keyframes brille { 50% { filter: drop-shadow(0 0 8px #ffd56a); transform: rotate(-10deg); } }
/* code Konami : le bal du 14 juillet 1961 */
html.bal-1961 body { filter: sepia(.75) contrast(1.05); animation: valse 3s ease-in-out infinite; } @keyframes valse { 25% { transform: rotate(.4deg); } 75% { transform: rotate(-.4deg); } }

/* Enquête : solution (super-admin) et réinitialisation */
.solution-affaire{display:grid;gap:16px}
.solution-affaire .card p{max-width:none}
.solution-affaire h1{color:#f6e2c2}
.solution-affaire .card,.solution-affaire .card p,.solution-affaire .card li,.solution-affaire .card th,.solution-affaire .card td{color:#e6eef8}
.solution-affaire .card h2{color:#f6d68a}
.solution-affaire .card .muted{color:#a9bdd6}
.solution-lettre{font-family:Georgia,serif;font-size:1.3em;color:#c0392b}
.solution-code{display:flex;gap:8px;flex-wrap:wrap}
.solution-code span{display:inline-grid;place-items:center;width:2.2em;height:2.2em;border:2px solid currentColor;border-radius:6px;font:bold 1.3em Georgia,serif}
.hist-reinit{margin:10px 0;color:#e6eef8}
.hist-reinit p,.hist-reinit label{color:#e6eef8}
.hist-reinit summary{cursor:pointer;opacity:.75}
.hist-reinit form{display:grid;gap:8px;margin-top:8px;padding:12px;border:1px dashed currentColor;border-radius:8px}
.hist-reinit .btn{justify-self:start}

/* Salon : le bouton « La suite » ne bouge jamais (zone de texte à hauteur fixe, place du bouton réservée) */
.salon-suite { min-height: 2.6rem; }
/* le cadre de dialogue reste collé en bas de la fenêtre : jamais besoin de descendre pour lire ou répondre */
.salon-texte { height: 8.5rem; }
.salon-choix { min-height: 6.4rem; align-content: flex-start; }
.salon-dialogue { scroll-margin-bottom: 10px; }

.cherche-mot-mamie{font-style:italic;opacity:.85;margin:6px 0 0}

.polaroid-oublier{margin:6px 0 0;text-align:right}
.polaroid-oublier button{background:none;border:0;padding:2px 4px;font:inherit;font-size:.78em;color:#8a5a3a;cursor:pointer;opacity:.6;text-decoration:underline dotted}
.polaroid-oublier button:hover{opacity:1;color:#c0392b}
.hist-tout-oublier{margin:10px 0}

/* Salon : le carnet ouvert de Mamie (entrée de l'affaire Marcel, administrateurs) et son étiquette */
.salon-carnet{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:190px;padding-bottom:14px;text-decoration:none;color:#3a2412;transition:transform .25s}
.salon-carnet::after{content:"";position:absolute;left:8%;right:8%;bottom:0;height:14px;border-radius:50%;background:radial-gradient(ellipse,#5a3d22,#3a2412);box-shadow:0 8px 14px rgba(0,0,0,.45)}
.salon-carnet:hover,.salon-carnet:focus-visible{transform:translateY(-4px) rotate(-1deg)}
.carnet-ouvert{position:relative;display:flex;width:150px;height:74px;filter:drop-shadow(0 6px 6px rgba(0,0,0,.4));transform:perspective(300px) rotateX(28deg)}
.carnet-ouvert .page{flex:1;background:repeating-linear-gradient(#fbf3dc 0 9px,#b9a67a 9px 10px);border:1px solid #8a6d3b}
.carnet-ouvert .pg{border-radius:8px 0 0 6px;box-shadow:inset -8px 0 8px -6px rgba(0,0,0,.35)}
.carnet-ouvert .pd{border-radius:0 8px 6px 0;box-shadow:inset 8px 0 8px -6px rgba(0,0,0,.35)}
.carnet-ouvert .signet{position:absolute;left:50%;top:-4px;width:8px;height:92px;margin-left:-4px;background:#a8322a;clip-path:polygon(0 0,100% 0,100% 100%,50% 90%,0 100%)}
.carnet-etiquette{position:relative;display:flex;flex-direction:column;align-items:center;padding:6px 12px 5px 18px;background:#f6e7bf;border:1px solid #a98b52;border-radius:4px 8px 8px 4px;transform:rotate(-3deg);box-shadow:0 3px 6px rgba(0,0,0,.35);font-family:"Patrick Hand","Segoe Print","Comic Sans MS",cursive;line-height:1.15}
.carnet-etiquette::before{content:"";position:absolute;left:6px;top:50%;width:7px;height:7px;margin-top:-4px;border-radius:50%;background:#6b4a2a;box-shadow:inset 0 0 0 2px #f6e7bf,0 0 0 1px #a98b52}
.carnet-etiquette b{font-size:1.05rem;color:#7a1f1a}
.carnet-etiquette small{font-size:.82rem;color:#5a4326}
.carnet-etiquette em{align-self:flex-end;font-size:.78rem;color:#7a5a3a}
.salon-carnet:not(.resolu) .carnet-etiquette{animation:etiquette-balance 3.5s ease-in-out infinite}
@keyframes etiquette-balance{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(1deg)}}
@media (prefers-reduced-motion:reduce){.salon-carnet .carnet-etiquette{animation:none}}
@media (max-width:820px){.salon-carnet{width:140px}.carnet-ouvert{width:110px;height:56px}}
/* Enquête : Mamie attend qu'on clique sur elle (rencontre avec CanBot) */
.mamie-appelle{animation:mamie-appelle 1.6s ease-in-out infinite;filter:drop-shadow(0 0 10px #f6d68a)}
@keyframes mamie-appelle{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media (prefers-reduced-motion:reduce){.mamie-appelle{animation:none}}

/* Enquête : la rencontre Mamie / CanBot, en grand au milieu de l'écran */
.hist-scene{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:16px;background:rgba(6,8,14,.82);backdrop-filter:blur(3px);opacity:0;transition:opacity .35s}
.hist-scene.ouverte{opacity:1}
.hist-scene-in{width:min(860px,100%);max-height:92vh;display:flex;flex-direction:column;gap:12px;padding:20px 22px 16px;border-radius:16px;background:linear-gradient(#2b1c10,#1b120a);border:2px solid #a98b52;box-shadow:0 20px 60px rgba(0,0,0,.7);color:#f6e7bf}
.hist-scene-persos{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.hs-perso{margin:0;display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.55;transform:scale(.92);transition:opacity .3s,transform .3s}
.hs-perso.parle{opacity:1;transform:scale(1.06)}
.hs-perso figcaption{font-weight:700;letter-spacing:.06em;font-size:.85rem;color:#f6d68a}
.hs-fig{width:150px;height:150px;display:grid;place-items:center;font-size:4rem;overflow:hidden}
.hs-fig>*{position:static!important;width:140px!important;height:140px!important;max-width:140px;max-height:140px;margin:0!important;transform:none!important;animation:none!important;cursor:default!important}
.hs-fig svg{width:100%;height:100%}
.hs-mamie.choc{opacity:1;animation:hs-choc .5s 3}
@keyframes hs-choc{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px) rotate(-3deg)}75%{transform:translateX(5px) rotate(3deg)}}
.hist-scene-fil{display:flex;flex-direction:column;gap:10px;min-height:14rem;max-height:46vh;overflow:auto;padding:6px 2px}
.hs-bulle{margin:0;max-width:78%;padding:10px 14px;border-radius:14px;font-size:1.12rem;line-height:1.45;animation:hs-arrive .35s ease-out}
.hs-bulle.hs-robot{align-self:flex-start;background:#0f2a44;border:1px solid #3aa0ff;color:#d7ecff;border-bottom-left-radius:3px;font-family:"Courier New",monospace}
.hs-bulle.hs-mamie{align-self:flex-end;background:#f6e7bf;border:1px solid #a98b52;color:#2a1a0a;border-bottom-right-radius:3px;font-family:Georgia,serif}
.hs-bulle.hs-geste{align-self:center;max-width:100%;background:none;font-style:italic;color:#d9b98a;font-size:1rem}
@keyframes hs-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.hist-scene-pied{margin:0;text-align:right}
.hs-suite{padding:9px 18px;border-radius:8px;border:1px solid #a98b52;background:#f6d68a;color:#2a1a0a;font:inherit;font-weight:700;cursor:pointer}
.hs-suite:hover,.hs-suite:focus-visible{background:#ffe6a6;outline:2px solid #fff3}
@media (prefers-reduced-motion:reduce){.hs-bulle,.hs-mamie.choc{animation:none}.hs-perso{transition:none}}
@media (max-width:600px){.hs-fig{width:72px;height:72px}.hs-fig>*{width:66px!important;height:66px!important}.hs-bulle{max-width:92%;font-size:1rem}}
/* Enquête : indices dans l'ordre (les suivants restent masqués) */
.polaroid.verrou{opacity:.45;filter:grayscale(1)}
.polaroid.verrou .flou{filter:none;font-style:italic}
.polaroid.prochain{box-shadow:0 0 0 3px #f6d68a,0 8px 18px rgba(0,0,0,.45)}
/* Salon : l'armoire à dossiers de Mamie (retour au placard) et CanBot à côté d'elle après la vérité */
.salon-armoire{position:relative;display:flex;flex-direction:column;align-items:center;width:150px;height:250px;margin-top:-130px;text-decoration:none;transition:transform .25s}
.salon-armoire:hover,.salon-armoire:focus-visible{transform:translateY(-3px)}
.armoire-corniche{width:164px;height:14px;border-radius:6px 6px 0 0;background:linear-gradient(#7a5230,#5a3d22);box-shadow:0 2px 0 #3a2412}
.armoire-corps{flex:1;width:150px;display:grid;grid-template-rows:repeat(4,1fr);gap:6px;padding:8px;background:linear-gradient(90deg,#4a2f18,#6b4526 50%,#4a2f18);border:3px solid #3a2412;border-radius:0 0 6px 6px;box-shadow:0 12px 20px rgba(0,0,0,.5),inset 0 0 14px rgba(0,0,0,.5)}
.armoire-corps i{border-bottom:5px solid #3a2412;background:repeating-linear-gradient(90deg,#e9d7a8 0 14px,#c9a86a 14px 16px,#b9c7d9 16px 30px,#8fa3bd 30px 32px,#e7b9a8 32px 46px,#c98a72 46px 48px);background-size:100% 78%;background-repeat:no-repeat;background-position:bottom}
.armoire-plaque{position:absolute;top:22px;left:50%;transform:translateX(-50%) rotate(-2deg);padding:2px 10px;background:#f6e7bf;border:1px solid #a98b52;border-radius:3px;color:#3a2412;font-family:"Patrick Hand","Segoe Print","Comic Sans MS",cursive;font-size:.9rem;white-space:nowrap;box-shadow:0 2px 4px rgba(0,0,0,.4)}
.salon-canbot{width:96px;height:120px;display:grid;place-items:end center;margin-left:-3%;animation:canbot-veille 4s ease-in-out infinite}
.salon-canbot>*{position:static!important;width:92px!important;height:auto!important;max-height:116px;margin:0!important;cursor:default!important}
@keyframes canbot-veille{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media (prefers-reduced-motion:reduce){.salon-canbot{animation:none}}
@media (max-width:1000px){.salon-armoire{width:110px;height:200px;margin-top:-90px}.armoire-corps{width:110px}.armoire-corniche{width:122px}}
/* Salon : le gilet noir de Mamie sur sa patère ; un clic et elle l'enfile (jusqu'à la prochaine visite) */
.salon-gilet{position:absolute;left:23%;top:118px;width:74px;height:104px;padding:0;border:0;background:none;cursor:pointer;transform-origin:50% 0;transition:transform .3s,opacity .5s;filter:drop-shadow(0 6px 5px rgba(0,0,0,.35))}
.salon-gilet svg{width:100%;height:100%}
.salon-gilet:hover,.salon-gilet:focus-visible{transform:rotate(-4deg)}
.salon.gilet-mis .salon-gilet{opacity:0;transform:translate(60px,120px) scale(.5);pointer-events:none}
.gilet-porte{animation:gilet-enfile .7s ease-out}
@keyframes gilet-enfile{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.gilet-porte{animation:none}.salon-gilet{transition:none}}
@media (max-width:900px){.salon-gilet{left:20%;width:54px;height:76px;top:150px}}
/* Placard : la grosse touche de retour au salon (bureau) */
.retour-salon{margin:0 0 12px}
.btn-retour-salon{display:inline-block;font-size:1.35rem;padding:14px 28px}
/* Salon : la porte de sortie (retour à l'accueil d'e-suivi) */
.salon-porte{position:absolute;left:49%;bottom:0;width:112px;height:212px;padding:0;border:6px solid #3a2412;border-bottom:0;border-radius:8px 8px 0 0;background:#120c07;cursor:pointer;perspective:500px;overflow:visible}
.porte-battant{position:absolute;inset:0;display:flex;flex-direction:column;gap:10px;padding:12px 12px 16px;background:linear-gradient(90deg,#6b4526,#8a5a32 50%,#6b4526);transform-origin:0 50%;transition:transform .6s ease-in}
.porte-panneau{flex:1;border:3px solid #4a2f18;border-radius:4px;box-shadow:inset 0 0 8px rgba(0,0,0,.35)}
.porte-poignee{position:absolute;right:9px;top:54%;width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#ffe6a6,#b08d57);box-shadow:0 1px 2px rgba(0,0,0,.6)}
.porte-plaque{position:absolute;left:50%;top:-30px;transform:translateX(-50%);padding:1px 10px;background:#f6e7bf;border:1px solid #a98b52;border-radius:3px;color:#3a2412;font-family:"Patrick Hand","Segoe Print","Comic Sans MS",cursive;font-size:.9rem;box-shadow:0 2px 4px rgba(0,0,0,.4)}
.salon-porte:hover .porte-battant,.salon-porte:focus-visible .porte-battant{transform:rotateY(-18deg)}
.salon.on-sort .porte-battant{transform:rotateY(-78deg)}
.salon.on-sort .salon-porte{background:linear-gradient(#fff6d8,#f6d68a)}
@media (prefers-reduced-motion:reduce){.porte-battant{transition:none}}
@media (max-width:900px){.salon-porte{width:80px;height:160px}}
/* Salon : plus de bouton « La suite » ; une invitation en clair, et tout le cadre de dialogue est cliquable */
.salon-dialogue{cursor:pointer}
.salon-choix{cursor:default}
.salon-continuer{display:inline-block;padding:6px 4px;font-weight:700;font-size:1.05rem;color:#7a1f1a;cursor:pointer;animation:continuer-clignote 1.4s ease-in-out infinite}
.salon-continuer[hidden]{display:none}
@keyframes continuer-clignote{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.salon-continuer{animation:none}}

/* Salon, nouvelle disposition : armoire tout à gauche avec le gilet à côté ; Mamie sans fauteuil rouge, près de la table ; en face, une chaise (vide ou CanBot) */
.salon-armoire{position:absolute;left:2.5%;bottom:6px;margin-top:0}
.salon-gilet{left:calc(2.5% + 176px);top:212px}
.salon-fauteuil{width:150px;height:176px;margin-top:-60px;margin-right:-5%;background:none;border-radius:0;box-shadow:none}
.salon-chaise{position:relative;width:96px;height:160px;margin-top:-50px;margin-left:-5%;align-self:flex-end}
.salon-chaise svg{width:100%;height:100%;filter:drop-shadow(0 8px 8px rgba(0,0,0,.4))}
.salon-chaise .salon-canbot{position:absolute;left:-6px;bottom:62px;width:84px;height:104px;margin:0}
.salon-chaise .salon-canbot>*{width:80px!important;max-height:100px}
@media (max-width:1000px){.salon-gilet{left:calc(2.5% + 130px)}.salon-chaise{width:72px;height:120px}}
@media (max-width:900px){.salon-gilet{left:calc(2.5% + 124px);top:226px}}
/* Salon : de gauche à droite et serrés — l'armoire, le gilet sur sa patère, Mamie, la table, la chaise */
.salon-armoire{position:relative;left:auto;bottom:auto;margin-top:-130px;margin-right:-2.5%}
.salon-gilet{position:relative;left:auto;top:auto;align-self:flex-start;margin-top:-64px;margin-right:-3.5%;flex:none}
.salon.gilet-mis .salon-gilet{transform:translate(70px,60px) scale(.5)}
@media (max-width:1000px){.salon-armoire{margin-top:-90px}.salon-gilet{left:auto}}
@media (max-width:900px){.salon-gilet{left:auto;top:auto}}
/* Enquête : chaque découverte donne la piste de l'indice suivant */
.hist-carte-piste{margin-top:12px;padding:10px 12px;border-left:4px solid #c0392b;background:rgba(192,57,43,.1);font-style:italic}
.hist-carte-piste b{font-style:normal;letter-spacing:.04em}
.polaroid-piste{margin:6px 0 0;padding:5px 7px;border-left:3px solid #c0392b;background:rgba(192,57,43,.1);font-size:.85em;font-style:italic}

/* Accueil : Mamie comme logo de la tuile « Enedis branchement » */
.tuile-icone .tuile-mamie{display:block;width:1.5em;height:1.5em}

/* Salon : le porte-manteau sur pied. Le gilet y est accroché ; quand Mamie le porte, le porte-manteau reste, vide (un clic pour le raccrocher) */
.salon-gilet{width:84px;height:180px;align-self:flex-end;margin-top:-70px;margin-right:-3.5%;transform-origin:50% 100%}
.salon-gilet:hover,.salon-gilet:focus-visible{transform:rotate(-2deg)}
.salon.gilet-mis .salon-gilet{opacity:1;transform:none;pointer-events:auto}
.salon-gilet .pm-gilet{transition:opacity .45s}
.salon.gilet-mis .salon-gilet .pm-gilet{opacity:0}
@media (max-width:900px){.salon-gilet{width:62px;height:134px}}
/* Salon : l'invitation à continuer, au milieu du cadre */
.salon-suite{text-align:center}

/* Enquête, la rencontre : la bulle au-dessus de Mamie, CanBot qui sort de sa case et grandit */
.bulle-rencontre{position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);width:max-content;max-width:240px;padding:10px 14px;border:2px solid #3a2412;border-radius:16px;background:#fffdf3;color:#2a1a0a;font:700 1rem/1.3 Georgia,serif;cursor:pointer;z-index:6;box-shadow:0 6px 14px rgba(0,0,0,.45);animation:bulle-flotte 1.8s ease-in-out infinite}
.bulle-rencontre::after{content:"";position:absolute;left:50%;top:100%;margin-left:-9px;border:9px solid transparent;border-top-color:#3a2412}
.bulle-rencontre:hover,.bulle-rencontre:focus-visible{background:#ffe6a6}
@keyframes bulle-flotte{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-7px)}}
.bulle-appelle{animation:bulle-pulse 1.4s ease-in-out infinite;font-weight:700}
@keyframes bulle-pulse{0%,100%{box-shadow:0 0 0 0 rgba(246,214,138,.9)}50%{box-shadow:0 0 0 10px rgba(246,214,138,0)}}
.robot-parti{visibility:hidden}
.robot-revenu{animation:robot-revient .9s ease-out}
@keyframes robot-revient{from{transform:scale(2.2);opacity:0}to{transform:none;opacity:1}}
.hs-robot .hs-fig{width:190px;height:190px}
.hs-robot .hs-fig>*{width:180px!important;height:180px!important;max-width:180px;max-height:180px}
@media (prefers-reduced-motion:reduce){.bulle-rencontre,.bulle-appelle,.robot-revenu{animation:none}}
@media (max-width:600px){.hs-robot .hs-fig{width:110px;height:110px}.hs-robot .hs-fig>*{width:100px!important;height:100px!important}}
/* Salon : la clé de l'atelier en noir (bien visible sur le papier peint clair) et Fusible plus grand */
.cle-atelier{font-size:3.4rem;line-height:1;padding:0 4px;filter:brightness(0);animation:cle-noire 1.2s ease-in-out infinite}
@keyframes cle-noire{0%,100%{filter:brightness(0);transform:none}50%{filter:brightness(0) drop-shadow(0 0 7px #c8860a);transform:rotate(-10deg) scale(1.12)}}
.salon-etagere .chat{font-size:3.9rem;line-height:.9}
@media (prefers-reduced-motion:reduce){.cle-atelier{animation:none}}

/* Enquête, la vérité : un bandeau déroulant lu par un hologramme — CanBot, qui se transforme en Marcel */
.verite.verite-holo{max-width:none;padding:22px 26px;border-radius:14px;background:radial-gradient(ellipse at 20% 30%,#0d2a44,#050b14 70%);border:1px solid #1d5c8f;color:#d7ecff;box-shadow:0 0 40px rgba(58,160,255,.18) inset}
.verite-holo h1{color:#9fd3ff;text-shadow:0 0 12px rgba(58,160,255,.7);letter-spacing:.04em}
.holo-scene{display:grid;grid-template-columns:minmax(200px,300px) 1fr;gap:28px;align-items:center;margin-top:14px}
.holo-perso{display:flex;flex-direction:column;align-items:center;gap:8px}
.holo-fig{position:relative;width:240px;height:290px;order:1}
.holo-socle{order:2;width:200px;height:26px;margin-top:-14px;border-radius:50%;background:radial-gradient(ellipse,#7cc4ff,#1d5c8f 45%,transparent 70%);box-shadow:0 0 30px 8px rgba(58,160,255,.55);animation:holo-socle 2.4s ease-in-out infinite}
.holo-nom{order:3;margin:6px 0 0;font:700 1.15rem "Courier New",monospace;letter-spacing:.2em;text-transform:uppercase;color:#9fd3ff;text-shadow:0 0 10px #3aa0ff}
.holo-canbot,.holo-marcel{position:absolute;inset:0;display:grid;place-items:center;transition:opacity 1.2s ease,transform 1.2s ease,filter 1.2s ease}
.holo-canbot>*{position:static!important;width:210px!important;height:auto!important;max-height:280px;margin:0!important;cursor:default!important}
.holo-canbot svg,.holo-marcel svg{width:100%;height:100%}
.holo-marcel{opacity:0;transform:scale(.9);filter:grayscale(1) sepia(1) hue-rotate(165deg) saturate(3.2) brightness(1.25) drop-shadow(0 0 14px #3aa0ff);padding:6px 20px 0}
.holo-marcel-la .holo-canbot{opacity:0;transform:scale(1.08);filter:blur(4px) brightness(1.6)}
.holo-marcel-la .holo-marcel{opacity:.92;transform:none;animation:holo-tremble 4s steps(1) infinite}
.holo-balayage{position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(to bottom,rgba(124,196,255,.16) 0 2px,transparent 2px 5px);mix-blend-mode:screen;animation:holo-lignes 1.1s linear infinite}
.holo-bascule .holo-fig{animation:holo-bascule 1.6s steps(2,end)}
.holo-bascule .holo-balayage{background:repeating-linear-gradient(to bottom,rgba(255,255,255,.6) 0 3px,transparent 3px 7px)}
@keyframes holo-lignes{to{background-position:0 5px}}
@keyframes holo-socle{0%,100%{opacity:.75;transform:scaleX(1)}50%{opacity:1;transform:scaleX(1.08)}}
@keyframes holo-tremble{0%,100%{opacity:.92;transform:none}47%{opacity:.92}48%{opacity:.55;transform:translateX(3px) skewX(4deg)}50%{opacity:.95;transform:none}83%{opacity:.7;transform:translateX(-2px)}85%{opacity:.92;transform:none}}
@keyframes holo-bascule{0%{transform:none;filter:none}15%{transform:translateX(8px) skewX(12deg);filter:hue-rotate(60deg) brightness(1.8)}30%{transform:translateX(-10px) skewX(-14deg) scaleY(1.06);filter:brightness(2.4)}50%{transform:translateX(6px) scaleY(.94);filter:hue-rotate(-40deg) brightness(1.5)}75%{transform:translateX(-3px) skewX(5deg);filter:brightness(1.9)}100%{transform:none;filter:none}}
.holo-bandeau{position:relative;height:min(58vh,520px);overflow:hidden;cursor:pointer;border-block:1px solid rgba(124,196,255,.4);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}
.holo-texte{will-change:transform;padding:0 8px}
.verite-holo .holo-texte p{max-width:none;margin:0 0 1.5em;font:1.35rem/1.7 Georgia,serif;color:#d7ecff;text-shadow:0 0 8px rgba(58,160,255,.45)}
.verite-holo .holo-texte p b{color:#fff3c4}
.verite-holo .holo-texte .verite-fin{text-align:center;color:#f6d68a;font-style:italic}
.holo-statique .holo-bandeau{overflow:auto;cursor:auto;-webkit-mask-image:none;mask-image:none}
.holo-commandes{margin:14px 0 0;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.verite-holo .holo-commandes .btn-ghost{color:#9fd3ff;border-color:#1d5c8f}
@media (max-width:820px){.holo-scene{grid-template-columns:1fr}.holo-fig{width:150px;height:180px}.holo-canbot>*{width:130px!important}.holo-bandeau{height:50vh}.verite-holo .holo-texte p{font-size:1.1rem}}
@media (prefers-reduced-motion:reduce){.holo-socle,.holo-balayage,.holo-marcel-la .holo-marcel,.holo-bascule .holo-fig{animation:none}.holo-canbot,.holo-marcel{transition:none}}
/* La vérité : tapée à la machine, au fur et à mesure (police de machine à écrire, curseur) */
.verite-holo .holo-bandeau{overflow:hidden;scroll-behavior:smooth;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 12%);mask-image:linear-gradient(to bottom,transparent,#000 12%)}
.verite-holo .holo-texte{transform:none!important;padding:10% 8px 24px}
.verite-holo .holo-texte p{font:1.3rem/1.75 "Courier New",Courier,monospace;letter-spacing:.01em}
.verite-holo.holo-statique .holo-bandeau{overflow:auto;-webkit-mask-image:none;mask-image:none}
.holo-curseur{color:#7cc4ff;animation:holo-curseur .7s steps(1) infinite}
@keyframes holo-curseur{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.holo-curseur{animation:none}}
/* La vérité : à la fin, la grosse touche de retour au salon */
.holo-fin{margin:18px 0 4px;text-align:center}
.holo-fin[hidden]{display:none}
.holo-retour{display:inline-block;font-size:1.3rem;padding:14px 28px;text-decoration:none}

/* Enquête : le bouton de la solution (super-admin), lisible sur le papier clair de l'en-tête */
.btn-solution{display:inline-block;padding:8px 16px;border:2px solid #3a2412;border-radius:8px;background:#3a2412;color:#f6e7bf!important;font-weight:700;text-decoration:none;box-shadow:0 2px 5px rgba(0,0,0,.35)}
.btn-solution:hover,.btn-solution:focus-visible{background:#7a1f1a;border-color:#7a1f1a;color:#fff!important}

/* Enquête : le titre de l'affaire, lisible sur l'en-tête en papier clair (thème du module branchement) */
.affaire .affaire-tete h1{color:#7a1f1a;text-shadow:none}

/* Enquête résolue : sous le bal du 14 juillet, le bouton de la vérité et le code de commande secret */
.bal-apres{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:18px;margin:14px 0}
.bal-verite{display:inline-block;font-size:1.3rem;padding:14px 28px;text-decoration:none}
.bal-code{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 18px;border:1px dashed #a98b52;border-radius:10px;background:rgba(20,12,6,.75);color:#f6e7bf}
.bal-code-titre{font:700 .82rem "Courier New",monospace;letter-spacing:.12em;text-transform:uppercase;color:#f6d68a}
.bal-touches{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.bal-touches kbd{display:inline-grid;place-items:center;min-width:2.1em;height:2.1em;padding:0 .3em;border:1px solid #a98b52;border-bottom-width:3px;border-radius:6px;background:#f6e7bf;color:#2a1a0a;font:700 1.05rem "Courier New",monospace}
.bal-code-aide{font-size:.82rem;font-style:italic;color:#d9b98a}
/* Enquête : noms lisibles dans le tableau des enquêteurs (carte sombre du thème branchement) */
.affaire .tableau-enqueteurs li,.affaire .tableau-enqueteurs li b,.affaire .tableau-enqueteurs p{color:#f6e7bf}

/* Salon : la porte de l'atelier de Marcel, condamnée (« Fermeture définitive ») jusqu'à ce qu'on trouve la clé */
.salon-porte.porte-atelier{left:73.5%;width:104px;height:204px;border-color:#2a1a0a;background:#0a0704}
.porte-atelier .porte-battant{background:linear-gradient(90deg,#4a3320,#5f4229 50%,#4a3320);filter:saturate(.7)}
.porte-atelier .porte-plaque{background:#d9c9a0}
.porte-serrure{position:absolute;right:11px;top:60%;width:7px;height:11px;border-radius:3px 3px 4px 4px;background:#1b1b20;box-shadow:0 0 0 1px #b08d57}
.porte-pancarte{position:absolute;left:50%;top:36%;transform:translate(-50%,-50%) rotate(-7deg);display:flex;flex-direction:column;align-items:center;padding:5px 8px 4px;background:#f3ead2;border:2px solid #7a1f1a;border-radius:3px;box-shadow:0 3px 6px rgba(0,0,0,.5);z-index:2;pointer-events:none;transition:opacity .5s,transform .8s}
.porte-pancarte b{font:800 .72rem/1.15 "Courier New",monospace;letter-spacing:.06em;text-transform:uppercase;color:#7a1f1a;white-space:nowrap}
.porte-pancarte::before{content:"";position:absolute;left:50%;top:-11px;width:2px;height:11px;background:#3a2412}
.porte-lueur{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 60%,#ffe6a6,#f6b94a 45%,#3a2412 100%);opacity:0;transition:opacity .9s;z-index:-1}
.porte-atelier.deverrouillee .porte-pancarte{opacity:0;transform:translate(-50%,160%) rotate(35deg)}
.porte-atelier.deverrouillee .porte-battant{filter:none}
.porte-atelier.deverrouillee{background:linear-gradient(#3a2412,#120c07)}
.porte-atelier.ouverte .porte-battant{transform:rotateY(-80deg)}
.porte-atelier.ouverte .porte-lueur{opacity:1;z-index:0}
.porte-atelier.ouverte{box-shadow:0 0 34px rgba(246,185,74,.6)}
.porte-atelier:not(.deverrouillee):hover .porte-battant,.porte-atelier:not(.deverrouillee):focus-visible .porte-battant{transform:none}
.porte-atelier.secouee{animation:porte-secouee .45s}
@keyframes porte-secouee{0%,100%{transform:none}20%{transform:translateX(-4px)}40%{transform:translateX(4px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
@media (prefers-reduced-motion:reduce){.porte-atelier.secouee{animation:none}.porte-pancarte,.porte-lueur{transition:none}}
@media (max-width:1100px){.salon-porte.porte-atelier{left:71%;width:84px;height:170px}}
@media (max-width:820px){.salon-porte.porte-atelier{display:none}}
/* en sortant du salon, seule la porte de sortie s'ouvre (pas celle de l'atelier) */
.salon.on-sort .porte-atelier:not(.ouverte) .porte-battant{transform:none}
.salon.on-sort .salon-porte.porte-atelier:not(.ouverte){background:#0a0704}

/* La vérité : écran rétro-futuriste (tube cathodique, phosphore) ; seule la lettre qui vient d'apparaître glitche */
.verite-holo .holo-bandeau{background:repeating-linear-gradient(to bottom,rgba(124,196,255,.05) 0 1px,transparent 1px 4px),radial-gradient(ellipse at 50% 50%,rgba(29,92,143,.25),transparent 75%);border:1px solid rgba(124,196,255,.35);border-radius:14px;box-shadow:inset 0 0 40px rgba(0,0,0,.7),0 0 18px rgba(58,160,255,.25)}
.verite-holo .holo-texte p{font-family:"VT323","Share Tech Mono","OCR A Std","Lucida Console","Courier New",monospace;color:#bfe6ff;text-shadow:0 0 6px rgba(124,196,255,.8),0 0 1px #fff}
.holo-lettre{position:relative;display:inline-block;animation:lettre-glitch .42s steps(1,end) both}
.holo-lettre::before{content:attr(data-l);position:absolute;left:0;top:0;color:#fff3c4;text-shadow:-2px 0 #ff3b6b,2px 0 #29f0ff;animation:lettre-parasite .42s steps(1,end) both}
@keyframes lettre-glitch{0%{color:transparent;text-shadow:none;transform:translate(3px,-2px) skewX(-20deg) scaleY(1.5)}22%{color:transparent;text-shadow:none;transform:translate(-3px,2px) skewX(18deg) scaleY(.7)}44%{color:#fff;text-shadow:-3px 0 #ff3b6b,3px 0 #29f0ff;transform:translate(2px,0) skewX(-8deg)}70%{color:#fff;text-shadow:-1px 0 #ff3b6b,1px 0 #29f0ff,0 0 14px #7cc4ff;transform:translate(-1px,0)}100%{transform:none}}
@keyframes lettre-parasite{0%{opacity:1;transform:translate(-2px,1px)}22%{opacity:1;transform:translate(2px,-2px) scaleX(1.3)}44%,100%{opacity:0}}
@media (prefers-reduced-motion:reduce){.holo-lettre,.holo-lettre::before{animation:none}.holo-lettre::before{content:none}}
/* Atelier : la pancarte en bois d'époque, et sous l'établi le panier de Fusible où dort le cadenas */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pancarte-atelier{position:relative;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin:6px auto 18px;padding:16px 46px 14px;max-width:760px;border:3px solid #2a1a0a;border-radius:10px 14px 9px 13px;background:repeating-linear-gradient(92deg,#6b4526 0 38px,#7a5230 38px 41px,#62401f 41px 90px,#5a3d22 90px 93px),#6b4526;box-shadow:0 10px 22px rgba(0,0,0,.55),inset 0 0 26px rgba(0,0,0,.45);transform:rotate(-.6deg)}
.pancarte-titre{font:900 2.3rem/1 Georgia,"Times New Roman",serif;letter-spacing:.08em;text-transform:uppercase;color:#f1dfae;text-shadow:0 2px 0 #2a1a0a,0 0 1px #2a1a0a,2px 3px 4px rgba(0,0,0,.6)}
.pancarte-sous{flex-basis:100%;text-align:center;font:italic 700 1.05rem Georgia,serif;letter-spacing:.14em;color:#e2c98a;text-shadow:0 1px 0 #2a1a0a}
.pancarte-eclair{font-size:1.5rem;filter:sepia(1) saturate(2) brightness(.95)}
.pancarte-clou{position:absolute;top:10px;width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#d9d9e3,#55555f);box-shadow:0 1px 2px rgba(0,0,0,.7)}
.pancarte-clou:first-child{left:14px}.pancarte-clou:nth-child(2){right:14px}
.atelier-dessous{margin-top:18px;padding:16px 18px 20px;border-radius:0 0 12px 12px;background:linear-gradient(#1a110a,#0c0805);border-top:10px solid #3a2412;display:grid;grid-template-columns:auto 1fr;gap:10px 26px;align-items:center}
.atelier-dessous-titre{grid-column:1/-1;margin:0;font:italic .9rem Georgia,serif;color:#8a7350}
.panier-fusible{display:flex;flex-direction:column;align-items:center;gap:2px;width:190px;padding:0;border:0;background:none;cursor:pointer;opacity:.5;filter:brightness(.6);transition:opacity .4s,filter .4s,transform .3s}
.panier-fusible:hover,.panier-fusible:focus-visible,.panier-fusible.fouille{opacity:1;filter:none}
.panier-fusible:hover{transform:translateY(-3px)}
.panier-fusible svg{width:100%}
.panier-legende{font:.85rem "Patrick Hand","Segoe Print","Comic Sans MS",cursive;color:#d9b98a}
.panier-cadenas{opacity:0;transform:translateY(12px);transition:opacity .6s,transform .6s}
.panier-fusible.fouille .panier-cadenas{opacity:1;transform:none}
.cadenas-trouve{padding:14px 16px;border-left:4px solid #c0392b;border-radius:0 8px 8px 0;background:rgba(246,231,191,.94);color:#2a1a0a}
.cadenas-trouve[hidden]{display:none}
.cadenas-trouve p{margin:0 0 .7em;max-width:none;color:#2a1a0a}
.cadenas-trouve p:last-child{margin:0}
@media (max-width:760px){.atelier-dessous{grid-template-columns:1fr;justify-items:center}.pancarte-titre{font-size:1.5rem}.pancarte-atelier{padding-inline:30px}}
@media (prefers-reduced-motion:reduce){.panier-cadenas,.panier-fusible{transition:none}}
/* Atelier : le post-scriptum de Léa, lisible sur le papier */
.lettre-lea .small.muted{color:#4a3520;opacity:1;font-weight:600}

/* Salon : au-dessus de la porte de l'atelier, la même pancarte en bois d'époque (en petit) */
.porte-enseigne{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%) rotate(-1.2deg);display:flex;flex-direction:column;align-items:center;gap:1px;width:max-content;padding:6px 14px 5px;border:2px solid #2a1a0a;border-radius:6px 8px 5px 7px;background:repeating-linear-gradient(92deg,#6b4526 0 22px,#7a5230 22px 24px,#62401f 24px 52px,#5a3d22 52px 54px),#6b4526;box-shadow:0 5px 10px rgba(0,0,0,.5),inset 0 0 12px rgba(0,0,0,.45);pointer-events:none}
.porte-enseigne b{font:900 .86rem/1.1 Georgia,"Times New Roman",serif;letter-spacing:.07em;text-transform:uppercase;color:#f1dfae;text-shadow:0 1px 0 #2a1a0a,1px 2px 2px rgba(0,0,0,.6);white-space:nowrap}
.porte-enseigne small{font:italic 700 .62rem Georgia,serif;letter-spacing:.1em;color:#e2c98a;text-shadow:0 1px 0 #2a1a0a;white-space:nowrap}
@media (max-width:1100px){.porte-enseigne b{font-size:.7rem}.porte-enseigne small{font-size:.54rem}}
/* Carte d'indice : titre lisible sur le papier clair (thème du module branchement) */
.hist-carte .hist-carte-in h3{color:#7a1f1a;text-shadow:none}

/* Salon : Mamie sur sa chaise boit son thé et mange ses cookies en boucle ; CanBot, en face, la regarde et boit aussi */
.salon-fauteuil{position:relative}
.salon-fauteuil .salon-mamie{position:relative;z-index:1}
.chaise-mamie{position:absolute;left:-2px;bottom:0;width:96px;height:160px;z-index:0;filter:drop-shadow(0 8px 8px rgba(0,0,0,.4))}
.mamie-tasse,.mamie-cookie{position:absolute;z-index:2;line-height:1;pointer-events:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4))}
.mamie-tasse{left:96px;top:92px;font-size:1.35rem;animation:mamie-boit 9s ease-in-out infinite}
.mamie-cookie{left:30px;top:104px;font-size:1.05rem;animation:mamie-croque 9s ease-in-out infinite}
@keyframes mamie-boit{0%,6%,34%,100%{transform:none}14%{transform:translate(-40px,-38px) rotate(-8deg)}20%,26%{transform:translate(-44px,-42px) rotate(-38deg)}}
@keyframes mamie-croque{0%,50%,82%,100%{transform:none;opacity:1}58%{transform:translate(18px,-44px)}62%{transform:translate(20px,-47px) scale(.9)}66%{transform:translate(18px,-44px) scale(.82)}70%{transform:translate(20px,-47px) scale(.72)}76%{transform:translate(10px,-20px) scale(.72)}}
.salon-chaise .salon-canbot{animation:none}
.salon-chaise .salon-canbot>.robot-holo{transform:perspective(240px) rotateY(-38deg) rotate(-3deg)!important;transform-origin:50% 60%}
.canbot-tasse{position:absolute;left:-16px;top:58px;font-size:1.25rem;line-height:1;transform:scaleX(-1);pointer-events:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4));animation:canbot-boit 9s ease-in-out infinite}
@keyframes canbot-boit{0%,40%,70%,100%{transform:scaleX(-1)}48%{transform:translate(24px,-26px) scaleX(-1) rotate(8deg)}54%,60%{transform:translate(28px,-30px) scaleX(-1) rotate(36deg)}}
@media (prefers-reduced-motion:reduce){.mamie-tasse,.mamie-cookie,.canbot-tasse{animation:none}}
/* La vérité racontée par CanBot : les fonctions retrouvées dans sa mémoire, et la ligne laissée par Marcel */
.verite-holo .holo-texte p b{color:#ffd98a;font-weight:700;overflow-wrap:anywhere}
.verite-holo .holo-texte p[data-marcel]{color:#fff3c4;border-left:3px solid #ffc46b;padding-left:14px;text-shadow:0 0 10px rgba(255,196,107,.5)}

/* ---- RDV compteurs par bloc (v67) : n° de fiche, prise de RDV, planning des blocs, « Compléter les infos » ---- */
.num-fiche { display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
.num-fiche b { letter-spacing: .03em; }
.num-fiche-grand { font-size: 1.35rem; padding: 4px 6px 4px 14px; border-width: 2px; border-color: var(--brand); }
.btn-copier { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1em; padding: 2px 6px; border-radius: 999px; min-width: 32px; min-height: 32px; }
.btn-copier:hover, .btn-copier.copie { background: var(--ok-bg); color: var(--ok); }
.fiche-num-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.rdv-line .num-fiche { font-size: .8rem; }
.rdv-line .h small { display: block; font-weight: 400; color: var(--muted); }
.completer { margin-top: 12px; }
.completer > summary { list-style: none; text-align: center; }
.completer > summary::-webkit-details-marker { display: none; }
.btn-completer { background: var(--info); color: #fff; }
.completer[open] > summary { margin-bottom: 10px; }
.tabs-tech { margin: 4px 0 12px; }
.tabs-tech a { padding: 10px 16px; font-size: 1.05rem; }
.btn-prise-rdv { width: auto; }
.cpt-prise { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cpt-prise { grid-template-columns: minmax(0, 1fr); } }
.cpt-prise .card { margin: 0; }
.nouveau-client { border: 1px dashed var(--line); border-radius: var(--radius); padding: 8px 12px; }
.choix-bloc { display: inline-flex; gap: 6px; align-self: flex-end; }
.chip-bloc { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chip-bloc:has(input:checked) { border-color: var(--brand); background: var(--ok-bg); font-weight: 700; }
.grow { flex: 1; min-width: 180px; }
.ligne-choisie td { background: var(--info-bg); }
.tuiles-chantiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tuile-chantier { display: flex; flex-direction: column; gap: 4px; margin: 0; text-decoration: none; color: inherit; }
.tuile-chantier:hover { outline: 2px solid var(--brand); }
.blocs-grille { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.blocs-tete { text-align: center; font-size: .8rem; color: var(--muted); }
.blocs-jour { display: flex; flex-direction: column; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.blocs-jour.auj { border-color: var(--brand); }
.blocs-jour.passe { opacity: .55; }
.blocs-date { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bloc { font: inherit; font-size: .78rem; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--ok-bg); color: var(--ink); cursor: pointer; text-align: left; min-height: 30px; min-width: 0; }
.bloc small { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bloc-lib { font-weight: 700; opacity: .7; }
.bloc.bloc-phase { background: color-mix(in srgb, var(--c, #10b981) 22%, transparent); border-color: var(--c, #10b981); }
.bloc.bloc-occupe { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(179, 38, 30, .22) 5px 8px); }
.bloc.bloc-choisi { outline: 3px solid var(--brand); outline-offset: -1px; }
.bloc-leg { display: inline-block; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line); }
.bloc-leg.bloc-phase { background: color-mix(in srgb, #10b981 22%, transparent); border-color: #10b981; }
.bloc-leg.bloc-occupe { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(179, 38, 30, .22) 5px 8px); }
.bloc-leg.bloc-libre { background: var(--ok-bg); }
tbody.bloc-rdv .bloc-titre th { text-align: left; background: var(--bg); padding-top: 10px; }
form.inline { display: inline; }.choix-bloc .chip-bloc, body.jarvis .choix-bloc .chip-bloc { flex-direction: row; align-items: center; white-space: nowrap; }
.choix-bloc .chip-bloc input, body.jarvis .choix-bloc .chip-bloc input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; }/* Tableau de bord Enedis colonne : tuiles de toutes les pages du module */
.tuiles-module { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 14px; margin: 6px 0 20px; }
.tuile-module { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.tuile-module:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(164, 194, 41, .3); border-color: var(--brand); }
.tuile-module-gros { border: 2px solid var(--brand); min-height: 10rem; }
.tuile-module-gros .tuile-rdv-nom { font-size: 1.7rem; }
.tuile-module-ico { font-size: 1.3em; }
/* Prise de RDV : bloc où le technicien est pris ailleurs — rayures et bord rouges bien visibles */
.bloc.bloc-occupe, body.jarvis .bloc.bloc-occupe { border: 2px solid #e53935; box-shadow: inset 0 0 0 1px #e53935;
  background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .75) 0 4px, transparent 4px 9px); }
.bloc-leg.bloc-occupe { border: 2px solid #e53935; background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .75) 0 4px, transparent 4px 9px); }/* Enedis colonne : grosse touche de retour aux tuiles du module (le sous-menu a disparu) */
.btn-retour-module { display: inline-flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; padding: 12px 22px; margin: 0 0 14px;
  border: 2px solid var(--brand); border-radius: 14px; }
.tech-manquant { color: var(--err); font-weight: 700; }/* Parlophone : planning visuel des créneaux (bouton 📅 de la colonne RDV) */
.rdv-choix { display: inline-flex; align-items: center; gap: 4px; }
.dlg-creneaux { width: min(96vw, 1400px); max-height: 92vh; }
.cr-grille-wrap { overflow: auto; max-height: 68vh; border: 1px solid var(--line); border-radius: 8px; }
.cr-grille { display: flex; gap: 6px; padding: 6px; min-width: max-content; }
.cr-col { display: flex; flex-direction: column; gap: 3px; width: 9.5rem; }
.cr-col.cr-heures { width: 3rem; }
.cr-tete { height: 3.2rem; position: sticky; top: 0; background: var(--card); z-index: 1; font-size: .82rem; line-height: 1.2; overflow: hidden; }
.cr-tete small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-h { height: 2rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.cr-case { font: inherit; font-size: .75rem; height: 2rem; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); background: transparent; }
.cr-case.cr-vide { border-style: dashed; opacity: .3; }
.cr-case.cr-libre { background: var(--ok-bg); cursor: pointer; }
.cr-case.cr-pris { background: color-mix(in srgb, var(--muted) 22%, transparent); color: var(--muted); cursor: not-allowed; }
.cr-case.cr-conflit { border: 2px solid #e53935; background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .6) 0 4px, transparent 4px 9px); cursor: not-allowed; }
.cr-case.cr-actuel { background: var(--info-bg); border: 2px solid var(--info); font-weight: 700; cursor: pointer; }
.cr-case.cr-fenetre { outline: 3px solid var(--brand); outline-offset: -2px; background: color-mix(in srgb, var(--brand) 35%, transparent); }
.cr-case.cr-fenetre-ko { outline: 3px solid #e53935; outline-offset: -2px; }
.cr-leg { display: inline-block; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line); }
.cr-leg.cr-libre { background: var(--ok-bg); } .cr-leg.cr-pris { background: color-mix(in srgb, var(--muted) 22%, transparent); }
.cr-leg.cr-conflit { border: 2px solid #e53935; background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .6) 0 4px, transparent 4px 9px); }
.cr-leg.cr-actuel { background: var(--info-bg); border: 2px solid var(--info); }
select.cr-modifie { outline: 2px solid var(--brand); }/* Signalements des techniciens au bureau (RDV à reprendre, infos modifiées) */
.signalements { border: 2px solid #e53935; }
.liste-signalements { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.liste-signalements li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 700px) { .liste-signalements li { grid-template-columns: minmax(0, 1fr); } }
/* Prise de RDV compteurs : charge du technicien sur le bloc (tous chantiers) */
.bloc-charge { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--warn); }/* Planning 📅 parlophone : bâtiment de chaque journée, autre bâtiment en orange, vue calendrier par semaine */
.cr-tete .cr-bat { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.cr-col.cr-autre-bat .cr-tete .cr-bat { background: #f59e0b; color: #1f1300; }
.cr-col.cr-autre-bat .cr-case.cr-libre { background: color-mix(in srgb, #f59e0b 28%, transparent); border-color: #f59e0b; }
.cr-col.cr-autre-bat .cr-tete { border-bottom: 3px solid #f59e0b; }
.cr-leg.cr-leg-autre { background: color-mix(in srgb, #f59e0b 28%, transparent); border-color: #f59e0b; }
.cr-bat-resident b { color: var(--brand-dark); }
.dlg-creneaux .head-row .tabs a { cursor: pointer; }
.cr-cal { display: grid; grid-template-columns: 4.5rem repeat(5, minmax(0, 1fr)); gap: 4px; margin: 8px 0; }
.cr-cal-tete { text-align: center; font-size: .8rem; color: var(--muted); }
.cr-cal-sem { font-size: .75rem; color: var(--muted); align-self: center; }
.cr-cal-jour { min-height: 4.2rem; padding: 4px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr-cal-jour.passe { opacity: .45; }
.cr-cal-jour.auj { border-color: var(--brand); }
.cr-cal-jour.ouvert { outline: 2px solid var(--info); }
.cr-cal-date { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-chip { font: inherit; font-size: .74rem; text-align: left; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--ok); background: var(--ok-bg); color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-chip.cr-chip-autre { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 28%, transparent); }
.cr-chip.cr-chip-creer { border-style: dashed; border-color: var(--info); background: transparent; color: var(--info); font-weight: 700; }
.cr-panneau { margin-top: 6px; }.dlg-creneaux select[data-cr-tech], body.jarvis .dlg-creneaux select[data-cr-tech] { width: auto; min-width: 12rem; max-width: 20rem; }
.cr-occ { display: block; font-size: .7rem; padding: 2px 5px; border-radius: 4px; border: 1px solid #e53935; color: var(--err); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .25) 0 4px, transparent 4px 9px); }
/* Planning 📅 parlophone : créneau libre mais technicien pris ailleurs ce jour-là (autre module) — prenable après confirmation */
.cr-case.cr-ailleurs { cursor: pointer; border: 2px dashed #e53935; font-size: .68rem; color: var(--err);
  background-image: repeating-linear-gradient(135deg, rgba(229, 57, 53, .18) 0 4px, transparent 4px 9px); }
.cr-leg.cr-ailleurs { border: 2px dashed #e53935; color: var(--err); }
/* Gantt « Par technicien » (Enedis colonne) : autre affaire (parlophone, branchement) */
.g-bar.g-autre { background: repeating-linear-gradient(135deg, #6b7280 0 6px, #4b5563 6px 12px); color: #fff; cursor: default; border: 0; opacity: .85; }
.g-bar.g-autre span { font-style: italic; }.tuile-icone .tuile-platine { display: block; width: 1.6em; height: 1.6em; }
/* Fiche compteur : étage + côté / porte bien visibles, bouton « Modifier » explicite */
.emplacement { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.empl-vue { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.empl-case { display: flex; flex-direction: column; gap: 2px; min-width: 9rem; flex: 1 1 9rem; }
.empl-lib { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.empl-case b { font-size: 1.3rem; }
.empl-case i { color: var(--warn); font-style: normal; font-weight: 700; }
.btn-empl { align-self: center; border: 2px solid var(--info); background: transparent; color: var(--info); font-weight: 700; }
.btn-empl:hover { background: var(--info); color: #fff; }
.empl-form .row { align-items: flex-end; }/* Bouton de retour flottant (copie qui reste en haut à gauche quand on descend) */
.retour-flottant, body.jarvis .retour-flottant { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; z-index: 900; margin: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35); background: var(--card); backdrop-filter: blur(6px); animation: retour-apparait .18s ease-out; }
@keyframes retour-apparait { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media print { .retour-flottant { display: none !important; } }/* Dossier colonnes : tableau de bord de l'affaire en tuiles */
.tuiles-affaire { margin-top: 14px; }
.tuiles-affaire .tuile-etape { text-decoration: none; color: inherit; min-height: 9rem; }
.tuiles-affaire .tuile-etape-icone { font-size: 2.4rem; }
.tuiles-affaire .tuile-etape-titre { font-size: 1.2rem; }
.tuiles-affaire .tuile-etape.tuile-alerte { border-color: var(--warn); }
.tuiles-affaire .tuile-etape-res .barre { margin-top: 6px; }
.tuiles-affaire .jauge-globale { height: 14px; }
.panneau-affaire { margin-top: 10px; }
.panneau-titre { margin: 10px 0; }
/* bouton « Retour au tableau de bord de l'affaire » : reste collé sous la barre du haut quand on descend */
.panneau-affaire .btn-retour-affaire, body.jarvis .panneau-affaire .btn-retour-affaire { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--barre-haut, 0px) + 10px); z-index: 850;
  display: flex; width: fit-content; font-weight: 700; padding: 10px 18px; border: 2px solid var(--brand); border-radius: 14px; background: var(--card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
body.panneau-affaire-ouvert .retour-flottant { display: none !important; }.tuiles-affaire .tuile-etape-res .barre { display: block; width: 100%; }
/* Tuiles de l'affaire : pastille (nombre d'actions à faire) */
.tuiles-affaire .tuile-pastille { position: absolute; top: 12px; right: 14px; min-width: 1.9rem; height: 1.9rem; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: #e53935; color: #fff; box-shadow: 0 0 0 3px rgba(229, 57, 53, .25); }
.notes-ajout { align-items: flex-end; margin-bottom: 8px; }.tuiles-affaire .barre-lib { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: .9rem; }
.tuiles-affaire .barre-lib b { font-size: 1.05rem; }
.btn-retour-prioritaire { font-size: 1.1rem; font-weight: 700; padding: 10px 20px; border: 2px solid var(--brand); border-radius: 14px; }
.cartes-rdv-cpt { margin: 6px 0 12px; }
/* préparation facturation parlophone : « Relevé signé » + « Ajouter une facture » côte à côte, puis la liste des factures */
.pf-actions { display: flex; gap: 12px; align-items: stretch; margin: 10px 0 18px; }
.pf-actions .gros-bouton-rdv { margin: 0; flex: 0 1 30rem; min-width: 0; }
@media (max-width: 760px) { .pf-actions { flex-wrap: wrap; } }
button.gros-bouton-rdv { font: inherit; text-align: left; cursor: pointer; }
.gros-bouton-rdv.gbr-facture { border-color: #40c8ff; background: linear-gradient(135deg, rgba(64, 200, 255, .2), rgba(164, 194, 41, .1)); }
.gros-bouton-rdv.gbr-facture .gbr-icone { animation: none; }
.gros-bouton-rdv:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.6); }
.b-facture { background: rgba(64, 200, 255, .2); color: #2aa6e8; border: 1px solid rgba(64, 200, 255, .45); }
.pf-factures { margin: 0 0 18px; }
.pf-factures h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-factures h3 .badge { font-size: .85rem; font-weight: 600; }
/* page d'une facture : un bloc replié par combiné, bouton « Copier le texte » dans l'en-tête */
.fact-texte { border: 1px solid rgba(64, 200, 255, .3); border-radius: 10px; margin: 8px 0; background: rgba(64, 200, 255, .04); }
.fact-texte summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; flex-wrap: wrap; }
.fact-texte summary::-webkit-details-marker { display: none; }
.fact-texte summary::before { content: '▸'; color: var(--muted); }
.fact-texte[open] summary::before { content: '▾'; }
.fact-texte .fact-titre { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.fact-texte textarea { display: block; width: calc(100% - 24px); margin: 0 12px 12px; font: .92rem/1.45 ui-monospace, Consolas, monospace; resize: vertical; }
/* parlophone : commentaires des techniciens sur leurs RDV — encadré bien visible du chantier, pastille des tuiles, tableau des RDV */
.card.commentaires-tech { border: 2px solid #ffb84d !important; box-shadow: 0 0 26px rgba(255, 184, 77, .3), inset 0 0 18px rgba(255, 184, 77, .08) !important;
  background: linear-gradient(135deg, rgba(255, 184, 77, .1), rgba(255, 184, 77, .02)) !important; }
.card.commentaires-tech h2 { color: #ffb84d !important; }
.liste-commentaires { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.liste-commentaires li { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 184, 77, .35); background: rgba(255, 184, 77, .07); display: grid; gap: 6px; }
.cm-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cm-texte { margin: 0; padding: 6px 12px; border-left: 3px solid #ffb84d; font-size: 1.05rem; line-height: 1.45; white-space: normal; }
.cm-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.cm-tache { flex: 0 1 auto; }
.cm-tache[open] { flex: 1 1 100%; order: 3; }
.cm-tache > summary { display: inline-flex; list-style: none; cursor: pointer; }
.cm-tache > summary::-webkit-details-marker { display: none; }
.cm-tache[open] > summary { margin-bottom: 6px; }
.cm-qui { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 184, 77, .45); background: rgba(255, 184, 77, .08); }
.cm-qui-titre { font-weight: 700; color: #ffb84d; }
.cm-qui-pers { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-qui input[name="note"] { flex: 1 1 16rem; min-width: 0; }
.liste-signalements .cm-tache { display: inline-block; vertical-align: top; }
.liste-signalements .cm-tache[open] { display: block; margin-top: 6px; white-space: normal; }
.pastille-comm { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: rgba(255, 184, 77, .2);
  border: 1px solid #ffb84d; color: #ffb84d; vertical-align: middle; }
.rdv-comm { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; padding: 4px 8px; border-radius: 8px; white-space: normal; min-width: 12rem; max-width: 22rem;
  font-size: .85rem; line-height: 1.35; background: rgba(255, 184, 77, .12); border: 1px solid rgba(255, 184, 77, .5); }
.rdv-comm small { display: block; opacity: .75; margin-top: 2px; }
.rdv-comm-ico { flex: none; }
tr.avec-comm > td:first-child { box-shadow: inset 4px 0 0 #ffb84d; }
/* tableau des RDV parlophone : « Enregistrer le tableau » reste en bas de l'écran dès qu'une case a changé (gros chantiers : plus besoin de descendre) */
.barre-enregistrer { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.barre-enregistrer .barre-enr-info { display: none; font-weight: 700; color: #ffb84d; }
.barre-enregistrer.flottante { position: fixed; z-index: 50; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0;
  padding: 10px 14px 10px 18px; border-radius: 14px; border: 2px solid #ffb84d; background: rgba(8, 14, 24, .94); box-shadow: 0 8px 30px rgba(0, 0, 0, .55), 0 0 22px rgba(255, 184, 77, .3);
  max-width: calc(100vw - 24px); }
.barre-enregistrer.flottante .barre-enr-info { display: inline; }
/* CanBot pose les questions (n° de facture, date, bâtiments) */
.cb-dialog { border: 2px solid #40c8ff; border-radius: 16px; padding: 0; width: min(92vw, 30rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .35), 0 0 30px rgba(64, 200, 255, .25); }
.cb-dialog::backdrop { background: rgba(10, 20, 30, .45); }
.cb-dialog form { padding: 14px 18px 16px; display: grid; gap: 10px; }
.cb-tete { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.cb-tete .cb-robot { font-size: 1.6rem; }
.cb-tete .cb-x { margin-left: auto; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.cb-etape { display: grid; gap: 10px; }
.cb-bulle { margin: 0; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: rgba(64, 200, 255, .14); border: 1px solid rgba(64, 200, 255, .5); color: inherit; line-height: 1.4; }
.cb-boutons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cb-bats { display: grid; gap: 6px; }
.cb-bats label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; margin: 0; padding: 6px 10px;
  border: 1px solid rgba(64, 200, 255, .25); border-radius: 10px; cursor: pointer; }
.cb-bats label input { width: auto; margin: 0; flex: none; }
.cb-bats label:has(input:checked) { border-color: #40c8ff; background: rgba(64, 200, 255, .12); }
.cb-autre-date { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
