/* Charte Scènes & Cinés (www.scenesetcines.fr) : bandeau bleu nuit, logo blanc,
   vert Théâtres #42b58c, or Concerts #d6a546, bleu Cinémas #0098ca ; Oswald (titres) et Open Sans (texte). */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/open-sans.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 300 800; font-display: swap; src: url(fonts/open-sans-italic.woff2) format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 200 700; font-display: swap; src: url(fonts/oswald.woff2) format("woff2"); }

:root {
  --sc-nuit: #07151b; --sc-vert: #42b58c; --sc-or: #d6a546; --sc-bleu: #0098ca;
  --bg: #f4f6f7; --card: #fff; --ink: #14191c; --muted: #5f6b72; --line: #dde3e6;
  /* bleu Cinémas assombri pour garder un contraste suffisant avec du texte blanc */
  --brand: #007ba5; --brand-d: #005d7d; --ok: #23805d; --warn: #96680f; --err: #b42318;
  /* Bandeau du haut (surchargé par les chartes .theme-*) */
  --top-bg: linear-gradient(120deg, #0d2536 0%, #12324a 55%, #17445f 100%);
  --top-accent: linear-gradient(90deg, #0098ca, #42b58c);
  --nav-on: #0098ca;
  --radius: 10px;
  --title: "Oswald", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
html.t-petite { font-size: 14.5px; } html.t-grande { font-size: 18px; }
body { margin: 0; font: .9375rem/1.55 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
.wrap { margin: 0 auto; padding: 0 clamp(14px, 2.2vw, 36px); }
.w-centree .wrap { max-width: 1180px; padding: 0 18px; }
.narrow { max-width: 560px; margin: 40px auto; }
main.wrap { padding-top: 22px; padding-bottom: 40px; }
h1, h2 { font-family: var(--title); font-weight: 500; letter-spacing: .01em; }
h1 { font-size: 1.75rem; margin: 0 0 16px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.muted, .hint { color: var(--muted); font-size: .9rem; }
.hint { background: #eef7fa; border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 4px; margin: 6px 0; }

.top { background: var(--top-bg); color: #fff; position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--top-accent); }
/* Chartes de base : couleurs d'accent (--brand) et bandeau (--top-*) */
.theme-ardoise  { --brand: #3c5a71; --brand-d: #2a4356; --top-bg: linear-gradient(120deg, #1b2630 0%, #27353f 55%, #33454f 100%); --top-accent: linear-gradient(90deg, #5f8299, #9ab6c9); --nav-on: #9ab6c9; }
.theme-vert     { --brand: #147a59; --brand-d: #0d5d44; --top-bg: linear-gradient(120deg, #10291f 0%, #164034 55%, #1c5346 100%); --top-accent: linear-gradient(90deg, #2f9c75, #7fc6a8); --nav-on: #7fc6a8; }
.theme-bordeaux { --brand: #8e2f4a; --brand-d: #6d2039; --top-bg: linear-gradient(120deg, #280f16 0%, #3b1620 55%, #4e1d2a 100%); --top-accent: linear-gradient(90deg, #b3476a, #e0a0b2); --nav-on: #e0a0b2; }
/* Charte Scènes & Cinés (thème de son espace) */
.theme-scenesetcines .top { background: var(--sc-nuit) url(brand/bandeau.jpg) center / cover; }
.theme-scenesetcines .top::after { background: linear-gradient(90deg, var(--sc-vert) 0 33.33%, var(--sc-or) 33.33% 66.66%, var(--sc-bleu) 66.66%); }
.brand-nom { font-family: var(--title); font-weight: 500; font-size: 1.25rem; letter-spacing: .02em; white-space: nowrap; }
.brand img { max-width: 180px; object-fit: contain; }
.top .bar { display: flex; align-items: center; gap: 22px; min-height: 64px; padding-bottom: 4px; flex-wrap: wrap; }
.top a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--title); font-weight: 500; font-size: 1.15rem; letter-spacing: .02em; }
.brand img { height: 44px; width: auto; display: block; }
.brand span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.35); }
.top nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; font-weight: 600; }
.top nav a { padding: 6px 11px; border-radius: 6px; opacity: .9; white-space: nowrap; }
.top nav a:hover, .top nav a.on { background: rgba(255,255,255,.14); opacity: 1; }
.top nav a.on { box-shadow: inset 0 -2px 0 var(--nav-on); }
@media (max-width: 640px) { .brand span { display: none; } }
/* Écrans moyens : menu resserré pour tenir sur une ligne */
@media (min-width: 761px) and (max-width: 1360px) { .top .bar { gap: 14px; } .top nav a { padding: 6px 7px; font-size: .92rem; } }
/* Sous-menu du menu principal (Marchés publics) : bouton comme un lien du menu, panneau blanc déroulant */
.nav-groupe { position: relative; display: flex; }
.nav-groupe-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 0; border-radius: 6px; background: transparent; color: #fff;
  font: inherit; font-weight: inherit; opacity: .9; cursor: pointer; white-space: nowrap; }
.nav-groupe-btn svg { transition: transform .2s; }
.nav-groupe-btn:hover, .nav-groupe.ouvert .nav-groupe-btn, .nav-groupe-btn.on { background: rgba(255,255,255,.14); opacity: 1; }
.nav-groupe-btn.on { box-shadow: inset 0 -2px 0 var(--nav-on); }
.nav-groupe.ouvert .nav-groupe-btn svg { transform: rotate(180deg); }
.nav-sous { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(7, 21, 27, .22); flex-direction: column; gap: 2px; }
.nav-sous::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }   /* passerelle de survol */
.nav-groupe.ouvert .nav-sous { display: flex; }
@media (hover: hover) and (min-width: 761px) { .nav-groupe:hover .nav-sous { display: flex; } .nav-groupe:hover .nav-groupe-btn svg { transform: rotate(180deg); } }
.top nav .nav-sous a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--ink); opacity: 1; font-weight: 500; box-shadow: none; }
.top nav .nav-sous a:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand-d); }
.top nav .nav-sous a.on { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-d); font-weight: 700; box-shadow: none; }
@media (min-width: 761px) and (max-width: 1360px) { .nav-groupe-btn { padding: 6px 7px; font-size: .92rem; } }
@media (min-width: 761px) and (max-width: 1200px) { .brand span { display: none; } }
.top .user { font-size: .85rem; opacity: .9; white-space: nowrap; }
.foot { color: var(--muted); font-size: .8rem; padding-bottom: 30px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card > h2:first-child { margin-top: 0; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.grow { flex: 1; }

.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 7px; padding: 9px 16px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-d); }
.btn.secondary { background: #e3f2f8; color: var(--brand); }
.btn.secondary:hover { background: #cde8f3; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.ghost:hover { background: #eef6f9; }
.btn.ok { background: var(--ok); }
.btn.danger { background: var(--err); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.hidden { display: none !important; }

.flash { padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; border: 1px solid; }
.flash.ok { background: #e8f6ee; border-color: #b6e2c8; color: #14532d; }
.flash.warn { background: #fff4e0; border-color: #f2d49b; color: #7a4a00; }
.flash.err { background: #fdecea; border-color: #f4b7b1; color: #8a1c13; }

.form label { display: block; font-size: .88rem; font-weight: 600; color: #344054; }
.form label.check { font-weight: 500; display: flex; align-items: center; gap: 8px; padding-top: 22px; }
.form label.check input { width: auto; margin: 0; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #c8d0db; border-radius: 7px; font: inherit; background: #fff; color: var(--ink);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #8fcbe2; border-color: var(--brand); }
.form > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid2 > * { margin-top: 0 !important; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f8fafc; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table.rows td { padding: 6px 6px; }
table.rows input, table.rows select { margin-top: 0 !important; }
.w60 { width: 64px !important; } .w70 { width: 76px !important; }
.total { font-weight: 700; }
.total.good { color: var(--ok); } .total.bad { color: var(--err); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #e3f2f8; color: var(--brand); white-space: nowrap; }
.badge.ok { background: #e1f4ea; color: var(--ok); }
.badge.warn { background: #fff0d6; color: var(--warn); }
.badge.err { background: #fde3e0; color: var(--err); }
.badge.grey { background: #eceff3; color: #555; }
.badge.violet { background: #efe9fb; color: #4f3593; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }

.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 15px; text-decoration: none; color: var(--muted); border-radius: 7px 7px 0 0; font-weight: 600; }
.tabs a.on { color: var(--brand); background: var(--card); border: 1px solid var(--line); border-bottom: 2px solid var(--card); margin-bottom: -2px; }

.kv { display: grid; grid-template-columns: 220px 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }

.regime { border: 1px solid #b3dcec; background: #eef8fc; border-radius: 8px; padding: 12px 14px; }
.regime[data-regime=dispense] { background: #eef8f1; border-color: #b6e2c8; }
.regime[data-regime=formalisee] { background: #fff4e0; border-color: #f2d49b; }
.regime ul { margin: 6px 0 4px 18px; padding: 0; }
.regime small { color: var(--muted); }

/* Formulaire guidé */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; counter-reset: s; }
.steps li { counter-increment: s; background: #e9edf3; color: #5b6676; padding: 6px 12px; border-radius: 99px; font-size: .85rem; cursor: pointer; }
.steps li::before { content: counter(s) ". "; font-weight: 700; }
.steps li.current { background: var(--brand); color: #fff; }
.steps li.done { background: #cde8f3; color: var(--brand-d); }
body.js .wizard .step { display: none; }
body.js .wizard .step.active { display: block; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin: 4px 0 30px; }
body:not(.js) .wizard .steps, body:not(.js) #btn-prev, body:not(.js) #btn-next { display: none; }
body:not(.js) #btn-save { display: inline-block; }
dl.recap { display: grid; grid-template-columns: 260px 1fr; gap: 6px 16px; margin: 0; }
dl.recap dt { color: var(--muted); font-size: .88rem; }
dl.recap dd { margin: 0; white-space: pre-wrap; }
@media (max-width: 640px) { dl.recap { grid-template-columns: 1fr; } }

pre.code { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 8px; overflow: auto; font-size: .85rem; }
.rank1 { background: #f0faf4; }
.excluded { color: #8a8f98; text-decoration: line-through; }
.excluded td:last-child, .excluded td.keep { text-decoration: none; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.doc-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.doc-item h3 { margin: 0; }
.doc-item p { margin: 0; color: var(--muted); font-size: .88rem; flex: 1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

@media print {
  .top, .foot, .tabs, .actions, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

/* Utilisateurs et choix du mot de passe */
input.copy { width: 100%; padding: 8px 10px; border: 1px solid #c8d0db; border-radius: 7px; font: .85rem ui-monospace, Menlo, monospace; background: #f7f9fc; }
form.inline select { margin: 0; padding: 4px 6px; border: 1px solid #c8d0db; border-radius: 6px; font: inherit; background: #fff; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: .86rem; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }
.pw-match { min-height: 1.3em; margin: 4px 0 0; }
.pw-match.ok { color: var(--ok); }
@media (max-width: 520px) { .pw-rules { grid-template-columns: 1fr; } }
.form textarea.mono { font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; }

/* Contrôle de conformité */
.stat.conf-err b { color: var(--err); } .stat.conf-warn b { color: var(--warn); } .stat.conf-ok b { color: var(--ok); }
.conf-list { list-style: none; margin: 0 0 8px; padding: 0; }
.conf-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.conf-item:last-child { border-bottom: 0; }
.conf-item > .badge { flex: 0 0 auto; min-width: 104px; text-align: center; margin-top: 2px; }
.conf-body { flex: 1; min-width: 0; }
.conf-body .muted { margin-top: 2px; }
.conf-ref { font-size: .8rem; color: var(--muted); margin-top: 3px; font-style: italic; }
.conf-item form.inline { flex: 0 0 auto; }
.conf-comment { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--sc-or); background: #fbf7ec; border-radius: 4px; }
.conf-link { text-decoration: none; font-family: "Open Sans", sans-serif; font-size: 1rem; vertical-align: middle; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .conf-item { flex-wrap: wrap; } .conf-item > .badge { min-width: 0; } }

/* Création : point de départ et assistant guidé */
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 18px; }
.start-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.start-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.start-card.reco { border: 2px solid var(--sc-vert); }
.start-card strong { font-family: var(--title); font-weight: 500; font-size: 1.2rem; }
.start-card span { color: var(--muted); font-size: .92rem; }
.start-card .badge { align-self: flex-start; }
.start-ico { font-size: 1.8rem; }
body.js .assistant .q-step { display: none; }
body.js .assistant .q-step.active { display: block; }
.q-titre { font-size: 1.45rem !important; margin-bottom: 6px !important; }
.q-aide { color: var(--muted); margin: 0 0 14px; }
.choix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choix { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: #fff; font-weight: 600; font-size: .95rem; }
.choix:hover { border-color: var(--brand); }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix:has(input:checked) { border: 2px solid var(--brand); background: #eef7fa; }
.choix:has(input:focus-visible) { outline: 2px solid #8fcbe2; }
.choix-ico { font-size: 1.5rem; }
.fs { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 12px 0 0; }
.fs legend { font-weight: 600; font-size: .9rem; padding: 0 6px; color: #344054; }
.fs label.check { padding-top: 6px; font-weight: 400; }
.redac { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.redac .btn { font-weight: 500; }

/* Fenêtres de correction */
.conf-item > .btn { flex: 0 0 auto; }
dialog.conf-dlg { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 0; border-radius: 12px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
dialog.conf-dlg::backdrop { background: rgba(7, 21, 27, .55); }
.dlg-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-head h2 { margin: 0; flex: 1; font-size: 1.2rem; }
.dlg-head .badge { margin-top: 4px; }
.dlg-x { border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.dlg-body { padding: 16px 20px 20px; }
.dlg-pourquoi { background: #f6f8f9; border-left: 3px solid var(--sc-or); padding: 10px 12px; border-radius: 4px; margin-bottom: 14px; font-size: .92rem; }
.dlg-auto { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #e8f6ee; border-radius: 8px; margin-bottom: 12px; }
.dlg-help { display: block; color: var(--muted); margin-top: 3px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dlg-total { margin: 8px 0 0; } .dlg-total strong.bad { color: var(--err); }
.sugg-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sugg { text-align: left; border: 1px dashed #b3dcec; background: #f4fafc; border-radius: 6px; padding: 5px 9px; font: inherit; font-size: .85rem; color: var(--brand-d); cursor: pointer; }
.sugg:hover { background: #e3f2f8; } .sugg.used { opacity: .5; }
.conf-dlg table.rows input, .conf-dlg table.rows select { width: 100%; padding: 6px 8px; border: 1px solid #c8d0db; border-radius: 6px; font: inherit; }

/* Guide juridique */
.titre-lien { color: inherit; text-decoration: none; }
.guide-search input[type=search] { width: min(420px, 70vw); padding: 8px 10px; border: 1px solid #c8d0db; border-radius: 7px; font: inherit; }
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; }
.themes-grid h3 { font-family: var(--title); font-weight: 500; font-size: 1.05rem; color: var(--brand-d); margin: 14px 0 6px; }
.fiche-liste { list-style: none; margin: 0; padding: 0; }
.fiche-liste li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fiche-liste li:last-child { border-bottom: 0; }
.fiche { max-width: 900px; }
.fiche-titre { font-size: 1.6rem !important; }
.fiche-resume { font-size: 1.05rem; color: var(--brand-d); border-left: 4px solid var(--sc-vert); padding: 6px 12px; background: #f3faf6; border-radius: 4px; }
.fiche h3 { font-family: var(--title); font-weight: 500; font-size: 1.1rem; margin-top: 20px; }
.fiche ol, .fiche ul { padding-left: 20px; } .fiche li { margin: 4px 0; }
.refs { columns: 2; } @media (max-width: 640px) { .refs { columns: 1; } }
.voir { list-style: none; padding-left: 0 !important; }
.decision { max-width: 820px; }
.decision-q { font-size: 1.2rem; font-weight: 600; margin: 14px 0; }
.decision-choix { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.decision-choix .btn { text-align: left; padding: 12px 16px; font-size: 1rem; }
.decision-res { border-radius: 8px; padding: 14px 16px; border: 1px solid var(--line); }
.decision-res.res-ok { background: #f0faf4; border-color: #b6e2c8; }
.decision-res.res-warn { background: #fff8eb; border-color: #f2d49b; }
.decision-res.res-err { background: #fdf0ee; border-color: #f4b7b1; }
.decision-res h3 { margin: 8px 0 6px; font-size: 1.15rem; }
.guide-lien { font-size: .82rem; white-space: nowrap; }

/* Publication */
.pub-etape { display: flex; gap: 16px; align-items: flex-start; }
.pub-etape > div { flex: 1; min-width: 0; }
.pub-num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--title); font-size: 1.1rem; }
.pub-champs { display: grid; grid-template-columns: 260px 1fr; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pub-champs dt { padding: 9px 12px; background: #f6f8f9; font-weight: 600; font-size: .88rem; border-bottom: 1px solid var(--line); }
.pub-champs dd { margin: 0; padding: 9px 12px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.pub-val { flex: 1; white-space: normal; }
.btn.copied { background: #e1f4ea; color: var(--ok); }
@media (max-width: 700px) { .pub-champs { grid-template-columns: 1fr; } .pub-champs dt { border-bottom: 0; } }

/* Suivi d'exécution */
.exec-titulaire { margin: 6px 0 12px; }
.jauge { height: 6px; background: #e6eaed; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.jauge.petite { display: inline-block; width: 70px; vertical-align: middle; margin: 0 6px 0 0; }
.jauge i { display: block; height: 100%; background: var(--sc-vert); }
.jauge i.mid { background: var(--sc-or); } .jauge i.bad { background: var(--err); }
.exec-alertes { list-style: none; padding: 0; margin: 0 0 12px; }
.exec-alertes li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.exec-ligne { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.exec-ligne:last-child { border-bottom: 0; }
.exec-ajout { margin-top: 12px; }
.exec-ajout summary { list-style: none; display: inline-block; }
.exec-ajout summary::-webkit-details-marker { display: none; }
.exec-ajout[open] summary { margin-bottom: 12px; }
.mini-date { padding: 3px 6px; border: 1px solid #c8d0db; border-radius: 6px; font: inherit; font-size: .85rem; }
.exec h3 { margin-top: 18px; }
.etapes-import { padding-left: 20px; } .etapes-import li { margin: 8px 0; }
details.card > summary { cursor: pointer; }
.login-oubli { margin: 12px 0 0; font-size: .92rem; }
/* Session verrouillée */
.verrou { text-align: center; }
.verrou .form { text-align: left; }
.verrou-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e8f1f6; color: var(--brand-d); margin: 4px auto 10px; }

/* Tableau de bord : niveau d'attention des marchés en cours */
:root { --att-err: var(--err); --att-warn: #d68a00; --att-ok: var(--ok); }   /* couleurs des niveaux d'attention */
.att-filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.att-chip b { font-weight: 700; }
.att-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.att-chip.att-err i { background: var(--att-err); } .att-chip.att-warn i { background: var(--att-warn); } .att-chip.att-ok i { background: var(--att-ok); }
.att-chip.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #eef7fa; }
.att-chip:disabled { opacity: .45; cursor: default; }
/* Tableau de bord : bandeau de synthèse des marchés en cours (pleine largeur, compteurs cliquables) */
.synthese { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 18px; margin-bottom: 20px; }
.synthese-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.synthese-tete h2 { margin: 0; }
.synthese-tout { margin-left: auto; font-size: .92rem; white-space: nowrap; }
.synthese-corps { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 16px; }
.synthese-corps[hidden] { display: none; }
.synthese-corps > .muted { grid-column: 1 / -1; margin: 0; }
.synthese-niveaux, .synthese-etapes { display: grid; gap: 8px; }
.synthese-niveaux { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.synthese-etapes { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-left: 16px; border-left: 1px solid var(--line); }
.synthese-corps a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; background: #f6f8f9; }
.synthese-corps a:hover, .synthese-corps a:focus-visible { border-color: var(--brand); }
.synthese b { font-family: var(--title); font-size: 1.75rem; font-weight: 500; line-height: 1.1; }
.synthese-corps a span { font-size: .84rem; color: var(--muted); }
.synthese-corps a.vide { opacity: .55; }
.synthese-total { background: var(--card) !important; }
.synthese-niveau { border-left-width: 4px !important; }
.synthese-niveau span { display: flex; align-items: center; gap: 6px; }
.synthese-niveau.att-err { border-left-color: var(--att-err); background: #fff8f7; } .synthese-niveau.att-err b { color: var(--err); }
.synthese-niveau.att-warn { border-left-color: var(--att-warn); background: #fffbf3; } .synthese-niveau.att-warn b { color: var(--warn); }
.synthese-niveau.att-ok { border-left-color: var(--att-ok); }
.synthese-etape-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.synthese-etape-niveaux { display: flex; gap: 4px; min-height: 1.25rem; }
.att-point { flex: 0 0 auto; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--att-ok); }
.att-err .att-point { background: var(--att-err); } .att-warn .att-point { background: var(--att-warn); }
.att-n { padding: 0 6px; border-radius: 99px; font-size: .72rem; font-weight: 700; line-height: 1.25rem; color: #fff !important; }
.att-n.att-err { background: var(--att-err); } .att-n.att-warn { background: var(--att-warn); }
/* Liste des marchés filtrée par niveau ou étape : colonne Attention */
.att-cellule { white-space: nowrap; } .att-cellule .att-point { margin-right: 6px; }
.att-cellule.att-err a { color: var(--err); } .att-cellule.att-warn a { color: var(--warn); }
@media (max-width: 1100px) {
  .synthese-corps { grid-template-columns: 1fr; }
  .synthese-etapes { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .synthese { padding: 14px; }
  .synthese-tete { flex-wrap: wrap; }
  .synthese-tout { margin-left: 0; width: 100%; }
  .synthese-niveaux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .synthese-etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .synthese-etape-nom { font-size: .74rem !important; letter-spacing: 0; text-transform: none; }
}
@media print { .att-filtres { display: none; } }

/* Agent en charge */
.agent-ligne { font-size: .88rem; margin-top: 4px; color: var(--muted); }
.agent-ligne strong { color: var(--ink); }
.agent-changer { display: inline; }
.agent-changer summary { display: inline; cursor: pointer; color: var(--brand); text-decoration: underline; margin-left: 4px; }
.agent-changer[open] form { margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.agent-changer label { min-width: 240px; }
.att-chip.att-moi input { margin: 0; width: auto; }
.nowrap { white-space: nowrap; }

/* Menu engrenage : options de présentation */
.top .bar { position: relative; }
.prefs { position: relative; }
.prefs summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; opacity: .9; }
.prefs summary::-webkit-details-marker { display: none; }
.prefs summary:hover, .prefs[open] summary { background: rgba(255,255,255,.16); opacity: 1; }
.prefs[open] summary svg { transform: rotate(45deg); }
.prefs summary svg { transition: transform .2s; }
.prefs-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 300px; max-width: calc(100vw - 24px); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; font-size: .88rem; }
.prefs-titre { display: block; font-family: var(--title); font-weight: 500; font-size: 1.05rem; margin-bottom: 6px; }
.prefs-menu fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.prefs-menu legend { font-weight: 600; color: #344054; margin-bottom: 4px; padding: 0; }
.prefs-choix { display: flex; background: #eef2f4; border-radius: 7px; padding: 2px; gap: 2px; }
.prefs-choix label { flex: 1; cursor: pointer; }
.prefs-choix input { position: absolute; opacity: 0; pointer-events: none; }
.prefs-choix span { display: block; text-align: center; padding: 5px 6px; border-radius: 5px; line-height: 1.25; }
.prefs-choix input:checked + span { background: var(--card); color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.prefs-choix input:focus-visible + span { outline: 2px solid var(--brand); }
.prefs-note { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }

/* Menu toujours visible */
.menu-fixe .top { position: sticky; top: 0; z-index: 40; }

/* Densité compacte */
.d-compacte .card { padding: 13px 15px; margin-bottom: 12px; }
.d-compacte th, .d-compacte td { padding: 5px 8px; }
.d-compacte main.wrap { padding-top: 14px; }
.d-compacte h1 { margin-bottom: 10px; font-size: 1.55rem; }
.d-compacte .stats { gap: 10px; margin-bottom: 12px; }
.d-compacte .stat { padding: 9px 12px; }
.d-compacte .stat b { font-size: 1.45rem; }
.d-compacte .grid2 { gap: 12px; }
.d-compacte .top .bar { min-height: 54px; }
.d-compacte .brand img { height: 36px; }
@media print { .prefs { display: none; } }
@media (max-width: 640px) {
  .prefs { position: static; }
  .prefs-menu { left: 12px; right: 12px; width: auto; max-width: none; top: calc(100% - 2px); }
}

/* Messages : icône du menu, onglet Échanges, page Messages */
.msg-icone { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; opacity: .9; }
.msg-icone:hover, .msg-icone.on { background: rgba(255,255,255,.16); opacity: 1; }
.msg-icone b { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sc-or); color: var(--sc-nuit); font-size: .7rem; line-height: 18px; text-align: center; }
.pastille-nl { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--sc-or); color: var(--sc-nuit); font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }
.fil { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fbfcfc; max-width: 900px; }
.msg.mien { background: #eef7fa; border-color: #cde4ee; margin-left: auto; }
.msg.nouveau { border-left: 4px solid var(--sc-or); }
.msg header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.msg time { color: var(--muted); font-size: .8rem; }
.msg-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; }
.msg.mien .msg-avatar { background: var(--sc-vert); }
.msg-suppr { margin-left: auto; }
button.lien { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; text-decoration: underline; }
button.lien:hover { color: var(--err); }
.msg-texte { overflow-wrap: anywhere; }
.msg-dest { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.msg-form { border-top: 1px solid var(--line); padding-top: 14px; }
.msg-prevenir { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.msg-prevenir legend { font-weight: 600; font-size: .88rem; color: #344054; margin-bottom: 4px; padding: 0; }
.msg-prevenir label.check { padding-top: 0; font-weight: 500; }
.fils { display: flex; flex-direction: column; }
.fil-ligne { display: block; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.fil-ligne:hover { background: #f6f9fa; }
.fil-ligne.non-lu { background: #fffaf0; }
.fil-tete { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fil-objet { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-date { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.fil-extrait { display: block; margin-top: 2px; font-size: .9rem; }
.non-lu .fil-extrait { font-weight: 600; }
.fil-meta { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* ---------- En-tête sur téléphone : menu repliable ---------- */
.menu-mobile { display: none; }
@media (max-width: 760px) {
  .top .bar { gap: 8px; min-height: 56px; flex-wrap: nowrap; }
  .brand img { height: 34px; }
  .menu-mobile { display: grid; gap: 4px; align-content: center; width: 40px; height: 40px; padding: 0 9px; background: transparent; border: 0; border-radius: 8px; cursor: pointer; order: -1; }
  .menu-mobile span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-mobile[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-mobile[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-mobile[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 45; flex-direction: column; background: var(--sc-nuit); padding: 8px 12px 14px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
  .top nav.ouvert { display: flex; }
  .top nav a { padding: 12px 12px; font-size: 1.05rem; }
  .nav-groupe { flex-direction: column; }
  .nav-groupe-btn { justify-content: space-between; padding: 12px 12px; font-size: 1.05rem; width: 100%; text-align: left; }
  .nav-sous { position: static; min-width: 0; margin: 0 0 6px 12px; padding: 0 0 0 10px; background: transparent; border: 0; border-left: 2px solid rgba(255,255,255,.2);
    border-radius: 0; box-shadow: none; }
  .nav-sous::before { display: none; }
  .nav-groupe.on .nav-sous { display: flex; }
  .top nav .nav-sous a { color: #fff; padding: 10px 12px; font-size: 1rem; }
  .top nav .nav-sous a:hover, .top nav .nav-sous a.on { background: rgba(255,255,255,.14); color: #fff; }
  .top .user { margin-left: auto; font-size: .8rem; }
  .user-nom { display: none; }
  .brand span { display: none; }
}

/* ---------- Véhicules ---------- */
.titre-section { margin: 22px 0 12px; }
.immat { display: inline-block; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 700; letter-spacing: .04em; background: #fff; color: #111; border: 1.5px solid #222;
  border-left: 7px solid #0055a4; border-right: 7px solid #0055a4; border-radius: 4px; padding: 0 6px; font-size: .9em; line-height: 1.5; white-space: nowrap; }
.immat-grand { font-size: 1.25rem; padding: 2px 10px; }
.btn-grand { padding: 14px 22px; font-size: 1.05rem; font-weight: 600; text-align: center; }
.parc-encours { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border-left: 5px solid var(--sc-or); }
.liste-resa { display: flex; flex-direction: column; }
.resa-ligne { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.resa-ligne:last-child { border-bottom: 0; }
.resa-info { flex: 1; min-width: 200px; color: var(--ink); text-decoration: none; }
.resa-info .badge { margin-left: 4px; }
.aide-agenda { margin-top: 10px; }
.aide-agenda summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.vehicules-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 18px; }
.vehicule-carte { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
a.vehicule-carte:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); border-color: var(--brand); }
.vehicule-carte.v-warn { border-left-color: #d68a00; } .vehicule-carte.v-err { border-left-color: var(--err); }
.vehicule-carte.v-inactif { opacity: .75; }
.vehicule-carte.choix .btn { margin-top: 8px; }
.vc-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vc-alerte { font-size: .82rem; padding-left: 12px; position: relative; }
.vc-alerte::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.vc-alerte.m-err::before { background: var(--err); } .vc-alerte.m-warn::before { background: #d68a00; }
.vignettes { display: flex; flex-wrap: wrap; gap: 12px; }
.vignettes > div { display: flex; flex-direction: column; gap: 3px; width: 130px; font-size: .8rem; }
.vignette { position: relative; display: grid; place-items: center; width: 130px; height: 100px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f4f6f7; text-decoration: none; color: var(--ink); }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.vignette.doc img { object-position: top; background: #fff; }   /* première page d'un document : le haut de la page */
.vignette-type { position: absolute; right: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; background: var(--err); color: #fff; font-size: .65rem; font-weight: 700; line-height: 1.5; }
.vignettes.petites .vignette-type { display: none; }
.vignettes.petites { margin-top: 6px; } .vignettes.petites .vignette { width: 56px; height: 44px; }
tr.ligne-alerte td { background: #fff8ec; }
.zone-danger summary { cursor: pointer; color: var(--err); font-weight: 600; }

/* Réservation et carnet de bord (téléphone d'abord) */
.resa-form, .trajet-form { max-width: 620px; }
.creneau { border: 0; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.creneau legend { font-weight: 600; font-size: .88rem; color: #344054; margin-bottom: 4px; padding: 0; }
.creneau input { width: 100%; padding: 10px; border: 1px solid #c8d0db; border-radius: 7px; font: inherit; background: #fff; color: var(--ink); min-height: 44px; }
.resa-detail .resa-quand { font-size: 1.15rem; font-weight: 600; margin: 4px 0 14px; }
.resa-actions { margin-top: 14px; }
.trajet-entete { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.champ-grand { font-size: 1.4rem !important; font-weight: 700; letter-spacing: .04em; text-align: center; min-height: 54px; }
.km-parcourus { text-align: center; margin: -4px 0 8px; min-height: 1.2em; }
.trajet-form fieldset { border: 0; padding: 0; margin: 4px 0 10px; }
.trajet-form legend { font-weight: 600; font-size: .88rem; color: #344054; margin-bottom: 6px; padding: 0; }
.choix-boutons { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-boutons label { flex: 1 1 auto; }
.choix-boutons input { position: absolute; opacity: 0; pointer-events: none; }
.choix-boutons span { display: block; text-align: center; padding: 11px 10px; border: 1px solid #c8d0db; border-radius: 8px; font-weight: 600; cursor: pointer; background: #fff; }
.choix-boutons input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.choix-boutons input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.photo-bouton { display: block; border: 2px dashed #b9c6cd; border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; background: #f8fafb; font-weight: 600 !important; }
.photo-bouton input { display: block; margin: 8px auto 0; font-size: .85rem; }
.apercu-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.apercu-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.trajet-form details { margin: 6px 0 12px; } .trajet-form details summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }

/* Planning */
.legende-planning { font-size: .85rem; color: var(--muted); }
.planning { min-width: 860px; table-layout: fixed; }
.planning th:first-child { width: 170px; }
.planning td { height: 58px; position: relative; padding: 4px; vertical-align: top; }
.planning td.aujourdhui, .planning th.aujourdhui { background: #f2f9fc; }
.planning td.passe { background: #fafafa; }
.pl-resa { display: block; font-size: .74rem; line-height: 1.3; background: #e3e9ec; color: var(--ink); border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-resa.pl-moi { background: var(--brand); color: #fff; }
.pl-resa.pl-attente { background: #fff0d6; color: var(--warn); border: 1px dashed #d68a00; }
.legende-planning .pl-resa { display: inline-block; margin-right: 6px; }
.pl-ajout { position: absolute; right: 4px; bottom: 3px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); text-decoration: none; font-weight: 700; opacity: 0; }
.planning td:hover .pl-ajout, .pl-ajout:focus { opacity: 1; background: #e3f2f8; }
.planning-liste { display: none; }
.pl-ligne { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pl-ligne .pl-resa { flex: 0 0 auto; }
@media (max-width: 760px) {
  .planning-grille { display: none; }
  .planning-liste { display: block; }
  .planning-liste .card { padding: 12px 14px; margin-bottom: 10px; }
  .planning-liste .card.aujourdhui { border-left: 4px solid var(--brand); }
  .planning-liste h3 { margin: 0 0 6px; }
}

/* Comparatif achat / LOA / LLD */
.cmp-colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .cmp-colonnes { grid-template-columns: 1fr; } }
.cmp-col { border-top: 4px solid var(--line); }
.cmp-col.c-achat { border-top-color: var(--sc-vert); } .cmp-col.c-loa { border-top-color: var(--sc-or); } .cmp-col.c-lld { border-top-color: var(--sc-bleu); }
.cmp-col label { margin-bottom: 8px; }
.cmp-resultats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 700px) { .cmp-resultats { grid-template-columns: 1fr; } }
.cmp-res { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; border-left: 5px solid var(--line); }
.cmp-res.c-achat { border-left-color: var(--sc-vert); } .cmp-res.c-loa { border-left-color: var(--sc-or); } .cmp-res.c-lld { border-left-color: var(--sc-bleu); }
.cmp-res.meilleur { background: #f0faf5; }
.cmp-res b { font-size: 1.5rem; font-family: var(--title); font-weight: 500; }
.cmp-nom { font-weight: 600; }
.cmp-graphe { width: 100%; height: auto; max-height: 300px; margin: 6px 0 12px; font-size: 11px; }
.cmp-graphe text { fill: var(--muted); }
.cmp-graphe .grille { stroke: var(--line); stroke-width: 1; }
.cmp-graphe .serie { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.cmp-graphe .s-achat { stroke: var(--sc-vert); fill: var(--sc-vert); } .cmp-graphe polyline.s-achat { fill: none; }
.cmp-graphe .s-loa { stroke: var(--sc-or); fill: var(--sc-or); } .cmp-graphe polyline.s-loa { fill: none; }
.cmp-graphe .s-lld { stroke: var(--sc-bleu); fill: var(--sc-bleu); } .cmp-graphe polyline.s-lld { fill: none; }
.cmp-detail tr.total td { border-top: 2px solid var(--ink); }
.cmp-form .hint ul { margin: 6px 0; padding-left: 20px; }

/* Cibles tactiles confortables sur téléphone */
@media (max-width: 760px) {
  .form input, .form select, .form textarea { min-height: 44px; font-size: 16px; }   /* 16 px : évite le zoom automatique d'iOS */
  .btn { min-height: 44px; }
  .btn.small { min-height: 36px; }
  .resa-ligne .btn { flex: 1 1 100%; text-align: center; }
  .parc-encours .btn { width: 100%; }
  h1 { font-size: 1.45rem; }
}
.vehicule-carte { text-align: left; align-items: stretch; }
.vehicule-carte.choix .btn { width: 100%; }
.planning tbody th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink); background: var(--card); }

/* ---------- Tableau de bord : deux colonnes et grands boutons ---------- */
.accueil-entete h1 { margin-bottom: 2px; }
.accueil-entete p { margin: 0 0 16px; }
.accueil { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .accueil { grid-template-columns: 1fr; } }
.accueil-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 18px; }
.accueil-droite { display: flex; flex-direction: column; gap: 18px; }

.panneau { --c: var(--brand); --c-fond: #eaf5fa; --c-fonce: var(--brand-d);
  position: relative; border-radius: 18px; padding: 18px; margin-bottom: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--c-fond) 0, var(--card) 260px); overflow: hidden; }
.accueil-droite .panneau { margin-bottom: 0; }
.panneau::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.panneau.p-bleu { --c: var(--sc-bleu); --c-fond: #e6f4fa; --c-fonce: #005d7d; }
.panneau.p-vert { --c: var(--sc-vert); --c-fond: #e6f6ef; --c-fonce: #1d6b4e; }
.panneau.p-or { --c: var(--sc-or); --c-fond: #fbf3e2; --c-fonce: #7a5410; }
.panneau-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panneau-tete h2 { margin: 0; font-size: 1.35rem; color: var(--c-fonce); }
.panneau-tete small { color: var(--muted); font-size: .85rem; }
.panneau-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); flex: 0 0 auto; }

.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.accueil-droite .tuiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tuile { --c: var(--brand); --c-clair: #e3f2f8; --c-fonce: var(--brand-d);
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 118px; padding: 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(7,21,27,.04); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tuile:hover, .tuile:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(7,21,27,.10); border-color: var(--c); }
.tuile:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 2px; }
.tuile.t-bleu { --c: #0098ca; --c-clair: #e1f3fa; --c-fonce: #005d7d; }
.tuile.t-vert { --c: #2f9c75; --c-clair: #e2f5ed; --c-fonce: #1d6b4e; }
.tuile.t-or { --c: #c99330; --c-clair: #fbf0dc; --c-fonce: #7a5410; }
.tuile-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--c-clair); color: var(--c-fonce); transition: background .15s, color .15s; }
.tuile:hover .tuile-ico { background: var(--c); color: #fff; }
.tuile-txt { display: flex; flex-direction: column; gap: 2px; }
.tuile-txt strong { font-family: var(--title); font-weight: 500; font-size: 1.15rem; line-height: 1.2; letter-spacing: .01em; }
.tuile-txt small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.tuile-nb { position: absolute; top: 12px; right: 12px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--c); color: #fff; font-size: .8rem; line-height: 26px; text-align: center; font-weight: 700; }
.tuile.primaire { background: linear-gradient(135deg, var(--c) 0%, var(--c-fonce) 100%); border-color: transparent; color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.tuile.primaire .tuile-ico { background: rgba(255,255,255,.18); color: #fff; }
.tuile.primaire:hover .tuile-ico { background: rgba(255,255,255,.28); }
.tuile.primaire .tuile-txt small { color: rgba(255,255,255,.85); }
.tuile.primaire .tuile-nb { background: #fff; color: var(--c-fonce); }
.tuile.large { flex-direction: row; align-items: center; min-height: 0; margin-bottom: 12px; }
.panneau .stats.mini { margin: 14px 0 0; }
.panneau .stats.mini .stat { background: rgba(255,255,255,.75); padding: 10px 14px; }
.panneau .stats.mini .stat b { font-size: 1.4rem; color: var(--c-fonce); }
.prochaine { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.8); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.prochaine > span:nth-child(2) { flex: 1; min-width: 0; font-size: .9rem; }
.prochaine:hover { border-color: var(--c); }
.mini-alertes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: .85rem; }
.mini-alertes a { color: var(--ink); text-decoration: none; }
.mini-alertes a:hover strong { color: var(--brand); }
.d-compacte .tuile { min-height: 96px; padding: 12px; gap: 6px; }
.d-compacte .panneau { padding: 14px; }
@media (max-width: 760px) {
  .tuiles, .accueil-droite .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tuile { min-height: 108px; padding: 13px; }
  .tuile-txt strong { font-size: 1.05rem; }
  .panneau { padding: 14px; border-radius: 16px; }
  .accueil-cartes { grid-template-columns: 1fr; }
}
@media print { .accueil-droite, .tuiles { display: none; } .accueil { display: block; } }
.accueil-gauche .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .accueil-gauche .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Écran étroit : boutons des marchés, puis véhicules et administration, puis le détail des marchés */
@media (max-width: 1100px) {
  .accueil { display: flex; flex-direction: column; gap: 0; }
  .accueil-gauche { display: contents; }
  .accueil-gauche > .panneau { order: 1; }
  .accueil-droite { order: 2; margin-bottom: 18px; }
  .accueil-gauche > :not(.panneau) { order: 3; }
}

/* Portail de l'adresse principale */
.portail main.wrap { padding-top: 34px; }
.portail-intro { max-width: 760px; margin-bottom: 26px; }
.portail-intro h1 { font-size: 2rem; margin-bottom: 8px; }
.portail-intro p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.portail-tuiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 26px; }
.portail-pied { margin-top: 30px; }
/* Nom d'entité long dans le bandeau sur téléphone */
@media (max-width: 760px) {
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-nom { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 1.02rem; }
  .brand img { max-width: 120px; }
}

/* Courrier : fiche (informations et pièces à gauche, traitement et historique à droite) */
.courrier-objet { font-size: 1.05rem; color: var(--muted); }
.courrier-grille { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 18px; align-items: start; margin-top: 14px; }
.courrier-obs { margin: 14px 0 0; padding: 10px 12px; background: #f6f8f9; border-left: 3px solid var(--line); border-radius: 4px; }
.courrier-pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.courrier-pieces li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.courrier-pieces a { display: inline-flex; align-items: center; gap: 8px; }
.courrier-ext { display: inline-block; min-width: 42px; padding: 2px 6px; border-radius: 4px; background: #eef3f5; color: var(--err); font-size: .72rem; font-weight: 700; text-align: center; }
.courrier-actions .actions { margin-top: 8px; }
.courrier-histo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .9rem; }
.courrier-histo li { padding-left: 12px; border-left: 2px solid var(--line); }
.courrier-annuler summary { cursor: pointer; color: var(--muted); }
@media (max-width: 900px) { .courrier-grille { grid-template-columns: 1fr; } .courrier-grille .kv { grid-template-columns: 1fr; gap: 2px; } .courrier-grille .kv dd { margin-bottom: 6px; } }
/* Tableau de bord : panneau Courrier */
.panneau.p-violet { --c: #7a5ac8; --c-fond: #f1ecfb; --c-fonce: #4f3593; }
.tuile.t-violet { --c: #7a5ac8; --c-clair: #efe9fb; --c-fonce: #4f3593; }
/* Courrier : numérisation, corbeille « À enregistrer », saisie avec aperçu du scan, champs remplis automatiquement */
.courrier-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.courrier-saisie.avec-apercu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: 18px; align-items: start; }
.courrier-apercu { position: sticky; top: 12px; }
.courrier-apercu h2 { font-size: 1rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.courrier-apercu iframe { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.courrier-apercu img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.auto-rempli { background: #f6f1ff !important; border-color: #b9a4e8 !important; }
.tabs .onglet-droite { margin-left: auto; }
.corbeille-entrees { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.depot { flex: 1 1 280px; margin: 0; }
.depot-zone { display: block; padding: 18px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); cursor: pointer; }
.depot-zone.survol, .depot-zone:hover { border-color: var(--brand); background: #eef7fa; color: var(--ink); }
.depot-zone input { display: none; }
.corbeille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.corbeille-scan { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.corbeille-apercu { display: grid; place-items: center; height: 160px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f4f6f7; }
.corbeille-apercu img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.corbeille-infos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.corbeille-infos strong { overflow-wrap: anywhere; }
.corbeille-infos .muted { font-size: .82rem; }
.scan-dlg { width: min(720px, 94vw); border: 0; border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.scan-dlg::backdrop { background: rgba(7, 21, 27, .55); }
.scan-dlg h2 { margin-top: 0; }
.scan-pages { display: flex; flex-wrap: wrap; gap: 10px; min-height: 40px; margin: 12px 0; }
.scan-page { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; }
.scan-page canvas { display: block; max-width: 120px; max-height: 120px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.scan-boutons { display: flex; gap: 4px; }
.scan-boutons button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); cursor: pointer; font-size: .95rem; }
@media (max-width: 900px) { .courrier-saisie.avec-apercu { grid-template-columns: 1fr; } .courrier-apercu { position: static; } .courrier-apercu iframe { height: 60vh; } }
.profils-aide p { margin: 0 0 6px; font-size: .86rem; }

/* Courrier : circuit de validation (copies, annotation) */
.courrier-copies { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 180px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.courrier-copies label.check { margin: 0; font-weight: normal; }
.courrier-annotation { border-left: 4px solid #7a5ac8; background: #f6f2fd; padding: 8px 12px; border-radius: 4px; margin: 10px 0 0; }
.courrier-validation { border: 2px solid #7a5ac8; }

/* ---------- Statistiques : graphiques en HTML/CSS (palette validée daltonisme : bleu #2a78d6, orange #eb6834) ---------- */
.st-filtres { flex-wrap: wrap; gap: 10px 14px; }
.st-filtres [hidden] { display: none; }
.st-portee { margin: -6px 0 14px; }
.st-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.st-tuile { margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.st-tuile strong { font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.st-tuile small { font-size: .85rem; }
.st-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.st-carte { margin: 0; min-width: 0; }
.st-carte.large { grid-column: 1 / -1; }
.st-carte header h2 { margin: 0 0 2px; font-size: 1.15rem; }
.st-carte header p { margin: 0 0 14px; font-size: .88rem; }
.st-vide, .st-note { font-size: .88rem; }
.st-barre.s1 { background: #2a78d6; }
.st-barre.s2 { background: #eb6834; }
.st-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; font-size: .9rem; color: var(--muted); }
.st-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-legende i.s1 { background: #2a78d6; }
.st-legende i.s2 { background: #eb6834; }
.st-barre { display: block; outline: none; transition: filter .12s; }
.st-barre:hover, .st-barre:focus-visible { filter: brightness(1.15); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
/* Colonnes par mois */
.st-col { position: relative; display: flex; height: 240px; padding: 22px 0 26px 44px; }
.st-axe { position: absolute; left: 0; top: 22px; bottom: 26px; width: 100%; pointer-events: none; }
.st-axe span { position: absolute; left: 0; width: 100%; height: 0; border-top: 1px solid var(--line); }
.st-axe em { position: absolute; left: 0; top: 0; transform: translateY(-50%); padding-right: 6px; background: var(--card); font-style: normal; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-zone { position: relative; flex: 1; display: flex; align-items: stretch; gap: 2px; }
.st-groupe { flex: 1; min-width: 0; display: flex; gap: 2px; justify-content: center; position: relative; }
.st-groupe > small { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.st-pile { flex: 0 1 24px; display: flex; align-items: flex-end; height: 100%; }
.st-pile .st-barre { width: 100%; border-radius: 4px 4px 0 0; min-height: 0; position: relative; }
.st-pile .st-barre b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; font-size: .75rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.st-col.serre .st-groupe > small { font-size: .65rem; }
.st-col.serre .st-pile .st-barre b { display: none; }
/* Barres horizontales classées */
.st-barres { display: flex; flex-direction: column; gap: 10px; }
.st-ligne { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; gap: 10px; align-items: center; }
.st-lib { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pistes { display: flex; flex-direction: column; gap: 3px; }
.st-piste { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-piste .st-barre { height: 16px; border-radius: 0 4px 4px 0; min-width: 2px; flex: 0 0 auto; max-width: calc(100% - 64px); }
.st-piste b { font-size: .85rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Données en tableau */
.st-donnees { margin-top: 14px; font-size: .88rem; }
.st-donnees summary { cursor: pointer; color: var(--brand); }
.st-donnees table, .st-chaleur { font-variant-numeric: tabular-nums; }
.st-donnees td.num, .st-donnees th.num, .st-chaleur .num { text-align: right; }
/* Tableau de chaleur (consommation) : rampe séquentielle bleue */
.st-chaleur { font-size: .85rem; }
.st-chaleur th[scope=row] { font-weight: 600; white-space: nowrap; }
.st-chaleur td { white-space: nowrap; }
.st-chaleur td small { display: block; font-size: .72rem; opacity: .85; }
.st-chaleur td.vide { color: #b9c1c6; }
.st-chaleur td.n1 { background: #cde2fb; } .st-chaleur td.n2 { background: #9ec5f4; } .st-chaleur td.n3 { background: #6da7ec; }
.st-chaleur td.n4 { background: #2a78d6; color: #fff; } .st-chaleur td.n5 { background: #184f95; color: #fff; }
/* Infobulle commune (assets/app.js) */
.st-bulle { position: fixed; z-index: 1000; pointer-events: none; background: #14191c; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .85rem; max-width: 280px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
@media (max-width: 640px) {
  .st-col { height: 200px; padding-left: 36px; }
  .st-pile .st-barre b { display: none; }
  .st-groupe > small { font-size: .68rem; overflow: visible; }
  .st-groupe > small span { display: none; }
  .st-col .st-groupe:nth-child(even) > small { visibility: hidden; }
  .st-ligne { grid-template-columns: 1fr; gap: 3px; }
  .st-tuile strong { font-size: 1.5rem; }
}
@media print {
  .st-barre, .st-legende i, .st-chaleur td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .st-donnees { display: none; }
  .st-carte { break-inside: avoid; }
}

/* Exports Excel, Word, PDF */
.export-liens { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.export-liens > .muted { font-size: .85rem; margin-right: 2px; }
.export-barre { display: flex; justify-content: flex-end; margin: -4px 0 8px; }

/* ---------- Salles et équipements ---------- */
.sl-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 16px; font-size: 1.05rem; }
.sl-compte { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .95rem; }
.sl-compte b { font-size: 1.15rem; }
.sl-compte.libre { background: #e1f4ea; color: var(--ok); }
.sl-compte.occupe { background: #fde3e0; color: var(--err); }
.sl-compte.option { background: #fff0d6; color: var(--warn); }
.sl-site { margin: 22px 0 10px; font-size: 1.2rem; }
.sl-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.sl-carte { margin: 0; border-left: 6px solid var(--ok); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sl-carte.sl-occupe { border-left-color: var(--err); }
.sl-carte.sl-option { border-left-color: #eda100; }
.sl-carte header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sl-carte h3 { margin: 0; font-size: 1.08rem; }
.sl-etat { font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: #e1f4ea; color: var(--ok); }
.sl-occupe .sl-etat { background: #fde3e0; color: var(--err); }
.sl-option .sl-etat { background: #fff0d6; color: var(--warn); }
.sl-actuel { margin: 0; font-size: .92rem; line-height: 1.35; }
.sl-actuel i, .sl-pastille { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.sl-jour { margin: 0; font-size: .8rem; }
/* Frise de la journée */
.sl-frise { position: relative; height: 14px; background: #eef1f3; border-radius: 4px; }
.sl-frise.grande { height: 34px; margin-top: 18px; background: #f1f4f6; }
[data-sl-jours][hidden] { display: none; }
.sl-bloc { position: absolute; top: 0; bottom: 0; background: var(--c); border-radius: 4px; box-shadow: 0 0 0 1px #fff; overflow: hidden; color: #fff; text-decoration: none; }
.sl-bloc.option, .sl-puce.option { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 45%, #fff) 6px 12px); }
.sl-bloc span { display: block; padding: 0 6px; font-size: .78rem; line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.sl-bloc:hover, .sl-bloc:focus-visible { filter: brightness(1.1); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); z-index: 2; }
.sl-repere { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.sl-heure { position: absolute; top: -17px; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; }
.sl-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0; font-size: .85rem; color: var(--muted); }
.sl-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sl-legende i.option { background: repeating-linear-gradient(135deg, #7d868c 0 3px, #d6dbde 3px 6px); }
/* Planning jour */
.sl-ligne-jour { display: grid; grid-template-columns: minmax(120px, 18%) 1fr; gap: 12px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sl-ligne-jour + .sl-ligne-jour .sl-heure { display: none; }
.sl-ligne-jour + .sl-ligne-jour .sl-frise.grande { margin-top: 0; }
.sl-nom { display: flex; flex-direction: column; line-height: 1.2; }
.sl-nom small { font-size: .78rem; }
/* Planning semaine */
.sl-semaine { table-layout: fixed; min-width: 860px; }
.sl-semaine th:first-child { width: 150px; }
.sl-semaine th[scope=row] small { display: block; font-weight: 400; font-size: .75rem; }
.sl-semaine td { vertical-align: top; padding: 4px; position: relative; min-height: 46px; }
.sl-semaine .auj { background: #f1f8fb; }
.sl-puce { display: block; margin-bottom: 4px; padding: 4px 6px 4px 8px; border-radius: 4px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--ink); text-decoration: none; font-size: .8rem; line-height: 1.25; }
.sl-puce.option { color: var(--ink); border-left-style: dashed; }
.sl-puce small { display: block; color: var(--muted); font-size: .72rem; }
.sl-semaine th[scope=row], .sl-mois th[scope=row] { text-transform: none; letter-spacing: normal; font-size: .88rem; color: var(--ink); font-weight: 600; }
.sl-ajout { display: block; opacity: .35; text-align: center; color: var(--muted); text-decoration: none; border: 1px dashed transparent; border-radius: 4px; font-size: .9rem; line-height: 20px; }
.sl-semaine td:hover .sl-ajout, .sl-ajout:focus-visible { opacity: 1; border-color: var(--line); color: var(--brand); }
/* Planning mois : rampe séquentielle */
.sl-mois { font-size: .78rem; }
.sl-mois th, .sl-mois td { padding: 3px 2px; text-align: center; }
.sl-mois th[scope=row] { text-align: left; white-space: nowrap; padding-right: 8px; font-size: .85rem; }
.sl-mois td { width: 24px; height: 26px; border: 1px solid #fff; background: #f4f6f7; }
.sl-mois td a { display: block; width: 100%; height: 20px; }
.sl-mois th.we { color: var(--muted); font-weight: 400; }
.sl-mois .auj { box-shadow: inset 0 0 0 2px var(--ink); }
.sl-mois td.n1 { background: #cde2fb; } .sl-mois td.n2 { background: #9ec5f4; } .sl-mois td.n3 { background: #6da7ec; } .sl-mois td.n4 { background: #2a78d6; } .sl-mois td.n5 { background: #184f95; }
.sl-mois td.opt { background: repeating-linear-gradient(135deg, #f4f6f7 0 3px, #d6dbde 3px 6px); }
.sl-mois td.num { width: auto; text-align: right; background: none; padding-left: 8px; }
/* Saisie */
.sl-mat-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 18px; }
.sl-mat-choix label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.sl-mat-choix input { width: 80px; }
.sl-mat-choix small { display: block; }
.sl-materiel { margin-top: 18px; }
@media (max-width: 640px) {
  .sl-filtres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; }
  .sl-filtres label { margin: 0; min-width: 0; }
  .sl-filtres input, .sl-filtres select { width: 100%; min-width: 0; }
  .sl-filtres .export-liens { grid-column: 1 / -1; }
  .sl-ligne-jour { grid-template-columns: 1fr; }
  .sl-bloc span { display: none; }
}
@media print {
  .sl-bloc, .sl-puce, .sl-mois td, .sl-legende i, .sl-carte, .sl-etat { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Import de véhicules */
.pi-map select { min-width: 240px; }
.pi-apercu { font-size: .88rem; }
.pi-apercu tr.pi-err { background: #fdf1ef; }
.pi-apercu tr.pi-existe { background: #fffaf0; }
.pi-apercu small { display: inline-block; max-width: 260px; }

/* ---------- PPI ---------- */
.ppi-synthese td small, .ppi-ops td small { display: block; color: var(--muted); font-size: .75rem; }
.ppi-synthese .auj { background: #f1f8fb; }
.ppi-synthese th[scope=row], .ppi-ops tfoot th, .ppi-comp th[scope=row], .ppi-synthese tfoot th, .ppi-saisie th[scope=row] { text-transform: none; letter-spacing: normal; font-size: .92rem; color: var(--ink); }
.ppi-synthese tfoot td, .ppi-synthese tfoot th, .ppi-ops tfoot td, .ppi-ops tfoot th, .ppi-comp tfoot td, .ppi-comp tfoot th { border-top: 2px solid var(--ink); }
.ppi-prio { display: inline-block; min-width: 26px; text-align: center; font-size: .72rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-right: 6px; background: #eceff3; color: #3c464d; }
.ppi-prio.p1 { background: #fde3e0; color: var(--err); }
.ppi-prio.p2 { background: #fff0d6; color: var(--warn); }
.ppi-saisie input { width: 100%; min-width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.ppi-saisie th.hors { color: var(--muted); }
.ppi-saisie th small { display: block; font-weight: 400; font-size: .7rem; }
.ppi-fin input, .ppi-fin select { width: 100%; }
.ppi-comp { font-size: .85rem; }
.ppi-hausse { color: var(--warn); font-weight: 600; }
.ppi-baisse { color: var(--brand); font-weight: 600; }
.ppi-courante { background: #f1f8fb; }

/* Choix du site d'un véhicule (liste + « Autre site… ») */
.site-choix { display: flex; gap: 8px; flex-wrap: wrap; }
.site-choix select { min-width: 200px; flex: 1; }
.site-choix input { flex: 1; min-width: 180px; }
.site-fiche { margin: 0 0 12px; padding: 10px 12px; background: #f4f8fa; border-radius: 8px; }
.print-only { display: none; }
@media print { .print-only { display: revert; } }

/* =====================================================================================================
   Apparences au choix (menu engrenage → Apparence) : « Apple » (inspirée de macOS / iOS) et « Microsoft »
   (inspirée de Windows 11 / Fluent). Polices système, couleurs, arrondis, ombres, fond, icônes et menus.
   ===================================================================================================== */

/* ---------- Apple ---------- */
/* Fil d'Ariane : pastille en tête de page, maison vers le tableau de bord, étapes cliquables, page courante en couleur */
.ariane { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; width: fit-content; max-width: 100%; margin: 0 0 18px; padding: 5px 16px 5px 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .08); font-size: .95rem; font-weight: 700; color: var(--brand-d); line-height: 1.3; }
.ariane a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; color: var(--ink); font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s; }
.ariane a:hover, .ariane a:focus-visible { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand-d); }
.ariane .ariane-accueil { width: 34px; height: 34px; padding: 0; justify-content: center; background: var(--brand); color: #fff; }
.ariane .ariane-accueil:hover, .ariane .ariane-accueil:focus-visible { background: var(--brand-d); color: #fff; }
.ariane .ariane-accueil .icone { display: block; }
.ariane-sep { color: var(--muted); font-weight: 400; font-size: 1.15rem; padding: 0 3px; }
@media (max-width: 600px) { .ariane { border-radius: 16px; padding-right: 12px; font-size: .9rem; } }
@media print { .ariane { display: none; } }

html.look-apple {
  --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --muted: #6e6e73; --line: #e5e5ea;
  --brand: #0071e3; --brand-d: #0062c4; --ok: #248a3d; --warn: #a05a00; --err: #d70015;
  --sc-bleu: #0071e3; --sc-vert: #34c759; --sc-or: #ff9f0a;
  --radius: 18px;
  --title: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
html.look-apple body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -.01em;
  background: radial-gradient(1100px 620px at 8% -12%, rgba(0, 113, 227, .10), transparent 62%),
              radial-gradient(900px 560px at 100% -6%, rgba(175, 82, 222, .08), transparent 60%), #f5f5f7 fixed;
  -webkit-font-smoothing: antialiased;
}
html.look-apple h1, html.look-apple h2, html.look-apple .brand, html.look-apple .brand-nom, html.look-apple .prefs-titre { font-weight: 600; letter-spacing: -.02em; }
html.look-apple h1 { font-size: 2rem; }
/* Barre du haut translucide sombre, à la manière de la barre de navigation des sites Apple */
html.look-apple .top, html.look-apple.theme-scenesetcines .top { background: rgba(29, 29, 31, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
html.look-apple .top::after { display: none; }
html.look-apple .top nav { font-weight: 400; }
html.look-apple .top nav a { border-radius: 980px; opacity: .85; padding: 6px 12px; }
html.look-apple .top nav a:hover, html.look-apple .top nav a.on { background: rgba(255, 255, 255, .16); box-shadow: none; opacity: 1; }
html.look-apple .card, html.look-apple .stat, html.look-apple .tuile, html.look-apple .panneau, html.look-apple .vehicule-carte, html.look-apple .sl-carte {
  border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06);
}
html.look-apple .panneau { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 22px; }
html.look-apple .panneau::before { display: none; }
html.look-apple .panneau.p-bleu, html.look-apple .tuile.t-bleu { --c: #0071e3; --c-clair: #e8f1fd; --c-fonce: #0058b0; }
html.look-apple .panneau.p-vert, html.look-apple .tuile.t-vert { --c: #248a3d; --c-clair: #e7f6eb; --c-fonce: #1b6b2f; }
html.look-apple .panneau.p-or, html.look-apple .tuile.t-or { --c: #c96a00; --c-clair: #fff2e0; --c-fonce: #8a4a00; }
html.look-apple .panneau.p-violet, html.look-apple .tuile.t-violet { --c: #8e44c4; --c-clair: #f4ebfb; --c-fonce: #6b2e98; }
html.look-apple .panneau-ico { border-radius: 12px; box-shadow: none; }
html.look-apple .tuile { border-radius: 18px; }
html.look-apple .tuile:hover, html.look-apple .tuile:focus-visible { transform: scale(1.015); box-shadow: 0 10px 30px rgba(0, 0, 0, .10); }
html.look-apple .btn { border-radius: 980px; padding: 9px 18px; font-weight: 500; }
html.look-apple .btn.small { padding: 4px 12px; }
html.look-apple .btn.secondary { background: rgba(0, 113, 227, .10); color: #0071e3; }
html.look-apple .btn.secondary:hover { background: rgba(0, 113, 227, .16); }
html.look-apple .btn.ghost { border-color: #d2d2d7; color: #0071e3; background: rgba(255, 255, 255, .6); }
html.look-apple .form input:not([type=checkbox]):not([type=radio]), html.look-apple .form select, html.look-apple .form textarea { border-radius: 10px; border-color: #d2d2d7; padding: 9px 12px; }
html.look-apple .form input:focus, html.look-apple .form select:focus, html.look-apple .form textarea:focus { outline: 4px solid rgba(0, 113, 227, .22); border-color: #0071e3; }
html.look-apple .form label { color: #3a3a3c; font-weight: 500; }
html.look-apple input[type=checkbox], html.look-apple input[type=radio] { accent-color: #0071e3; }
/* Onglets en contrôle segmenté */
html.look-apple .tabs { border-bottom: 0; background: rgba(118, 118, 128, .12); border-radius: 10px; padding: 3px; display: inline-flex; gap: 2px; }
html.look-apple .tabs a { border-radius: 8px; padding: 6px 14px; color: #1d1d1f; font-weight: 500; }
html.look-apple .tabs a.on { background: #fff; border: 0; margin: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); color: #1d1d1f; }
html.look-apple th { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; background: transparent; color: #6e6e73; }
html.look-apple th, html.look-apple td { border-bottom-color: #ececf0; }
html.look-apple .badge { font-weight: 500; }
html.look-apple .flash { border-radius: 14px; border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
html.look-apple .hint { border-left: 0; border-radius: 12px; background: rgba(0, 113, 227, .07); }
html.look-apple .icone { stroke-width: 1.6; }
html.look-apple .prefs-menu { border-radius: 16px; border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .22); background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
html.look-apple .prefs-choix { background: rgba(118, 118, 128, .12); border-radius: 9px; }
html.look-apple .prefs-choix span { border-radius: 7px; }
html.look-apple .prefs-choix input:checked + span { color: #1d1d1f; }

/* ---------- Microsoft ---------- */
html.look-microsoft {
  --bg: #f3f3f3; --card: #fff; --ink: #242424; --muted: #616161; --line: #e0e0e0;
  --brand: #0f6cbd; --brand-d: #115ea3; --ok: #107c10; --warn: #8a5300; --err: #c50f1f;
  --sc-bleu: #0f6cbd; --sc-vert: #107c10; --sc-or: #c19c00;
  --radius: 8px;
  --title: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
html.look-microsoft body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Fond lumineux bleuté, dans l'esprit du fond d'écran de Windows 11 */
  background: radial-gradient(1200px 700px at 88% -14%, rgba(15, 108, 189, .16), transparent 62%),
              radial-gradient(900px 600px at -6% 108%, rgba(0, 120, 212, .10), transparent 60%),
              linear-gradient(180deg, #f6f8fb 0%, #f0f2f5 100%) fixed;
}
html.look-microsoft h1, html.look-microsoft h2, html.look-microsoft .brand, html.look-microsoft .brand-nom, html.look-microsoft .prefs-titre { font-weight: 600; letter-spacing: 0; }
/* Barre d'application de couleur d'accent, comme les applications Microsoft 365 */
html.look-microsoft .top, html.look-microsoft.theme-scenesetcines .top { background: #0f6cbd; }
html.look-microsoft .top::after { display: none; }
html.look-microsoft .top nav { font-weight: 400; }
html.look-microsoft .top nav a { border-radius: 4px; opacity: .92; }
html.look-microsoft .top nav a:hover { background: rgba(255, 255, 255, .14); }
html.look-microsoft .top nav a.on { background: rgba(255, 255, 255, .18); box-shadow: inset 0 -3px 0 #fff; opacity: 1; }
html.look-microsoft .card, html.look-microsoft .stat, html.look-microsoft .tuile, html.look-microsoft .vehicule-carte, html.look-microsoft .sl-carte {
  border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .10);
}
/* Panneaux en matière « acrylique » translucide */
html.look-microsoft .panneau { border-radius: 8px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(30px) saturate(125%); backdrop-filter: blur(30px) saturate(125%); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .10); }
html.look-microsoft .panneau::before { height: 3px; }
html.look-microsoft .panneau.p-bleu, html.look-microsoft .tuile.t-bleu { --c: #0f6cbd; --c-clair: #ebf3fc; --c-fonce: #0c3b5e; }
html.look-microsoft .panneau.p-vert, html.look-microsoft .tuile.t-vert { --c: #107c10; --c-clair: #f1faf1; --c-fonce: #0e4a0e; }
html.look-microsoft .panneau.p-or, html.look-microsoft .tuile.t-or { --c: #b4610a; --c-clair: #fdf6ee; --c-fonce: #6a3a06; }
html.look-microsoft .panneau.p-violet, html.look-microsoft .tuile.t-violet { --c: #5c2e91; --c-clair: #f5effb; --c-fonce: #3b1d5e; }
html.look-microsoft .panneau-ico { border-radius: 6px; box-shadow: none; }
html.look-microsoft .tuile { border-radius: 8px; }
html.look-microsoft .tuile:hover, html.look-microsoft .tuile:focus-visible { transform: none; box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14); }
html.look-microsoft .btn { border-radius: 4px; font-weight: 600; padding: 7px 16px; }
html.look-microsoft .btn.secondary, html.look-microsoft .btn.ghost { background: #fff; color: #242424; border: 1px solid #d1d1d1; }
html.look-microsoft .btn.secondary:hover, html.look-microsoft .btn.ghost:hover { background: #f5f5f5; border-color: #c7c7c7; }
html.look-microsoft .form input:not([type=checkbox]):not([type=radio]), html.look-microsoft .form select, html.look-microsoft .form textarea {
  border-radius: 4px; border: 1px solid #d1d1d1; border-bottom-color: #616161; padding: 7px 10px; }
html.look-microsoft .form input:focus, html.look-microsoft .form select:focus, html.look-microsoft .form textarea:focus { outline: 0; border-bottom: 2px solid #0f6cbd; padding-bottom: 6px; }
html.look-microsoft .form label { color: #424242; }
html.look-microsoft input[type=checkbox], html.look-microsoft input[type=radio] { accent-color: #0f6cbd; }
/* Onglets soulignés (liste d'onglets Fluent) */
html.look-microsoft .tabs { border-bottom: 1px solid #e0e0e0; gap: 4px; }
html.look-microsoft .tabs a { border-radius: 4px 4px 0 0; color: #424242; font-weight: 400; padding: 10px 12px; }
html.look-microsoft .tabs a:hover { background: rgba(0, 0, 0, .04); }
html.look-microsoft .tabs a.on { background: transparent; border: 0; margin: 0; color: #242424; font-weight: 600; box-shadow: inset 0 -3px 0 #0f6cbd; }
html.look-microsoft th { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: #424242; background: #fafafa; }
html.look-microsoft .badge { border-radius: 4px; font-weight: 600; }
html.look-microsoft .flash { border-radius: 4px; border-width: 1px; border-left-width: 4px; }
html.look-microsoft .hint { border-radius: 4px; background: #ebf3fc; border-left-color: #0f6cbd; }
html.look-microsoft .icone { stroke-width: 1.5; }
html.look-microsoft .prefs-menu { border-radius: 8px; border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 0 8px rgba(0, 0, 0, .12), 0 32px 64px rgba(0, 0, 0, .14); }
html.look-microsoft .prefs-choix { background: #f0f0f0; border-radius: 4px; }
html.look-microsoft .prefs-choix span { border-radius: 4px; }
html.look-microsoft .prefs-choix input:checked + span { color: #0f6cbd; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 -2px 0 #0f6cbd; }
@media print {
  html.look-apple body, html.look-microsoft body { background: #fff; }
}

/* ---------- Apparence Apple : icônes d'applications façon iPad (écran d'accueil) ----------
   Carré arrondi en dégradé, pictogramme blanc, nom en dessous, pastille rouge de notification. */
html.look-apple .tuiles, html.look-apple .accueil-droite .tuiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 20px 8px; justify-items: center; }
html.look-apple .tuile, html.look-apple .tuile.primaire {
  background: transparent; border: 0; box-shadow: none; min-height: 0; padding: 4px 2px; gap: 7px; align-items: center; text-align: center;
  width: 100%; max-width: 104px; color: var(--ink); transition: transform .15s;
}
html.look-apple .tuile:hover, html.look-apple .tuile:focus-visible, html.look-apple .tuile.primaire:hover { transform: none; box-shadow: none; background: transparent; }
html.look-apple .tuile:active .tuile-ico { transform: scale(.92); filter: brightness(.9); }
html.look-apple .tuile:focus-visible { outline: 0; }
html.look-apple .tuile:focus-visible .tuile-ico { outline: 3px solid rgba(0, 113, 227, .55); outline-offset: 3px; }
/* Couleur par défaut : celle du module ; les classes ic-… plus bas la remplacent (même spécificité, placées après) */
html.look-apple .tuile-ico, html.look-apple .panneau-ico { --g1: color-mix(in srgb, var(--c) 70%, #fff); --g2: var(--c); }
html.look-apple .tuile-ico, html.look-apple .tuile.primaire .tuile-ico, html.look-apple .tuile:hover .tuile-ico, html.look-apple .panneau-ico {
  width: 64px; height: 64px; border-radius: 15px; /* proportion des icônes iPadOS (≈ 22,5 %) */
  background: linear-gradient(180deg, var(--g1) 0%, var(--g2) 100%); color: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 6px 14px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, filter .12s;
}
html.look-apple .tuile:hover .tuile-ico { transform: translateY(-2px); box-shadow: 0 2px 2px rgba(0, 0, 0, .06), 0 10px 20px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .35); }
html.look-apple .tuile-ico .icone { width: 34px; height: 34px; stroke-width: 2.1; }
html.look-apple .panneau-ico { width: 46px; height: 46px; border-radius: 11px; }
html.look-apple .panneau-ico .icone { width: 26px; height: 26px; stroke-width: 2; }
html.look-apple .tuile-txt { gap: 0; width: 100%; }
html.look-apple .tuile-txt strong, html.look-apple .tuile.primaire .tuile-txt strong { font-family: inherit; font-weight: 500; font-size: .78rem; line-height: 1.2; letter-spacing: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.look-apple .tuile-txt small { display: none; }
/* Pastille de notification rouge, en haut à droite de l'icône */
html.look-apple .tuile-nb, html.look-apple .tuile.primaire .tuile-nb { top: -2px; right: calc(50% - 42px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #ff3b30; color: #fff; font-size: .74rem; line-height: 22px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
/* Couleurs d'icônes, dans l'esprit des applications d'Apple */
html.look-apple .ic-plus      { --g1: #6ee07a; --g2: #28b446; }   /* nouveau, inscrire */
html.look-apple .ic-liste     { --g1: #5ac8fa; --g2: #0a7aff; }
html.look-apple .ic-suivi     { --g1: #64d2ff; --g2: #0a84ff; }
html.look-apple .ic-courrier, html.look-apple .ic-arrivee, html.look-apple .ic-depart { --g1: #3fb3ff; --g2: #0a64f0; }   /* Mail */
html.look-apple .ic-message   { --g1: #6dfa83; --g2: #0bc236; }   /* Messages */
html.look-apple .ic-calendrier, html.look-apple .ic-agenda { --g1: #ffffff; --g2: #f2f2f2; color: #ff3b30; }   /* Calendrier */
html.look-apple .ic-horloge   { --g1: #3a3a3c; --g2: #000000; }   /* Horloge */
html.look-apple .ic-reglages  { --g1: #c7c7cc; --g2: #8e8e93; }   /* Réglages */
html.look-apple .ic-utilisateurs { --g1: #d6c7b1; --g2: #a68f73; } /* Contacts */
html.look-apple .ic-journal   { --g1: #ffd04d; --g2: #ffaa00; }   /* Notes */
html.look-apple .ic-guide     { --g1: #ffb347; --g2: #ff7f00; }   /* Livres */
html.look-apple .ic-graphique { --g1: #7d7aff; --g2: #4b3fd8; }
html.look-apple .ic-cle       { --g1: #8e8e93; --g2: #3a3a3c; }
html.look-apple .ic-retour    { --g1: #6ee07a; --g2: #1f9e3f; }
html.look-apple .ic-salle     { --g1: #ff7aa2; --g2: #ff2d55; }
html.look-apple .ic-voiture   { --g1: #5cdcae; --g2: #00a982; }
html.look-apple .ic-bouclier  { --g1: #5e9bff; --g2: #2647d9; }
html.look-apple .ic-calendrier .icone, html.look-apple .ic-agenda .icone { stroke-width: 2.3; }
@media (max-width: 640px) {
  html.look-apple .tuiles, html.look-apple .accueil-droite .tuiles { grid-template-columns: repeat(4, 1fr); gap: 16px 4px; }
  html.look-apple .tuile-ico { width: 58px; height: 58px; border-radius: 13.5px; }
}

/* Apparence Apple, accueil : chaque module en « widget » iOS (carte blanche arrondie, icône d'application, chiffres en ligne),
   les actions urgentes en bannière de notification — et non en icônes d'écran d'accueil comme les autres tuiles */
html.look-apple .hub { gap: 18px; }
html.look-apple .hub .hub-module.tuile {
  align-items: stretch; text-align: left; max-width: none; padding: 16px 18px 14px; gap: 14px;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 0; border-radius: 22px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .07);
}
html.look-apple .hub .hub-module.tuile:hover, html.look-apple .hub .hub-module.tuile:focus-visible { background: #fff; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 12px 30px rgba(0, 0, 0, .10); }
html.look-apple .hub .hub-tete { gap: 12px; }
html.look-apple .hub .tuile-ico, html.look-apple .hub .tuile:hover .tuile-ico { width: 46px; height: 46px; border-radius: 11px; transform: none; }
html.look-apple .hub .tuile-ico .icone { width: 26px; height: 26px; }
html.look-apple .hub .tuile-txt strong { font-size: 1.06rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); -webkit-line-clamp: 1; }
html.look-apple .hub .tuile-txt small { display: block; font-size: .8rem; color: #6e6e73; line-height: 1.3; }
html.look-apple .hub-chiffres { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px 14px; border-top: 1px solid rgba(0, 0, 0, .07); padding-top: 10px; }
html.look-apple .hub-chiffre { background: transparent; border-radius: 0; padding: 0; }
html.look-apple .hub-chiffre b { font-size: 1.55rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
html.look-apple .hub-chiffre small { color: #6e6e73; font-size: .74rem; }
html.look-apple .hub-chiffre.alerte { background: transparent; }
html.look-apple .hub-chiffre.alerte b { color: #ff3b30; }
html.look-apple .hub-ouvrir { font-weight: 500; font-size: .85rem; color: #0071e3; }
/* Actions urgentes (véhicule à restituer, courrier à valider) : bannière de notification */
html.look-apple .tuile.large, html.look-apple .tuile.primaire.large {
  flex-direction: row; align-items: center; text-align: left; max-width: none; width: 100%; padding: 12px 16px; gap: 14px; margin-bottom: 12px;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .08);
}
html.look-apple .tuile.large .tuile-ico, html.look-apple .tuile.large:hover .tuile-ico { width: 40px; height: 40px; border-radius: 10px; transform: none; }
html.look-apple .tuile.large .tuile-ico .icone { width: 22px; height: 22px; }
html.look-apple .tuile.large .tuile-txt strong { font-size: .95rem; font-weight: 600; -webkit-line-clamp: 1; }
html.look-apple .tuile.large .tuile-txt small { display: block; color: #6e6e73; font-size: .82rem; }
@media (max-width: 640px) {
  html.look-apple .hub .tuile-ico { width: 42px; height: 42px; border-radius: 10px; }
}

/* Filtres appliqués en arrière-plan (formulaires data-auto) : contenu atténué pendant le chargement */
main.chargement { opacity: .55; transition: opacity .15s .1s; }
/* Formulaires appliqués automatiquement : bouton d'envoi inutile (Entrée reste possible dans un champ de recherche) */
form[data-auto] button:not([type=button]):not([name]), form[data-auto] input[type=submit] { display: none; }
html.look-apple .ariane { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-color: rgba(0, 0, 0, .06); }
html.look-microsoft .ariane, html.look-microsoft .ariane a { border-radius: 4px; }
html.look-microsoft .ariane { box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .1); }
html.look-apple .nav-groupe-btn { border-radius: 980px; font-weight: 400; opacity: .85; padding: 6px 12px; }
html.look-apple .nav-groupe-btn.on { box-shadow: none; }
html.look-apple .nav-sous { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-color: rgba(0, 0, 0, .06); border-radius: 14px; }
html.look-apple .top nav .nav-sous a { border-radius: 8px; }
html.look-microsoft .nav-groupe-btn { border-radius: 4px; font-weight: 400; }
html.look-microsoft .nav-groupe-btn.on { background: rgba(255, 255, 255, .18); box-shadow: inset 0 -3px 0 #fff; }
html.look-microsoft .nav-sous, html.look-microsoft .top nav .nav-sous a { border-radius: 4px; }
@media (max-width: 760px) {
  html.look-apple .nav-sous, html.look-microsoft .nav-sous { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
}
@media (max-width: 760px) { html.look-apple .nav-groupe-btn, html.look-microsoft .nav-groupe-btn { padding: 12px; } }

/* Service informatique : fiches, échanges, jauges des disques, page d'assistance */
.si-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.si-fiche aside > * + * { margin-top: 0; }
@media (max-width: 980px) { .si-fiche { grid-template-columns: 1fr; } }
.si-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.si-dl dt { color: var(--muted); font-size: .88rem; }
.si-dl dd { margin: 0; }
.si-fil { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.si-msg { padding: 10px 14px; border-radius: var(--radius); background: #f3f6f8; border: 1px solid var(--line); max-width: 88%; }
.si-msg p { margin: 4px 0 0; }
.si-msg small { color: var(--muted); }
.si-msg.technicien { align-self: flex-end; background: color-mix(in srgb, var(--brand) 9%, #fff); border-color: color-mix(in srgb, var(--brand) 25%, #fff); }
.si-msg.interne { align-self: flex-end; background: #fff8e6; border-color: #f0dca8; border-style: dashed; }
.si-jauge { display: inline-block; vertical-align: middle; width: 70px; height: 8px; border-radius: 99px; background: #e6ebee; overflow: hidden; }
.si-jauge i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.si-jauge.warn i { background: #d99a1f; }
.si-jauge.err i { background: var(--err); }
.si-os::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: 6px; vertical-align: -2px; background: currentColor; opacity: .55;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.si-os.windows { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5.5 10.5 4.5v7H3zM11.5 4.3 21 3v8.5h-9.5zM3 12.5h7.5v7L3 18.5zM11.5 12.5H21V21l-9.5-1.3z'/%3E%3C/svg%3E"); }
.si-os.macos { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.4 12.6c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.1-2.8.9-3.5.9s-1.8-.9-3-.8C7 7.4 5.5 8.3 4.7 9.8c-1.7 2.9-.4 7.2 1.2 9.6.8 1.2 1.7 2.4 2.9 2.4 1.2-.1 1.6-.8 3-.8s1.8.8 3 .8c1.3 0 2.1-1.2 2.9-2.4.9-1.3 1.3-2.6 1.3-2.7 0 0-2.6-1-2.6-4.1zM14.1 5.6c.6-.8 1.1-1.9 1-3-.9 0-2.1.6-2.7 1.4-.6.7-1.1 1.8-1 2.9 1 .1 2.1-.5 2.7-1.3z'/%3E%3C/svg%3E"); }
.si-hors-ligne td { opacity: .62; }
.si-liste { margin: 0; padding-left: 18px; }
.si-liste li + li { margin-top: 4px; }
.si-agents { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.si-agents ol { padding-left: 20px; }
@media (max-width: 860px) { .si-agents { grid-template-columns: 1fr; } }
.si-cle { display: inline-block; padding: 6px 12px; border-radius: 6px; background: #f3f6f8; border: 1px solid var(--line); font-size: 1rem; letter-spacing: .04em; user-select: all; }
.si-assistance { max-width: 820px; margin: 0 auto; }
.si-dem summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.si-dem[open] summary { margin-bottom: 12px; }
.si-repondre textarea { min-height: 60px; }
html.look-apple .ic-ordinateur { --g1: #64d2ff; --g2: #0a84ff; }

/* Accueil après la connexion : un bouton par module, avec ses chiffres du moment */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 4px 0 22px; }
.hub-module { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; min-height: 0; text-decoration: none; color: inherit; }
.hub-tete { display: flex; align-items: center; gap: 14px; }
.hub-module .tuile-ico { width: 52px; height: 52px; flex: 0 0 auto; }
.hub-module .tuile-txt strong { font-size: 1.3rem; color: var(--c-fonce); }
.hub-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.hub-chiffre { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--c-clair); }
.hub-chiffre b { font-size: 1.45rem; line-height: 1.1; color: var(--c-fonce); font-variant-numeric: tabular-nums; }
.hub-chiffre small { color: var(--muted); font-size: .78rem; line-height: 1.25; }
.hub-chiffre.alerte { background: #fdf0e1; }
.hub-chiffre.alerte b { color: #a3520a; }
.hub-ouvrir { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--c-fonce); }
.hub-module:hover .hub-ouvrir { text-decoration: underline; }
.hub-admin { margin-top: 6px; }
.accueil-marches .panneau { margin-bottom: 16px; }
@media (max-width: 600px) { .hub { grid-template-columns: 1fr; } }
.accueil-marches .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .accueil-marches .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Console de la plateforme : modules d'une entité */
.pf-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pf-module { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; border-left: 4px solid #2f9c75; }
.pf-module > span { display: flex; flex-direction: column; min-width: 0; }
.pf-module small { font-size: .78rem; }
.pf-module select { width: auto; flex: 0 0 auto; }
.pf-module.desactive { border-left-color: #c99330; background: #fdf8ee; }
.pf-module.absent { border-left-color: #9aa5ad; opacity: .85; }

/* PPI : fiche annuelle au format des fiches Excel */
.ppi-fiche { font-size: .88rem; }
.ppi-fiche td { vertical-align: top; }
.ppi-fiche td small, .ppi-fiche td .ppi-detail { display: block; color: var(--muted); font-size: .76rem; line-height: 1.35; margin-top: 2px; }
.ppi-fiche .ppi-detail b { font-weight: 600; color: var(--ink); }
.ppi-fiche tr.st-realise td:first-child { box-shadow: inset 3px 0 0 #2f9c75; }
.ppi-fiche tr.st-reporte td:first-child { box-shadow: inset 3px 0 0 #c99330; }
.ppi-fiche tr.excluded td { color: var(--muted); }
.ppi-fiche tr.excluded td strong { text-decoration: line-through; }
.ppi-fiche tfoot th, .ppi-fiche tfoot td { border-top: 2px solid var(--ink); text-transform: none; letter-spacing: normal; font-size: .92rem; color: var(--ink); }
.ppi-prio { margin-right: 0; }
.ppi-actions { position: relative; }
.ppi-actions > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .85rem; list-style: none; white-space: nowrap; }
.ppi-actions > summary::-webkit-details-marker { display: none; }
.ppi-actions[open] > summary { text-decoration: underline; }
.ppi-actions-menu { width: 230px; margin-top: 6px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(7, 21, 27, .12); display: flex; flex-direction: column; gap: 12px; }
.ppi-fiche td:nth-child(5) { min-width: 220px; }
.ppi-fiche th, .ppi-fiche td { padding-left: 8px; padding-right: 8px; }
.ppi-actions-menu form.form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ppi-actions-menu strong { font-size: .85rem; }
.ppi-ajout { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.ppi-ajout .large { grid-column: span 2; }
@media (max-width: 600px) { .ppi-ajout .large { grid-column: auto; } .ppi-actions-menu { width: auto; } }
.ppi-entete { align-items: end; gap: 14px; }
.ppi-entete .grow { flex: 1 1 260px; margin: 0; }
.ppi-signature { margin: 18px 0 0; color: var(--muted); }
.ppi-cellule { color: inherit; text-decoration: none; }
.ppi-cellule:hover { text-decoration: underline; }
.ppi-sites-corresp { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 16px; }
.ppi-sites-corresp label { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.ppi-sites-corresp label span { flex: 0 0 120px; font-weight: 600; }
@media print {
  .ppi-fiche { font-size: 8pt; }
  .ppi-signature { margin-top: 40px; color: #000; }
  .ppi-entete input { border: 0; padding: 0; }
}

/* Facturation : la facture à l'écran, mise en page de la facture type aux couleurs de l'application */
.fact-doc { padding: 0; overflow: hidden; }
.fact-doc > *:not(.fact-tete):not(.table-wrap) { padding-left: 24px; padding-right: 24px; }
.fact-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 20px 24px 18px; background: var(--sc-nuit, #12324a); color: #fff; position: relative; }
.fact-tete::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--brand); }
.theme-scenesetcines .fact-tete::after { background: linear-gradient(90deg, var(--sc-vert) 0 33.33%, var(--sc-or) 33.33% 66.66%, var(--sc-bleu) 66.66%); }
.fact-emetteur { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; }
.fact-emetteur .fact-nom { font-family: var(--title); font-size: 1.45rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.fact-emetteur .muted { color: rgba(255, 255, 255, .7); }
.fact-titre { text-align: right; display: flex; flex-direction: column; }
.fact-titre span { font-family: var(--title); font-size: 1.9rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.fact-titre strong { color: var(--sc-or, #d6a546); font-size: 1rem; margin-top: 6px; }
.fact-banque { margin: 16px 0 0; font-size: .85rem; }
.fact-banque b { color: var(--brand); text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; margin-right: 6px; }
.fact-blocs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.fact-bloc { background: #f1f8fb; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 12px 16px; }
.fact-bloc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 0 0 8px; }
.fact-bloc label { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: .82rem; }
.fact-bloc .kv { margin: 0 0 8px; }
.fact-lignes { margin: 0; }
.fact-lignes thead th { background: var(--sc-nuit, #12324a); color: #fff; font-size: .74rem; letter-spacing: .05em; }
.fact-lignes td { vertical-align: top; }
.fact-lignes td small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.fact-lignes td:first-child { min-width: 260px; }
.fact-lignes input, .fact-lignes textarea, .fact-lignes select { width: 100%; }
.fact-lignes textarea { margin-top: 4px; font-size: .82rem; resize: vertical; min-height: 30px; }
.fact-lignes td.num input { text-align: right; min-width: 80px; }
.fact-lignes tbody tr:nth-child(even) td { background: #f7f9fb; }
.fact-pied { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 24px; margin: 16px 0; align-items: start; }
.fact-notes label { display: flex; flex-direction: column; gap: 4px; }
.fact-totaux { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; font-variant-numeric: tabular-nums; }
.fact-totaux dt { text-align: right; color: var(--muted); }
.fact-totaux dd { margin: 0; text-align: right; font-weight: 600; }
.fact-totaux .fact-ttc { margin-top: 6px; padding: 10px 12px; background: var(--sc-nuit, #12324a); color: #fff; font-size: 1.05rem; font-weight: 700; }
.fact-totaux dt.fact-ttc { border-left: 4px solid var(--sc-or, #d6a546); border-radius: 8px 0 0 8px; }
.fact-totaux dd.fact-ttc { border-radius: 0 8px 8px 0; margin-left: -16px; padding-left: 16px; }
.fact-mentions { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 18px; font-size: .8rem; color: var(--muted); }
.fact-mentions h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 0 0 6px; }
.fact-mentions p { margin: 0 0 4px; }
.fact-doc.avoir .fact-titre span { color: var(--sc-or, #d6a546); }
.fact-actions { gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
/* Saisie d'un brouillon : champs au style des formulaires de l'application */
.fact-saisie input:not([type=checkbox]), .fact-saisie select, .fact-saisie textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: .9rem; color: var(--ink); box-sizing: border-box; }
.fact-saisie textarea { font-size: .84rem; }
.fact-saisie input:focus, .fact-saisie select:focus, .fact-saisie textarea:focus { outline: 2px solid #8fcbe2; border-color: var(--brand); }
.fact-saisie .fact-bloc label { font-weight: 600; color: #344054; }
.fact-case { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.fact-saisie .fact-lignes td { padding-top: 6px; padding-bottom: 6px; }
.fact-saisie .fact-lignes td.num { width: 120px; }
@media (max-width: 760px) {
  .fact-blocs, .fact-pied { grid-template-columns: 1fr; }
  .fact-tete { flex-direction: column; }
  .fact-titre { text-align: left; }
}
html.look-apple .fact-doc { border-radius: 22px; }
html.look-microsoft .fact-tete, html.look-microsoft .fact-lignes thead th, html.look-microsoft .fact-totaux .fact-ttc { background: #0f6cbd; }
@media print {
  .fact-doc { box-shadow: none; border: 0; }
  .fact-tete, .fact-lignes thead th, .fact-totaux .fact-ttc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Utilisateurs : listes de profil et d'apparence de largeur contenue */
.users-liste select { max-width: 250px; width: 100%; text-overflow: ellipsis; }
.users-liste td:nth-child(4) select { max-width: 190px; }

/* Sensibilisation au hameçonnage : choix des destinataires et page didactique */
.phish-utils { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.phish-utils legend { font-weight: 600; padding: 0 6px; }
.phish-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin-top: 8px; max-height: 320px; overflow: auto; }
.phish-grille .case { align-items: flex-start; gap: 8px; padding: 3px 0; font-weight: 400; }
.phish-grille .case span { display: flex; flex-direction: column; line-height: 1.25; }
.phish-reveal { text-align: left; }
.phish-reveal .phish-pastille { width: 54px; height: 54px; border-radius: 50%; background: #fdecec; color: #c0392b; display: grid; place-items: center; font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.phish-reveal h1 { margin: 0 0 10px; }
.phish-reveal h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.phish-indices, .phish-conseils { padding-left: 20px; }
.phish-indices li, .phish-conseils li { margin-bottom: 7px; }

/* Fiches budgétaires */
.budget-neg { color: var(--err); }
.budget-titre-section { margin: 20px 0 8px; font-size: 1.25rem; color: var(--sc-nuit, #12324a); }
.budget-lignes, .budget-billet { font-size: .86rem; }
.budget-lignes td, .budget-billet td { padding: 3px 6px; vertical-align: middle; }
.budget-lignes input, .budget-billet input, .budget-billet select { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .85rem; box-sizing: border-box; }
.budget-lignes input[readonly], .budget-billet input[readonly], .budget-billet select[disabled] { background: #f4f6f8; color: #5b6770; border-color: transparent; }
.budget-lignes .budget-code { max-width: 70px; text-align: center; }
.budget-lignes input.budget-mt, .budget-billet input.budget-mt { text-align: right; }
.budget-billet input.budget-nb { text-align: right; max-width: 80px; }
.budget-lignes td.num, .budget-billet td.num { white-space: nowrap; }
.budget-ecart { color: var(--muted); font-variant-numeric: tabular-nums; }
.budget-lignes tfoot th, .budget-lignes tfoot td, .budget-billet tfoot th, .budget-billet tfoot td { border-top: 2px solid var(--ink); font-weight: 600; }
.budget-nouvelle input { background: #fbfdff; }
.budget-nouvelle input::placeholder { color: #9aa5ad; font-style: italic; }
.budget-suppr { cursor: pointer; color: var(--err); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.budget-suppr input { width: auto; }
.budget-total, .budget-resultat { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.budget-total strong, .budget-resultat strong { font-size: 1.05rem; }
.budget-total span b, .budget-resultat span b { font-variant-numeric: tabular-nums; }
.budget-resultat { background: var(--sc-nuit, #12324a); color: #fff; }
.budget-resultat strong { color: #fff; }
.budget-resultat span b { color: var(--sc-or, #d6a546); }
.budget-synthese table { font-size: .9rem; }
.budget-visa { border-left: 4px solid var(--brand); }
@media (max-width: 760px) { .budget-lignes, .budget-billet { font-size: .8rem; } .budget-total, .budget-resultat { gap: 14px; } }

/* ============================================================
   Animation et vie (micro-interactions, apparitions en cascade,
   accents vivants). Entièrement neutralisé si l'utilisateur
   demande à réduire les animations (prefers-reduced-motion).
   ============================================================ */
@keyframes mp-rise { from { opacity: 0; transform: translateY(22px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes mp-pop { 0% { transform: scale(.5); opacity: 0; } 55% { transform: scale(1.14); } 78% { transform: scale(.96); } 100% { transform: scale(1); opacity: 1; } }
@keyframes mp-sheen { 0% { background-position: 0 0, -70% 0; } 50%, 100% { background-position: 0 0, 180% 0; } }
@keyframes mp-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes mp-spin { to { transform: rotate(360deg); } }
@keyframes mp-swipe { from { left: -60%; } to { left: 130%; } }

/* Transitions cohérentes sur les éléments interactifs */
.btn, .tuile, .hub-module, .start-card, .card, .stat, .panneau, .badge, input, select, textarea, .chip, .tabs a, #nav-principale a {
  transition: transform .18s cubic-bezier(.22, .61, .36, 1), box-shadow .22s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

@media (prefers-reduced-motion: no-preference) {
  /* Apparition en fondu-montée des blocs */
  .card, .panneau, .synthese, .start-card, .stat, .hub-module, .grille-cartes > *, .modules > * {
    animation: mp-rise .62s cubic-bezier(.16, .84, .3, 1.04) both;
  }
  /* Cascade dans les grilles */
  .hub > :nth-child(2), .stats > :nth-child(2), .grille-cartes > :nth-child(2), .modules > :nth-child(2) { animation-delay: .06s; }
  .hub > :nth-child(3), .stats > :nth-child(3), .grille-cartes > :nth-child(3), .modules > :nth-child(3) { animation-delay: .12s; }
  .hub > :nth-child(4), .stats > :nth-child(4), .grille-cartes > :nth-child(4), .modules > :nth-child(4) { animation-delay: .18s; }
  .hub > :nth-child(5), .stats > :nth-child(5), .grille-cartes > :nth-child(5), .modules > :nth-child(5) { animation-delay: .24s; }
  .hub > :nth-child(6), .stats > :nth-child(6), .grille-cartes > :nth-child(6), .modules > :nth-child(6) { animation-delay: .30s; }
  .hub > :nth-child(n+7), .grille-cartes > :nth-child(n+7), .modules > :nth-child(n+7) { animation-delay: .34s; }

  /* Pastilles d'attention : petite entrée qui attire l'œil */
  .badge.warn, .badge.err { animation: mp-pop .4s both; }

  /* Tuiles mises en avant : dégradé qui respire */
  .tuile.primaire { background-size: 200% 200%; animation: mp-rise .62s both, mp-gradient 6s ease 1s infinite; }

  /* Bandeau tricolore Scènes & Cinés : reflet qui balaie, plus marqué */
  .theme-scenesetcines .top::after {
    background-image: linear-gradient(90deg, var(--sc-vert) 0 33.33%, var(--sc-or) 33.33% 66.66%, var(--sc-bleu) 66.66%), linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .72) 50%, transparent 60%);
    background-size: 100% 100%, 55% 100%;
    background-repeat: no-repeat;
    animation: mp-sheen 5s ease-in-out 1.2s infinite;
  }

  /* Reflet qui traverse les tuiles au survol */
  .tuile::before, .hub-module::before {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-18deg); opacity: 0;
  }
  .tuile:hover::before, .hub-module:hover::before { opacity: 1; animation: mp-swipe .75s ease; }
}

/* Relief au survol — franc et net */
.tuile, .hub-module { position: relative; overflow: hidden; }
.tuile:hover, .hub-module:hover, .start-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 24px 46px color-mix(in srgb, var(--c, var(--brand)) 30%, rgba(7, 21, 27, .18));
  border-color: color-mix(in srgb, var(--c, var(--brand)) 60%, var(--line));
}
.tuile-ico { transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), background .15s, color .15s; }
.tuile:hover .tuile-ico, .hub-module:hover .tuile-ico { transform: scale(1.18) rotate(-6deg); }
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(7, 21, 27, .14); }

/* Boutons : réactivité tactile marquée + halo qui suit le curseur */
.btn { position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(180px 180px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .5), transparent 60%);
}
.btn:hover::after { opacity: 1; }

/* Champs : halo net au focus */
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 24%, transparent); }

/* Liens de navigation : soulignement animé au survol (l'onglet actif garde son repère) */
#nav-principale a { position: relative; }
#nav-principale a:not(.on)::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; opacity: .75; transition: transform .22s cubic-bezier(.22, .61, .36, 1);
}
#nav-principale a:not(.on):hover::after { transform: scaleX(1); }

/* En-tête : ombre portée dès qu'on défile, sous-navigation en effet verre */
.top { transition: box-shadow .25s ease; }
body.mp-scrolled .top { box-shadow: 0 8px 24px rgba(7, 21, 27, .20); }
.tabs { backdrop-filter: saturate(140%) blur(6px); -webkit-backdrop-filter: saturate(140%) blur(6px); }

/* Chiffres nets pendant les compteurs animés */
.stat b, .tuile-nb, .hub-chiffre b { font-variant-numeric: tabular-nums; }

/* Indicateur de chargement réutilisable */
.mp-spin { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; border: 2px solid color-mix(in srgb, var(--brand) 28%, transparent); border-top-color: var(--brand); border-radius: 50%; animation: mp-spin .7s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Pop-up « fiche » (iframe à fond obscurci) ---------- */
.mp-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 3vh 16px; opacity: 0; transition: opacity .18s ease; }
.mp-modal.on { opacity: 1; }
.mp-modal-fond { position: absolute; inset: 0; background: rgba(7, 21, 27, .55); }
.mp-modal-boite { position: relative; z-index: 1; width: min(1000px, 100%); height: min(92vh, 100%);
  background: var(--card, #fff); border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  overflow: hidden; transform: translateY(8px) scale(.99); transition: transform .18s ease; }
.mp-modal.on .mp-modal-boite { transform: none; }
.mp-modal-cadre { width: 100%; height: 100%; border: 0; display: block; background: var(--card, #fff); }
.mp-modal-x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .92); color: #333; font-size: 1.05rem; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.mp-modal-x:hover { background: #fff; }
.corps-modal { background: var(--card, #fff); }
.corps-modal .modal-page { max-width: 900px; margin: 0 auto; padding: 22px 22px 28px; }
@media (max-width: 620px) { .mp-modal { padding: 0; } .mp-modal-boite { width: 100%; height: 100%; border-radius: 0; } }
.corps-modal .ariane { display: none; }

/* ---------- Bouton « Améliorations » (suggestions des testeurs) ---------- */
.sugg-btn { position: fixed; right: 18px; bottom: 18px; z-index: 1500; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 999px; background: var(--brand, #0098ca); color: #fff; font-weight: 600;
  font-size: .9rem; cursor: pointer; box-shadow: 0 6px 20px rgba(7, 21, 27, .28); }
.sugg-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.sugg-btn svg { flex: 0 0 auto; }
.sugg-modal { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center; padding: 4vh 16px; }
.sugg-fond { position: absolute; inset: 0; background: rgba(7, 21, 27, .55); }
.sugg-boite { position: relative; z-index: 1; width: min(520px, 100%); background: var(--card, #fff); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35); padding: 20px 22px 22px; max-height: 92vh; overflow: auto; }
.sugg-boite h2 { margin: 0 0 6px; font-size: 1.2rem; }
.sugg-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #eceff3; color: #333; font-size: 1rem; cursor: pointer; }
.sugg-x:hover { background: #e0e4ea; }
.sugg-boite textarea { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line, #d7dee3); border-radius: 10px;
  font: inherit; resize: vertical; box-sizing: border-box; }
.sugg-ctx { font-size: .82rem; margin: 8px 0 0; }
.sugg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.sugg-ok { display: inline-block; margin-top: 10px; }
@media (max-width: 560px) { .sugg-btn span { display: none; } .sugg-btn { padding: 12px; right: 14px; bottom: 14px; } }
@media print { .sugg-btn, .sugg-modal { display: none !important; } }
.sugg-modal[hidden] { display: none; }
.sugg-ok[hidden] { display: none; }

/* ---------- Outils d'administration en pictogrammes (fin du menu) ---------- */
#nav-principale .nav-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 7px 9px; }
#nav-principale .nav-ico .icone { display: block; }
#nav-principale .nav-ico:not(.on)::after { left: 9px; right: 9px; }
#nav-principale .nav-ico-nb { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: var(--err, #d9534f); color: #fff; font-size: .62rem; line-height: 15px; text-align: center;
  font-weight: 700; box-sizing: border-box; }

/* ---------- Matrice de droits (page Utilisateurs) ---------- */
.droits-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.droits-adming { margin: 4px 0; }
.droits-matrice { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.droits-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line, #e5e9ec); }
.droits-mod { font-weight: 600; font-size: .9rem; }
.droits-ligne select { min-width: 128px; }
.droits-edit > summary { cursor: pointer; font-weight: 600; color: var(--brand, #0098ca); }
