/* AS Connect — feuille de style (modes clair et sombre, loupe 100 / 125 / 150 %) */
:root {
  --z: 1;
  --pink: #ec1a84; --pink-strong: #c8156f; --pink-soft: #fdf0f6; --pink-urgent: #d81b7a;
  --ok: #1e7a3c; --ok-bg: #e3f4e8; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b3261e; --bad-bg: #fde7e5; --info-bg: #e8f1fb; --info: #1d5b99;
  --bg: #f4f5f7; --card: #ffffff; --card-2: #f7f8fa; --line: #d5d9de; --line-2: #e6e9ed;
  --text: #1d2024; --text-2: #474e57; --text-3: #6b727c; --on-pink: #fff; --shadow: 0 2px 10px rgba(20, 24, 30, .06);
  --radius: 18px; --radius-s: 12px;
  font-size: calc(16px * var(--z));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15171b; --card: #24272e; --card-2: #1f2228; --line: #3a3e46; --line-2: #2f333a;
  --text: #f2f4f6; --text-2: #c2c8cf; --text-3: #9aa1aa; --pink-soft: #3b1a2c; --shadow: none;
  --ok: #8fd19e; --ok-bg: #1d3522; --warn: #f3c969; --warn-bg: #3a2c10; --bad: #ffb4ab; --bad-bg: #3a1916; --info-bg: #1b2a3a; --info: #9cc5f2;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 1rem; line-height: 1.4; min-height: 100vh; }
a { color: var(--pink-strong); }
:root[data-theme="dark"] a { color: #ff7ab8; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* ---------- Structure ---------- */
#app { min-height: 100vh; display: flex; }
.side { display: none; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; background: var(--card); border-bottom: 1px solid var(--line-2); }
.top .brand { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0; text-decoration: none; min-width: 0; }
.icon-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; position: relative; color: var(--text); }
.icon-btn.plain { border: 0; }
.icon-btn .dot { position: absolute; top: 2px; right: 2px; min-width: 1.1rem; height: 1.1rem; border-radius: .6rem; background: var(--pink); color: #fff; font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 .25rem; }
main.page { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem 6rem; display: flex; flex-direction: column; gap: .9rem; }
main.page.wide { max-width: 1400px; }
.viewas { background: var(--warn-bg); color: var(--warn); font-weight: 700; text-align: center; padding: .45rem; font-size: .9rem; }
.viewas button { margin-left: .5rem; }

/* Logo « Alliance Connect » */
.logo-word { font-weight: 900; font-style: italic; white-space: nowrap; color: var(--text); letter-spacing: -.01em; }
.logo-word .c { color: var(--pink); -webkit-text-stroke: 2px #fff; paint-order: stroke fill; }
:root[data-theme="light"] .logo-word .c { -webkit-text-stroke: 1.5px #fff; text-shadow: 0 0 1px rgba(0,0,0,.25); }
.cross { height: 1.75rem; width: auto; flex: none; margin: 0 .22rem; display: block; }
.biglogo { display: flex; align-items: center; justify-content: center; margin: 1.2rem 0 .4rem; }
.biglogo .w1, .biglogo .w2 { font-size: 2.1rem; font-weight: 900; font-style: italic; color: var(--text); letter-spacing: -.01em; }
.biglogo .w2 { color: var(--pink); -webkit-text-stroke: 2px #fff; paint-order: stroke fill; }
.biglogo .cross { height: 3.2rem; margin: 0 .3rem; }

/* ---------- Textes ---------- */
h1 { font-size: 1.5rem; margin: 0; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: .2rem 0 0; }
h3 { font-size: 1rem; margin: 0; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.hello .muted { font-size: .85rem; }
.section-title { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: .6rem 0 0; }

/* ---------- Grands boutons d'accueil ---------- */
.tiles { display: flex; flex-direction: column; gap: .8rem; }
.tile { display: flex; align-items: center; gap: 1.1rem; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1rem 1.1rem; box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%; min-height: 6rem; }
.tile .bubble { width: 4.25rem; height: 4.25rem; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, #c9ccd1); border: 5px solid var(--pink); display: flex; align-items: center; justify-content: center; color: #4a4f58; }
.tile .t { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; line-height: 1.15; text-transform: uppercase; }
.tile .s { display: block; font-size: .92rem; color: var(--text-2); margin-top: .15rem; }
.tile .badge { margin-left: auto; }
.tile-row { display: flex; gap: .6rem; }
.tile-row .tile { flex: 2; }
.tile.urgent { flex: 1; flex-direction: column; justify-content: center; gap: .35rem; background: var(--pink-urgent); border-color: var(--pink); color: #fff; padding: .8rem .5rem; text-align: center; min-width: 0; }
.tile.urgent .t { font-size: .9rem; }
.tile.small { min-height: 4.4rem; padding: .7rem 1rem; gap: .8rem; }
.tile.small .bubble { width: 2.8rem; height: 2.8rem; border-width: 3px; }
.tile.small .t { font-size: 1rem; text-transform: none; }

/* ---------- Cartes, listes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card.tight { padding: .75rem; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: .6rem; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: .6rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: .7rem; padding: .75rem .2rem; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
.item .title { font-weight: 700; }
.item .sub { font-size: .85rem; color: var(--text-3); }
.item.urgent .title::before { content: "● "; color: var(--pink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .6rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .7rem .8rem; }
.kpi .v { font-size: 1.6rem; font-weight: 800; }
.kpi .l { font-size: .8rem; color: var(--text-3); }
.empty { text-align: center; color: var(--text-3); padding: 1.2rem .5rem; }

/* ---------- Étiquettes ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .15rem .6rem; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line-2); }
.badge.pink { background: var(--pink-soft); color: var(--pink-strong); border-color: transparent; }
:root[data-theme="dark"] .badge.pink { color: #ff9fcb; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.note { border-radius: var(--radius-s); padding: .65rem .8rem; font-size: .9rem; background: var(--info-bg); color: var(--info); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.9rem; padding: 0 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--pink-strong); border-color: var(--pink-strong); color: #fff; }
.btn.primary:hover { background: #a8135f; }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 3.5rem; font-size: 1.1rem; }
.btn.sm { min-height: 2.2rem; padding: 0 .8rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions .btn { flex: 1 1 10rem; }
.sticky-actions { position: sticky; bottom: 0; padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); display: flex; flex-direction: column; gap: .5rem; }

/* ---------- Formulaires ---------- */
label.f { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--text-2); font-weight: 600; }
input.i, select.i, textarea.i { width: 100%; min-height: 2.9rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); padding: .55rem .8rem; color: var(--text); font-size: 1rem; }
textarea.i { min-height: 5rem; resize: vertical; }
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 3px rgba(236, 26, 132, .18); }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; padding: .3rem 0; }
.check input { width: 1.4rem; height: 1.4rem; accent-color: var(--pink-strong); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .5rem .95rem; cursor: pointer; font-weight: 600; min-height: 2.6rem; }
.chip.on { background: var(--pink-strong); border-color: var(--pink-strong); color: #fff; }
.chip:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--card); padding: .6rem .4rem; font-weight: 700; cursor: pointer; min-height: 2.8rem; }
.seg button.on { background: var(--pink-strong); color: #fff; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.choice { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-s); padding: .9rem .6rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; cursor: pointer; font-weight: 700; text-align: center; }
.choice.on { border: 2px solid var(--pink); background: var(--pink-soft); }

/* ---------- Étapes du circuit ---------- */
.steps { display: flex; gap: .3rem; flex-wrap: wrap; }
.stepper { display: flex; flex-direction: column; gap: 0; }
.st { display: flex; gap: .7rem; padding: .45rem 0; }
.st .dotx { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex: none; background: var(--card); }
.st.done .dotx { background: var(--ok); border-color: var(--ok); color: #fff; }
.st.refused .dotx { background: var(--bad); border-color: var(--bad); color: #fff; }
.st.current .dotx { border-color: var(--pink); color: var(--pink); }
.st.skip { opacity: .45; }

/* ---------- Code à 4 chiffres ---------- */
.pin-dots { display: flex; gap: .9rem; justify-content: center; margin: .8rem 0 1.2rem; }
.pin-dots span { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--text-3); }
.pin-dots span.on { background: var(--pink); border-color: var(--pink); }
.keypad { display: grid; grid-template-columns: repeat(3, 4.6rem); gap: .9rem 1.4rem; justify-content: center; }
.keypad button { width: 4.6rem; height: 4.6rem; border-radius: 50%; border: 0; background: var(--card); font-size: 1.7rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.keypad button.fp { border: 2px solid var(--pink); color: var(--pink); }
.keypad button.fn { background: transparent; border: 0; box-shadow: none; }
.avatar { width: 4rem; height: 4rem; border-radius: 50%; border: 3px solid var(--pink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; margin: 0 auto; }

/* ---------- Fenêtres, toasts ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .8rem; }
.sheet .grab { width: 3rem; height: .3rem; border-radius: 1rem; background: var(--line); margin: 0 auto .2rem; }
.toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .8rem 1.1rem; border-radius: 14px; z-index: 80; font-weight: 600; max-width: 92vw; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); color: #fff; }
.menu-list .item { padding: .9rem .4rem; font-weight: 600; }

/* ---------- Calendrier de présence ---------- */
.cal-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); max-height: 70vh; }
table.cal { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
table.cal th, table.cal td { border-bottom: 1px solid var(--line-2); padding: 0; height: 2.1rem; min-width: 2rem; text-align: center; }
table.cal th { position: sticky; top: 0; background: var(--card); z-index: 2; font-weight: 700; color: var(--text-2); padding: .25rem .2rem; }
table.cal th.name, table.cal td.name { position: sticky; left: 0; z-index: 3; background: var(--card); text-align: left; padding: 0 .6rem; min-width: 8.5rem; white-space: nowrap; font-weight: 600; }
table.cal td.we, table.cal th.we { background: var(--card-2); }
table.cal td.hol { background: repeating-linear-gradient(45deg, var(--card-2), var(--card-2) 4px, var(--line-2) 4px, var(--line-2) 8px); }
table.cal th.today { color: var(--pink); }
.cell { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .7rem; }
.cell.leave { background: var(--pink); color: #fff; }
.cell.pending { background: repeating-linear-gradient(45deg, var(--pink-soft), var(--pink-soft) 5px, #f8bbd9 5px, #f8bbd9 10px); color: var(--pink-strong); }
.cell.urgent { background: #e39a17; color: #fff; }
.cell.off { background: var(--line-2); color: var(--text-3); }
.cell.recovery { background: #2f8fdd; color: #fff; }
.cell.half-am { background: linear-gradient(135deg, var(--pink) 50%, transparent 50%); }
.cell.half-pm { background: linear-gradient(135deg, transparent 50%, var(--pink) 50%); }
.cell .oc { width: .45rem; height: .45rem; border-radius: 50%; background: #2aa876; margin-left: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .8rem; color: var(--text-2); }
.legend i { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .25rem; }

/* ---------- Schémas des véhicules ---------- */
.vframe { background: #fff; border-radius: var(--radius-s); padding: .4rem; border: 1px solid var(--line); }
:root[data-theme="dark"] .vframe { background: #fff; }
svg.vdiag { width: 100%; height: auto; display: block; max-height: 62vh; touch-action: manipulation; }
svg.vdiag text { fill: #474e57 !important; }
svg.vdiag .zone { cursor: pointer; transition: fill-opacity .15s; }
svg.vdiag .zone:hover { fill: #ec1a84; fill-opacity: .18; }
svg.vdiag .zone.known { fill: #f0a020 !important; fill-opacity: .55 !important; stroke: #f0a020; stroke-width: 3; }
svg.vdiag .zone.sel { fill: #ec1a84 !important; fill-opacity: .6 !important; stroke: #ec1a84; stroke-width: 4; }
.views { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: .4rem; align-items: stretch; }
.views .vig { width: 2.6rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 2px; display: flex; align-items: center; justify-content: center; }
.views .vig svg { width: 100%; height: auto; max-height: 3.6rem; }
.views button { min-height: 3rem; }

/* ---------- Signature plein écran ---------- */
.sigpad { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; }
.sigpad .bar { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: var(--card); }
.sigpad canvas { flex: 1; width: 100%; touch-action: none; background: #fff; border-radius: 12px; }
.sigpad .area { flex: 1; padding: .6rem; display: flex; }
.rotate-hint { position: fixed; inset: 0; z-index: 95; background: var(--bg); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; padding: 2rem; }
@media (orientation: portrait) and (max-width: 700px) { .sigpad.need-landscape .rotate-hint { display: flex; } }

/* ---------- Visite guidée ---------- */
.tour-back { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .55); }
.tour-box { position: fixed; z-index: 71; left: 50%; bottom: 1.5rem; transform: translateX(-50%); width: min(26rem, 92vw); background: var(--card); color: var(--text); border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.tour-focus { position: relative; z-index: 72; box-shadow: 0 0 0 4px var(--pink), 0 0 0 9999px rgba(0,0,0,.0); border-radius: 22px; }

/* ---------- Tableaux PC ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .78rem; color: var(--text-3); font-weight: 700; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
table.t td { padding: .55rem .4rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tscroll { overflow-x: auto; }
.rights td .seg button { min-height: 2.1rem; font-size: .8rem; padding: .3rem .5rem; }
.photos { display: flex; flex-wrap: wrap; gap: .5rem; }
.photos .ph { width: 5.4rem; height: 5.4rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; font-size: .8rem; color: var(--text-3); }
.photos .ph.add { border: 2px dashed var(--pink); color: var(--pink); font-weight: 700; flex-direction: column; gap: .2rem; }
.photos .ph .x { position: absolute; top: -.4rem; right: -.4rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-weight: 800; cursor: pointer; }
.help-fab { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--card); color: var(--pink-strong); font-size: .95rem; font-weight: 800; line-height: 1; padding: 0; cursor: pointer; z-index: 30; border: 1.5px solid var(--pink); }

/* ---------- PC : menu latéral ---------- */
@media (min-width: 1000px) {
  .side { display: flex; flex-direction: column; gap: .2rem; width: 15.5rem; flex: none; background: var(--card); border-right: 1px solid var(--line-2); padding: 1.2rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .side .brand { display: flex; align-items: center; gap: 0; padding: 0 .5rem 1.2rem; text-decoration: none; }
  .side a.nav { display: block; padding: .65rem .8rem; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; }
  .side a.nav.on { background: var(--pink-soft); color: var(--pink-strong); }
  :root[data-theme="dark"] .side a.nav.on { color: #ff8fc4; }
  .side .who { margin-top: auto; font-size: .82rem; color: var(--text-3); padding: .6rem .5rem 0; }
  .top .menu-btn { display: none; }
  main.page { padding-bottom: 3rem; }
  .tiles.home-pc { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .tile .t { font-size: 1.1rem; } .tile .bubble { width: 3.6rem; height: 3.6rem; } .keypad { grid-template-columns: repeat(3, 4rem); } .keypad button { width: 4rem; height: 4rem; } }
@media print { .top, .side, .help-fab, .sticky-actions { display: none !important; } body { background: #fff; } }
.seg a { flex: 1; padding: .6rem .7rem; font-weight: 700; min-height: 2.8rem; color: inherit; background: var(--card); }
.seg a.on { background: var(--pink-strong); color: #fff; }
.seg[style*="wrap"] { border-radius: var(--radius-s); }
/* Pas de débordement horizontal sur téléphone */
.grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid2 > .btn { white-space: normal; padding-left: .5rem; padding-right: .5rem; }
.views { grid-template-columns: 2.6rem repeat(4, minmax(0, 1fr)); gap: .3rem; }
.views .chip { padding: .4rem .2rem; font-size: .9rem; min-width: 0; }
.page { overflow-x: clip; }
/* Le bouton d'aide ne cache pas le bouton d'action collé en bas */
body:has(.sticky-actions) .help-fab { bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
/* Photo de profil ou initiales */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; color: #fff; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-edit { position: relative; display: inline-block; }
.av-edit .cam { position: absolute; right: -.2rem; bottom: -.2rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pink-strong); color: #fff; border: 2px solid var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.archived-banner { background: var(--line-2); border-radius: var(--radius-s); padding: .7rem .9rem; font-weight: 600; }
details.arch > summary { cursor: pointer; font-weight: 700; padding: .6rem 0; list-style: none; }
details.arch > summary::before { content: '▸ '; }
details.arch[open] > summary::before { content: '▾ '; }
.side .ver { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .75rem; color: var(--text-3); padding: .3rem .5rem; margin-top: auto; }
.side .ver a { color: inherit; text-decoration: none; }
.side .ver + .who { margin-top: 0; }
/* Prénom en avant, nom en plus petit */
.pn { font-weight: 700; }
.ln { font-size: .78em; font-weight: 500; color: var(--text-3); margin-left: .4em; }
/* Bandeau de l'espace de démonstration */

/* v1.5 : en-tête, petit bouton d'aide */
.top { gap: .35rem; }
.top-tools { display: flex; gap: .35rem; flex: none; }
.top-title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: .1rem; }
.top-title h1 { font-size: 1.08rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-title .back { width: 2rem; height: 2.2rem; flex: none; }
.hello-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.hello-row h1 { margin: 0; }
.help-mini { width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--pink); background: var(--card); color: var(--pink-strong); font-weight: 800; font-size: .95rem; line-height: 1; padding: 0; flex: none; cursor: pointer; }
@media (max-width: 359px) { .top-tools .icon-btn { width: 2.2rem; height: 2.2rem; } }
.demo-pill { margin-left: .5rem; border: 1px solid #e3c94a; background: #fff8d6; color: #6b5300; border-radius: 999px; padding: .12rem .6rem; font-weight: 700; font-size: .78rem; cursor: pointer; vertical-align: middle; }
.side .ver .demo-pill { margin-left: 0; }

/* ===== v1.6 : bande du haut fixe, logo PC au centre, démonstration discrète, relief ===== */
:root { --top-h: 4.15rem; }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; min-height: var(--top-h); box-sizing: border-box; padding-top: max(.7rem, env(safe-area-inset-top)); }
body.has-top #app { padding-top: var(--top-h); }
.top-mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.top-mid .brand { flex: none; }
.top.has-title .top-mid .brand { display: none; }
.page-head { display: none; }
.top.demo { background: #fff3b0; border-bottom-color: #ecd36a; }
:root[data-theme="dark"] .top.demo { background: #4a4214; border-bottom-color: #6b5f1c; }
.demo-box { background: #fff8d6; border: 1px solid #ecd36a; border-radius: 14px; padding: .4rem .75rem .5rem; margin: 0 0 .4rem; }
:root[data-theme="dark"] .demo-box { background: #3a3412; border-color: #6b5f1c; }
.demo-title { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b5300; margin: .25rem 0 .15rem; }
:root[data-theme="dark"] .demo-title { color: #f1d76b; }
.demo-row { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; text-align: left; padding: .5rem .1rem; font: inherit; font-weight: 700; color: var(--text); text-decoration: none; cursor: pointer; }
.demo-row span { display: flex; flex-direction: column; }
.demo-row small { font-weight: 500; color: var(--text-3); font-size: .8rem; }
@media (min-width: 1000px) {
  :root { --top-h: 5rem; }
  .top .top-title { display: none; }
  .top.has-title .top-mid .brand { display: flex; }
  .top .brand .logo-word { font-size: 1.75rem; }
  .top .brand .cross { height: 2.9rem; margin: 0 .35rem; }
  .side { top: var(--top-h); height: calc(100vh - var(--top-h)); }
  .page-head { display: flex; align-items: center; gap: .35rem; margin: 0 0 .2rem; }
  .page-head h1 { font-size: 1.5rem; margin: 0; }
  .page-head .back { width: 2.2rem; height: 2.2rem; }
  .side .demo-box { margin: 0 .2rem .9rem; }
  .side .demo-row { padding: .38rem .1rem; font-size: .9rem; }
}

/* Relief : cadres, tuiles et boutons légèrement bombés */
.tile, .btn, .card a.item, .kpi, .icon-btn { transition: box-shadow .15s, transform .15s, border-color .15s, background .15s; }
:root[data-theme="light"] .card, :root[data-theme="light"] .tile:not(.urgent), :root[data-theme="light"] .kpi { background: linear-gradient(180deg, #ffffff 0%, #f1f3f6 100%); border-color: #d3d8de; box-shadow: inset 0 1px 0 #fff, 0 2px 3px rgba(20,24,30,.10), 0 10px 22px rgba(20,24,30,.12); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile:not(.urgent), :root[data-theme="dark"] .kpi { background: linear-gradient(180deg, #2b2f37 0%, #23262d 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 3px rgba(0,0,0,.35), 0 10px 22px rgba(0,0,0,.35); }
.tile.urgent { background: linear-gradient(180deg, #f24a9f 0%, #c2106a 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 4px rgba(150,10,80,.30), 0 12px 22px rgba(150,10,80,.28); }
:root[data-theme="light"] .btn:not(.primary):not(.danger):not(.ghost) { background: linear-gradient(180deg, #ffffff, #eceff2); box-shadow: inset 0 1px 0 #fff, 0 2px 3px rgba(20,24,30,.14), 0 5px 12px rgba(20,24,30,.10); }
.btn.primary { background: linear-gradient(180deg, #ec3d95 0%, #b0105f 100%); border-color: #a80f5b; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 4px rgba(150,10,80,.30), 0 10px 20px rgba(150,10,80,.26); }
.tile .bubble { box-shadow: 0 3px 6px rgba(0,0,0,.16), inset 0 -4px 8px rgba(0,0,0,.10); }
:root[data-theme="light"] .icon-btn:not(.plain) { background: linear-gradient(180deg, #fff, #e9ecf0); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(20,24,30,.16); }
.help-mini, .help-fab { box-shadow: 0 2px 4px rgba(150,10,80,.30); }
/* Souris dessus (PC) ou doigt posé (téléphone) : contour et ombre roses */
:root .tile:not(.urgent):hover, :root .tile:not(.urgent):active, :root .kpi:hover { border-color: var(--pink) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px var(--pink), 0 4px 8px rgba(236,26,132,.35), 0 14px 30px rgba(236,26,132,.40) !important; transform: translateY(-2px); }
:root[data-theme="light"] .tile:not(.urgent):hover, :root[data-theme="light"] .tile:not(.urgent):active { background: linear-gradient(180deg, #ffffff 0%, #fdf0f6 100%); }
.tile.urgent:hover, .tile.urgent:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 6px rgba(150,10,80,.40), 0 16px 30px rgba(236,26,132,.45); transform: translateY(-2px); }
:root .btn:not(.primary):hover, :root .btn:not(.primary):active, :root .icon-btn:not(.plain):hover, :root .icon-btn:not(.plain):active { border-color: var(--pink) !important; box-shadow: 0 0 0 1px var(--pink), 0 4px 12px rgba(236,26,132,.32) !important; }
.btn.primary:hover, .btn.primary:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 6px rgba(150,10,80,.40), 0 14px 26px rgba(236,26,132,.45); }
.card a.item:hover, .card a.item:active, .list button.item:hover { background: var(--pink-soft); border-radius: 10px; }
.tile:active, .btn:active { transform: translateY(1px); }
@media (hover: none) { .tile:hover, .btn:hover { transform: none; } }
/* Mode sombre : les tuiles et les lignes cliquables gardent la couleur du texte (pas la couleur des liens) */
:root[data-theme="dark"] a.tile, :root[data-theme="dark"] a.item, :root[data-theme="dark"] a.icon-btn, :root[data-theme="dark"] .side a.nav:not(.on), :root[data-theme="dark"] a.demo-row { color: var(--text); }
:root[data-theme="dark"] a.tile.urgent { color: #fff; }

/* ---------- v1.7 : congés (jour férié, solde négatif), primes et repas, visites, dossier ---------- */
.neg { color: var(--bad) !important; }
.note.hol-warn { background: #fff1d6; color: #7a4a00; border: 2px solid #f0a32a; font-size: .95rem; }
:root[data-theme="dark"] .note.hol-warn { background: #3a2a0e; color: #ffd48a; border-color: #b87a14; }
.blink { animation: hol-blink 1s ease-in-out 6; }
@keyframes hol-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 163, 42, 0); } 50% { box-shadow: 0 0 0 6px rgba(240, 163, 42, .45); background: #ffe0a3; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
.check.strong { font-weight: 800; align-items: flex-start; }
hr.sep { border: 0; border-top: 1px solid var(--line-2); margin: .8rem 0; }
.pdot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; vertical-align: middle; flex: none; }
.linkbtn { background: none; border: 0; padding: .15rem 0; color: var(--pink-strong); font-weight: 700; font-size: .82rem; cursor: pointer; }
:root[data-theme="dark"] .linkbtn { color: #ff7ab8; }
.i.sm { padding: .3rem .4rem; min-height: 2.1rem; font-size: .82rem; width: auto; max-width: 12rem; }
.i.num { width: 4.6rem; text-align: right; padding: .35rem .45rem; min-height: 2.2rem; font-weight: 700; }
.i.num.xs { width: 3.2rem; }
.money-in { display: inline-flex; align-items: center; gap: .2rem; }
.x-mini { border: 0; background: none; color: var(--text-3); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: .1rem .3rem; }
.pline { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: .15rem 0; }
.pline .gross { margin-left: .2rem; }
.stepper-in { display: inline-flex; align-items: center; gap: .25rem; }
.stepper-in .step { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 800; cursor: pointer; }
.hatch { display: inline-block; min-width: 4.6rem; padding: .3rem .4rem; border-radius: 8px; font-size: .75rem; color: var(--text-3); background: repeating-linear-gradient(45deg, var(--card-2), var(--card-2) 4px, var(--line-2) 4px, var(--line-2) 8px); }
.oc-edit { display: flex; gap: .4rem; flex-wrap: wrap; } .oc-edit label { font-size: .78rem; color: var(--text-3); display: inline-flex; align-items: center; gap: .25rem; }
table.t.pay td { vertical-align: top; } table.t.pay td.who { white-space: nowrap; }
table.t tr.tot td { font-weight: 800; border-top: 2px solid var(--line); background: var(--card-2); }
table.t.recap td, table.t.recap th { white-space: nowrap; text-align: right; } table.t.recap td.who, table.t.recap th:first-child { text-align: left; }
.month-nav { max-width: 26rem; } .month-nav a, .month-nav span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; padding: .55rem .6rem; font-weight: 700; min-height: 2.8rem; }
.month-nav span.on { background: var(--pink-strong); color: #fff; flex: 1.6; }
.pay-card .pay-row { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line-2); }
.pay-actions { flex-direction: row !important; flex-wrap: wrap; gap: .6rem; } .pay-actions .btn { flex: 1 1 14rem; }
