/* Yem'kaf Outils : complète la charte (yemkaf.css). Pensé d'abord pour le téléphone. */
.app-band { overflow: visible; z-index: 10; }
.band-frise { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.app-band .wrap { padding-block: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-logo img { height: 46px; width: auto; display: block; }
.app-user { position: relative; z-index: 5; }
.menu-user summary { list-style: none; cursor: pointer; color: var(--on-brand); border: 1px solid rgba(241, 232, 205, .35); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.menu-user summary::-webkit-details-marker { display: none; }
.tag-role { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(241, 232, 205, .16); border-radius: 999px; padding: 2px 8px; }
.person .tag-role, .card .tag-role { background: var(--accent-wash); color: var(--brand-ink); }
.menu-pop { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; display: grid; }
.menu-pop a, .menu-pop button { display: block; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; width: 100%; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.app-nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.app-nav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
.app-nav .wrap::-webkit-scrollbar { display: none; }
.app-nav a { white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.app-nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.app-nav a.nav-admin { color: var(--warn); }
.app-nav a.nav-admin[aria-current="page"] { background: var(--warn); color: var(--surface); }
.app-nav a.nav-admin:first-of-type, .app-nav a:not(.nav-admin) + a.nav-admin { margin-left: 10px; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; padding-left: 14px; }
.app-main { padding-block: 20px 40px; display: grid; gap: 22px; }
.app-main > *, .app-main form, .app-main section { min-width: 0; }
.app-foot { padding-block: 0 30px; font-size: 13px; color: var(--muted); }
.h-page { font-size: clamp(24px, 4vw, 32px); font-weight: 800; color: var(--brand-ink); letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 800; color: var(--brand-ink); }
h3 { font-size: 16px; }
.sec-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.flash { border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.flash.ok { background: var(--good-wash); color: var(--good); }
.flash.bad { background: var(--bad-wash); color: var(--bad); }
.tag.info { background: var(--accent-wash); color: var(--brand-ink); }
.btn.danger { background: var(--bad-wash); color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; }
button.btn { font-family: inherit; }
.meta { font-size: 13px; color: var(--muted); }
.neg { color: var(--bad); }
.hello { display: grid; gap: 2px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { padding: 14px 16px; display: grid; gap: 2px; text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--brand-ink); }
.tile-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile b { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.tile-s { font-size: 13px; color: var(--ink-2); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-link { padding: 16px; display: grid; gap: 6px; text-decoration: none; color: var(--ink); align-content: start; }
.card-link b { color: var(--brand-ink); font-size: 16px; }
.card-link span { font-size: 14px; color: var(--ink-2); }
.card-link:hover { border-color: var(--brand-ink); }
.card-link.admin b { color: var(--warn); }
.list { display: grid; gap: 6px; }
.task-group { gap: 8px; }
.task-group h2 { font-size: 17px; }
.task-line { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.task-line.done .t { text-decoration: line-through; color: var(--muted); }
.task-line .t { font-weight: 700; color: var(--ink); text-decoration: none; }
.task-line .t:hover { text-decoration: underline; }
.check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--brand-ink); background: var(--surface); color: var(--on-brand); font-weight: 800; cursor: pointer; display: grid; place-items: center; padding: 0; }
.check.on { background: var(--brand); border-color: var(--brand); }
button.check:hover { background: var(--accent-wash); }
button.check.on:hover { background: var(--brand); filter: brightness(1.1); }
.task-line.doing { border-color: var(--warn); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); align-content: start; min-width: 0; }
.field.inline { display: inline-grid; }
.field input, .field select, .field textarea, .planning select { font: inherit; font-size: 15px; font-weight: 400; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
.field textarea { resize: vertical; }
.field input:disabled, .field textarea:disabled { opacity: .7; }
.field.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; padding-top: 22px; }
.field.chk input { width: auto; }
.unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.form-grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid .wide, .form-grid h2 { grid-column: 1 / -1; }
.form-col { display: grid; gap: 12px; }
.card { padding: 18px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.inline-form { margin: 0; }
details > summary { cursor: pointer; }
details.card > summary { list-style-position: inside; }
.guide-mini { padding: 10px 16px; }
.guide-mini summary { font-weight: 700; color: var(--brand-ink); }
.guide-mini-body { display: grid; gap: 6px; padding-top: 8px; font-size: 14px; color: var(--ink-2); }
.login { display: grid; place-items: center; padding-top: 4vh; }
.login .card { max-width: 440px; width: 100%; display: grid; gap: 14px; }
.login-logo { height: 52px; width: auto; }
.code-input { font-size: 26px !important; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: grid; gap: 2px; }
.checks li.ok b { color: var(--good); }
.checks li.ko b { color: var(--bad); }
.checks li span { font-size: 14px; color: var(--ink-2); }
.comment { border-top: 1px solid var(--line); padding: 10px 0; }
.comment p { margin-top: 4px; }
.order { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order.urgent { border-color: var(--bad); }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.order-actions form { margin: 0; }
table.planning td, table.planning th { text-align: left; white-space: nowrap; vertical-align: top; }
table.planning th small, table.planning td small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
table.planning tr.today td { background: var(--accent-wash); }
table.planning td.mine { font-weight: 700; color: var(--brand-ink); }
table.planning select { min-width: 150px; padding: 6px 8px; font-size: 14px; }
table tr.sel td { background: var(--accent-wash); }
table.droits select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.chart { width: 100%; max-width: 760px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--muted); font-family: var(--font-ui); }
.chart .bar { fill: var(--s1); }
.chart .bar.under { fill: var(--s1); opacity: .45; }
.chart .target { stroke: var(--ink); stroke-width: 2; }
.doc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.doc-card { text-decoration: none; color: var(--ink); overflow: hidden; display: grid; }
.doc-card:hover { border-color: var(--brand-ink); }
.doc-thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb .ext { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--muted); }
.doc-info { padding: 10px 12px; display: grid; gap: 4px; }
.doc-info span { font-size: 13px; color: var(--muted); }
.doc-detail { display: grid; gap: 16px; }
@media (min-width: 760px) { .doc-detail { grid-template-columns: 280px minmax(0, 1fr); } }
.doc-detail .doc-thumb { border-radius: 10px; }
.person.off { opacity: .7; }
.person summary { line-height: 1.8; }
.person h3 { margin-top: 12px; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.chk { padding-top: 0; }
  .tile b { font-size: 20px; }
}
.mail-apercu { background: #ece5d3; border-radius: 12px; padding: 14px; overflow-x: auto; color-scheme: light; font-family: Arial, sans-serif; font-size: 15px; color: #1c2b23; }
.mail-apercu table { min-width: 0; }
.mail-apercu td, .mail-apercu th { padding: 0; border-bottom: 0; text-align: left; white-space: normal; position: static; background: transparent; font-variant-numeric: normal; }
input.copie { font: inherit; font-size: 13px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); }
ol.etapes { margin: 0; padding-left: 22px; display: grid; gap: 4px; color: var(--ink-2); }
.bandeau-app p { margin: 0; }
[hidden] { display: none !important; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 14px; }
figure.photo { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: grid; align-content: start; }
figure.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
figure.photo figcaption { padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; }
figure.photo form { margin: 4px 0 0; }
.btn.petit { padding: 4px 10px; font-size: 13px; }
/* Graphiques du bilan */
.chart .val { font-size: 12px; font-weight: 700; fill: var(--ink); font-family: var(--font-ui); }
.chart .lib { font-size: 13px; fill: var(--ink-2); font-family: var(--font-ui); }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit.actif { fill: var(--ink); fill-opacity: .05; }
.chart .seg { cursor: default; }
.chart .seg.actif { filter: brightness(1.12); }
/* Fait · à faire · en retard : palette vérifiée (daltonisme, contraste), une teinte de rouge propre au mode sombre. */
:root { --t-retard: #a3302a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --t-retard: #d6607e; } }
:root[data-theme="dark"] { --t-retard: #d6607e; }
.s-fait { fill: var(--s1); background: var(--s1); }
.s-afaire { fill: var(--s2); background: var(--s2); }
.s-retard { fill: var(--t-retard); background: var(--t-retard); }
.legende { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legende li { display: flex; align-items: center; gap: 6px; }
.legende .cle { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.table-vue { margin-top: 10px; font-size: 14px; }
.table-vue summary { color: var(--brand-ink); font-weight: 600; }
.table-vue .table-scroll { margin-top: 8px; max-height: 360px; overflow: auto; }
.panel.card h3 { margin: 0 0 4px; }
.bulle { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 7px 10px; display: grid; gap: 1px; font-size: 13px; max-width: 260px; }
.bulle b { font-size: 16px; font-variant-numeric: tabular-nums; }
.bulle span { color: var(--ink-2); }
.bulle .bulle-s { color: var(--muted); font-size: 12px; }
/* ---------------------------------------------------------------- le guide */
.yk-voile { position: fixed; inset: 0; z-index: 1000; background: transparent; }
.yk-voile.sombre { background: rgba(16, 26, 21, .62); }
.yk-spot { position: fixed; z-index: 1001; pointer-events: none; border-radius: 12px; box-shadow: 0 0 0 200vmax rgba(16, 26, 21, .62), 0 0 0 3px var(--s2);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
.yk-carte { position: fixed; z-index: 1002; width: min(400px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 26, 21, .35); padding: 16px 18px 14px; display: grid; gap: 12px; }
.yk-carte.centre { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 24px)); }
.yk-carte.feuille { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 56vh; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.yk-carte.yk-entre { animation: yk-entre .22s ease-out; }
.yk-carte.centre.yk-entre { animation: yk-entre-centre .22s ease-out; }
@keyframes yk-entre { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes yk-entre-centre { from { opacity: 0; } to { opacity: 1; } }
.yk-tete { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.yk-avatar { width: 44px; height: 44px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--s2); }
.yk-avatar.petit { width: 28px; height: 28px; }
.yk-titres { display: grid; gap: 1px; min-width: 0; }
.yk-signe { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.yk-titre { font-size: 18px; line-height: 1.25; margin: 0; color: var(--brand-ink); }
.yk-fermer { border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; align-self: start; }
.yk-fermer:hover { background: var(--surface-2); color: var(--ink); }
.yk-corps { display: grid; gap: 9px; font-size: 14.5px; line-height: 1.5; }
.yk-corps p { margin: 0; color: var(--ink-2); }
.yk-lib { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.yk-ligne.yk-faire p { color: var(--ink); font-weight: 600; }
.yk-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.yk-points { display: flex; gap: 5px; padding-top: 8px; }
.yk-points span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.yk-points span.vu { background: var(--axis); }
.yk-points span.on { background: var(--brand-ink); width: 18px; border-radius: 4px; }
.yk-boutons { display: flex; gap: 8px; margin-left: auto; padding-top: 8px; }
.yk-boutons button { font: inherit; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.yk-boutons .yk-suiv { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.yk-boutons button:focus-visible, .yk-fermer:focus-visible, .yk-i:focus-visible, .yk-aide:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.yk-aide { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--on-brand); background: var(--brand); color: var(--on-brand);
  font: 800 22px/1 var(--font-display); cursor: pointer; box-shadow: 0 6px 18px rgba(16, 26, 21, .28); }
.yk-aide:hover { filter: brightness(1.12); }
html.yk-visite .yk-aide { display: none; }
.app-foot { padding-bottom: 80px; }
.yk-i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--brand-ink); background: transparent;
  color: var(--brand-ink); font: italic 700 13px/1 Georgia, serif; cursor: pointer; vertical-align: middle; padding: 0; margin-left: 4px; }
.yk-i:hover, .yk-i[aria-expanded="true"] { background: var(--brand-ink); color: var(--surface); }
.h-page .yk-i { width: 24px; height: 24px; font-size: 14px; }
.yk-info { position: absolute; z-index: 45; width: min(320px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow), 0 12px 30px rgba(16, 26, 21, .18); padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.yk-info p { margin: 0; color: var(--ink-2); }
.yk-info-tete { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.yk-info-tete b { color: var(--brand-ink); font-size: 15px; }
.yk-info .yk-fermer { width: 28px; height: 28px; font-size: 20px; }
/* Mes premiers pas */
.premiers-pas { display: grid; gap: 10px; border-left: 4px solid var(--s2); }
.pp-barre { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pp-barre span { display: block; height: 100%; border-radius: 99px; background: var(--s1); transition: width .4s ease; }
.pp-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pp-liste li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 15px; }
.pp-liste li.fait { color: var(--muted); }
.pp-liste li.fait > span:last-child { text-decoration: line-through; text-decoration-color: var(--axis); }
.pp-liste a { font-weight: 600; text-decoration: none; }
.pp-liste a:hover { text-decoration: underline; }
.pp-rond { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--axis); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--on-brand); }
.pp-liste li.fait .pp-rond { background: var(--s1); border-color: var(--s1); }
.pp-masquer { justify-self: end; margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .yk-spot, .pp-barre span { transition: none; } }
.choix-guide { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choix-guide legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.choix-carte { display: grid; grid-template-columns: auto 40px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 14px; }
.choix-carte:has(input:checked) { border-color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand-ink); background: var(--accent-wash); }
.choix-carte img { border-radius: 50%; }
.choix-carte > span { display: grid; gap: 2px; }
.choix-carte > span > span { color: var(--ink-2); font-size: 13px; }
.choix-carte input { margin-top: 12px; }
.revoir-visite { margin: 0; font-size: 14px; }
.pp-revoir { font-size: 13px; text-decoration: none; }
.yk-aide-menu { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 41;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow), 0 12px 30px rgba(16, 26, 21, .2);
  padding: 6px; display: grid; min-width: 240px; }
.yk-aide-menu .yk-aide-tete { display: flex; align-items: center; gap: 8px; padding: 6px 10px 8px; font-size: 13px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.yk-aide-menu button { text-align: left; font: inherit; font-size: 15px; font-weight: 600; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.yk-aide-menu button:hover, .yk-aide-menu button:focus-visible { background: var(--surface-2); }
