/* ==========================================================================
   AIRH — Vue ADMIN MOBILE (.am)
   Template dédié téléphone / tablette : en-tête compact, contenu qui défile,
   barre d'onglets en bas. Aucun rapport avec les écrans HUD de bureau.
   ========================================================================== */

body.am-active { overflow: hidden; }
body.am-active .bottom-nav,
body.am-active .sidebar,
body.am-active .topbar { display: none !important; }

.am {
  --bg: #F2F5F8;
  --card: #FFFFFF;
  --line: rgba(20, 40, 60, .10);
  --ink-1: #16232E;
  --ink-2: #55677A;
  --ink-3: #93A5B5;
  --accent: #F4640A;
  --radius: 14px;
  --nav-h: 62px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink-1);
  font-family: var(--font); font-size: 15px;
  overflow: hidden;
}

.am[data-theme="dark"] {
  --bg: #0C1219;
  --card: #151F2A;
  --line: rgba(140, 190, 230, .14);
  --ink-1: #E9F1F8;
  --ink-2: #9BB0C4;
  --ink-3: #5D7285;
}

.am * { box-sizing: border-box; }
.am button { font-family: inherit; cursor: pointer; }
.am :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- EN-TÊTE ---------- */
.am-top {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.am-back {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  display: grid; place-items: center;
}
.am-back:active { background: var(--line); }
.am-top-id { flex: 1; min-width: 0; }
.am-top-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.am-top-sub {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-transform: capitalize;
}

/* ---------- CORPS : c'est LUI qui défile ---------- */
.am-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 14px 14px calc(env(safe-area-inset-bottom) + 20px);
  display: flex; flex-direction: column; gap: 16px;
}

/* ---------- MENU LATÉRAL ---------- */
.am-drawer { position: absolute; inset: 0; z-index: 60; }
.am-drawer[hidden] { display: none; }
.am-drawer-veil {
  position: absolute; inset: 0; background: rgba(8, 16, 24, .5);
  opacity: 0; transition: opacity .25s;
}
.am-drawer.on .am-drawer-veil { opacity: 1; }
.am-drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(310px, 86vw);
  display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line);
  box-shadow: 20px 0 60px rgba(8, 16, 24, .28);
  transform: translateX(-100%); transition: transform .26s cubic-bezier(.22,.9,.24,1);
  padding-top: env(safe-area-inset-top);
}
.am-drawer.on .am-drawer-panel { transform: none; }

.am-dr-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 16px 14px; border-bottom: 1px solid var(--line);
}
.am-dr-ava {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.am-dr-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.am-dr-id b { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-dr-id span { font-size: 12px; color: var(--ink-3); text-transform: capitalize; }
.am-dr-close {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3); font-size: 15px;
}

.am-dr-scroll {
  flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 16px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.am-dr-group { margin-bottom: 14px; }
.am-dr-group-t {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 8px 7px;
}
.am-dr-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 12px; border-radius: 11px;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px;
}
.am-dr-item:active { background: var(--line); }
.am-dr-item.on {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); font-weight: 700;
}
.am-dr-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-dr-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
  font-style: normal; display: none; place-items: center;
}
.am-dr-badge.on { display: grid; }

.am-dr-foot {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.am-dr-act {
  min-height: 44px; border-radius: 11px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 600;
}
.am-dr-act--out { color: #ef4444; border-color: color-mix(in srgb, #ef4444 40%, transparent); }

/* ---------- BANDEAU PRINCIPAL ---------- */
.am-hero {
  flex: none; border-radius: var(--radius); padding: 20px 18px;
  background: linear-gradient(135deg, #16232E, #24384A);
  color: #fff; position: relative; overflow: hidden;
}
.am[data-theme="dark"] .am-hero { background: linear-gradient(135deg, #14202C, #1B2E3E); }
.am-hero::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,100,10,.35), transparent 70%);
}
.am-hero-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.am-hero-v {
  font-size: 46px; font-weight: 800; line-height: 1; margin-top: 8px;
  display: flex; align-items: baseline; gap: 9px;
}
.am-hero-v small { font-size: 14px; font-weight: 500; opacity: .75; }
.am-hero-live { margin-top: 12px; font-size: 12.5px; display: flex; align-items: center; gap: 8px; opacity: .85; }
.am-hero-live i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.am-hero-live i.on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.22); animation: am-pulse 1.8s infinite; }
@keyframes am-pulse { 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

/* ---------- CHIFFRES ---------- */
.am-stats { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.am-stats--tight { gap: 8px; }
.am-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 10px; text-align: center;
}
.am-stat .v { font-size: 23px; font-weight: 800; line-height: 1; }
.am-stat .v small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.am-stat .k { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* ---------- SECTIONS ---------- */
.am-sec { flex: none; }
.am-sec-t {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin: 0 0 10px 2px;
}
.am-sec-t span { font-weight: 500; text-transform: none; letter-spacing: 0; }
.am-list { display: flex; flex-direction: column; gap: 8px; }
.am-cards { display: flex; flex-direction: column; gap: 10px; }

/* ---------- LIGNE ---------- */
.am-row {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 11px 13px 11px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.am-row::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--c, var(--ink-3));
}
.am-row--muted { opacity: .72; }
.am-row-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.am-row-id b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-row-id span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-row-v {
  flex: none; font-size: 13px; font-weight: 800; color: var(--c);
  padding: 6px 10px; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.am-call {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  display: grid; place-items: center; text-decoration: none;
  color: #16a34a; background: color-mix(in srgb, #22c55e 12%, transparent);
}

/* ---------- ALERTE ---------- */
.am-alert {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 13px; margin-bottom: 8px; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--c); border-radius: 12px; color: inherit;
}
.am-alert:active { background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.am-alert-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.am-alert-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.am-alert-txt b { font-size: 14px; font-weight: 700; }
.am-alert-txt span { font-size: 12px; color: var(--ink-3); }
.am-chev { color: var(--ink-3); font-size: 20px; line-height: 1; }
.am-ok {
  padding: 18px; text-align: center; font-size: 13.5px; color: var(--ink-2);
  background: color-mix(in srgb, #22c55e 10%, var(--card));
  border: 1px solid color-mix(in srgb, #22c55e 30%, transparent); border-radius: 12px;
}

/* ---------- CARTE (congés, tâches) ---------- */
.am-card {
  position: relative; padding: 14px 14px 13px 17px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.am-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--c);
}
.am-card-top { display: flex; align-items: center; gap: 10px; }
.am-card-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-tag {
  flex: none; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c);
}
.am-card-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; }
.am-card-acts { display: flex; gap: 9px; margin-top: 13px; }
.am-card-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.am-prog { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 11px; }
.am-prog i { display: block; height: 100%; border-radius: 99px; background: var(--c); }

/* ---------- BOUTONS ---------- */
.am-btn {
  flex: 1; min-height: 44px; border-radius: 11px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 700;
}
.am-btn:disabled { opacity: .5; }
.am-btn--ok { background: #22c55e; border-color: #22c55e; color: #fff; }
.am-btn--ko { color: #ef4444; border-color: color-mix(in srgb, #ef4444 45%, transparent); }
.am-btn--ok:active { filter: brightness(.94); }

/* ---------- RUBAN DE JOURS ---------- */
.am-days {
  flex: none; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.am-days::-webkit-scrollbar { display: none; }
.am-day {
  flex: 0 0 auto; width: 48px; padding: 9px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink-2);
}
.am-day .w { font-size: 10px; color: var(--ink-3); }
.am-day .n { font-size: 17px; font-weight: 800; line-height: 1; }
.am-day.we { background: color-mix(in srgb, var(--ink-3) 8%, var(--card)); }
.am-day.today .n { color: var(--accent); }
.am-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.am-day.on .w, .am-day.on .n { color: #fff; }

/* ---------- RECHERCHE ---------- */
.am-search { flex: none; }
.am-search input {
  width: 100%; min-height: 46px; padding: 0 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink-1);
}
.am-search input:focus { outline: none; border-color: var(--accent); }

/* ---------- ÉTATS ---------- */
.am-empty { padding: 26px 14px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.am-empty--big { margin: auto; padding: 60px 20px; }
.am-load { display: flex; gap: 7px; justify-content: center; padding: 60px 0; }
.am-load span {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3);
  animation: am-bounce 1s infinite ease-in-out;
}
.am-load span:nth-child(2) { animation-delay: .15s; }
.am-load span:nth-child(3) { animation-delay: .3s; }
@keyframes am-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4 } 40% { transform: translateY(-7px); opacity: 1 } }

/* ---------- BOUTON D'ACTION PRINCIPAL ---------- */
.am-cta {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; border-radius: 13px; border: none;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 32%, transparent);
}
.am-cta:active { filter: brightness(.94); transform: translateY(1px); }

/* les lignes tapables se comportent comme des boutons */
button.am-row { width: 100%; text-align: left; font-family: inherit; }
button.am-row:active { background: color-mix(in srgb, var(--c) 8%, var(--card)); }

/* ---------- FEUILLE PLEIN ÉCRAN ---------- */
.am-sheet { position: absolute; inset: 0; z-index: 70; }
.am-sheet-veil {
  position: absolute; inset: 0; background: rgba(8, 16, 24, .5);
  opacity: 0; transition: opacity .22s;
}
.am-sheet.on .am-sheet-veil { opacity: 1; }
.am-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%;
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 60px rgba(8, 16, 24, .3);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22,.9,.24,1);
}
.am-sheet.on .am-sheet-panel { transform: none; }
.am-sheet-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 15px 14px 13px; border-bottom: 1px solid var(--line);
}
.am-sheet-head::before {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 99px; background: var(--line);
}
.am-sheet-t {
  flex: 1; min-width: 0; font-size: 15.5px; font-weight: 800; text-transform: capitalize;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.am-sheet-x {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3); font-size: 15px;
}
.am-sheet-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}

/* ---------- CHAMPS ---------- */
.am-f { display: flex; flex-direction: column; gap: 6px; }
.am-f > span { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.am-f input, .am-f select {
  width: 100%; min-height: 48px; padding: 0 13px;
  font-size: 16px; font-family: inherit; color: var(--ink-1);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.am-f input:focus, .am-f select:focus { outline: none; border-color: var(--accent); }
.am-f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.am-f-submit { min-height: 50px; margin-top: 4px; }
.am-f-acts { display: flex; gap: 9px; margin-top: 4px; }
.am-f-block {
  padding: 13px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--card); display: flex; flex-direction: column; gap: 12px;
}
.am-f-block-t { font-size: 11.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- SÉLECTEUR POINTAGE / ABSENCE ---------- */
.am-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--line); border-radius: 12px;
}
.am-seg button {
  min-height: 42px; border: none; border-radius: 9px; background: transparent;
  color: var(--ink-2); font-size: 14px; font-weight: 700; font-family: inherit;
  transition: background .15s, color .15s;
}
.am-seg button.on { background: var(--card); color: var(--accent); box-shadow: 0 2px 6px rgba(8,16,24,.12); }

/* ---------- FILTRE EN TÊTE D'ONGLET ---------- */
.am-filter { flex: none; display: flex; align-items: center; gap: 10px; }
.am-filter > span {
  font-size: 11.5px; font-weight: 800; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .06em; flex: none;
}
.am-filter select {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 12px;
  font-size: 16px; font-family: inherit; color: var(--ink-1);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.am-filter select:focus { outline: none; border-color: var(--accent); }

/* aide sous un champ */
.am-f-hint { font-style: normal; font-size: 11.5px; color: var(--ink-3); }

/* ---------- FILTRES EN PASTILLES (même esprit que le ruban de jours) ---------- */
.am-chips {
  flex: none; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.am-chips::-webkit-scrollbar { display: none; }
.am-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600;
}
.am-chip i {
  font-style: normal; font-size: 11.5px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c);
}
.am-chip.on { background: var(--c); border-color: var(--c); color: #fff; }
.am-chip.on i { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- LIGNE HABILITATION (dans la feuille) ---------- */
.am-hab {
  position: relative; padding: 12px 13px 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.am-hab::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--c);
}
.am-hab-top { display: flex; align-items: center; gap: 10px; }
.am-hab-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-hab-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------- LIGNE D'INFORMATION (feuilles client / site) ---------- */
.am-info {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.am-info:last-of-type { border-bottom: none; }
.am-info > span {
  flex: none; width: 38%; font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .05em;
}
.am-info > b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.am-info a { color: var(--accent); text-decoration: none; }

/* ---------- NAVIGATION DE MOIS ---------- */
.am-monthnav {
  flex: none; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 5px;
}
.am-monthnav span {
  flex: 1; text-align: center; font-size: 14.5px; font-weight: 800; text-transform: capitalize;
}
.am-monthnav button {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  font-size: 20px; line-height: 1;
}
.am-monthnav button:active { background: var(--line); }

/* carte tapable */
.am-card[data-proj] { cursor: pointer; }
.am-card[data-proj]:active { border-color: var(--c); }

/* ---------- GRAPHIQUE DE RENTABILITÉ (propre au mobile) ---------- */
.am-chart {
  flex: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 12px 12px;
}
.am-chart-t {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3); margin-bottom: 10px;
}
.am-chart-t b { color: var(--ink-1); }
.am-chart-t span { margin-left: auto; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink-2); }

.am-chart-box { position: relative; }
.am-svg { display: block; width: 100%; height: 128px; overflow: visible; }
.am-zero { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.am-bar { transition: opacity .15s; }
.am-bar.fc { opacity: .35; }
.am-bar.on { filter: drop-shadow(0 0 0 2px var(--accent)); }
.am-bar.on:not(.fc) { stroke: var(--accent); stroke-width: 2; paint-order: stroke; vector-effect: non-scaling-stroke; }

.am-moisrow { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 6px; }
.am-mois {
  min-height: 34px; border: none; background: transparent; border-radius: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-family: inherit;
}
.am-mois.fc { opacity: .5; }
.am-mois.on { background: var(--accent); color: #fff; }

.am-chart-read {
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line);
}
.am-chart-read .l { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.am-chart-read .v { font-size: 24px; font-weight: 800; line-height: 1.1; }
.am-chart-read .s { font-size: 12px; color: var(--ink-3); }
.am-chart-vide { padding: 34px 10px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- FILTRE DU GRAPHIQUE ---------- */
.am-chart-filtre {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 42px; padding: 0 12px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
}
.am-chart-filtre span { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-chart-filtre em { font-style: normal; color: var(--ink-3); font-size: 17px; }
.am-chart-filtre:active { border-color: var(--accent); }
.am-row--on { border-color: var(--accent); }

/* ---------- COMPTE DE RÉSULTAT (feuille de mois) ---------- */
.am-compte {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 13px;
}
.am-ligne {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
.am-ligne:last-child { border-bottom: none; }
.am-ligne span { flex: 1; min-width: 0; }
.am-ligne b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-1); }
.am-ligne.fort { background: color-mix(in srgb, var(--ink-3) 7%, transparent); margin: 0 -13px; padding-left: 13px; padding-right: 13px; }
.am-ligne.fort span { font-weight: 700; color: var(--ink-1); }
.am-ligne.fort b { font-size: 17px; }

.am-taux {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
}
.am-taux > div { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--ink-2); }
.am-taux > div span { flex: 1; }
.am-taux > div b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

.am-note {
  font-size: 12px; line-height: 1.5; color: var(--ink-3);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 11px; padding: 10px 12px;
}
.am-note b { color: var(--ink-2); }

/* ---------- ORGANIGRAMME MOBILE ---------- */
.am-org {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px 10px;
}
.am-org-l {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 0 9px calc(var(--n) * 20px);
  border-bottom: 1px solid var(--line);
}
.am-org-l:last-child { border-bottom: none; }
/* petit coude qui rattache la ligne à son responsable */
.am-org-t {
  position: absolute; left: calc(var(--n) * 20px - 12px); top: 0; bottom: 50%;
  width: 10px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.am-org-p {
  width: 22px; height: 22px; flex: none; border: none; background: none;
  color: var(--ink-3); font-size: 11px; line-height: 1; padding: 0;
}
.am-org-p.vide { visibility: hidden; }
.am-org-a {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
  color: var(--ink-2); background: color-mix(in srgb, var(--ink-3) 13%, transparent);
}
.am-org-l[style*="--n:0"] .am-org-a { color: #fff; background: var(--accent); }
.am-org-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.am-org-n b { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-org-n span { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- FICHE SALARIÉ (feuille + sous-feuilles) ---------- */
.am-fiche-tete { display: flex; align-items: center; gap: 12px; }
.am-fiche-av {
  width: 52px; height: 52px; flex: none; border-radius: 15px;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--accent), #f59e0b);
}
.am-fiche-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.am-fiche-id b { font-size: 16px; font-weight: 800; }
.am-fiche-id span { font-size: 12.5px; color: var(--ink-3); }
.am-fiche-acts { display: flex; gap: 8px; }
.am-fiche-acts .am-btn { text-align: center; text-decoration: none; line-height: 44px; }
.am-fiche-ic {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center; color: #0ea5e9;
  background: color-mix(in srgb, #0ea5e9 12%, transparent);
}
.am-org-n {
  border: none; background: none; padding: 0; text-align: left; font: inherit;
  cursor: pointer; color: inherit;
}
/* les feuilles empilées : la plus récente passe au-dessus */
.am-sheet { z-index: 70; }
.am-sheet ~ .am-sheet { z-index: 71; }
.am-sheet ~ .am-sheet ~ .am-sheet { z-index: 72; }

/* pastille « non lu » sur une ligne */
.am-pastille {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; margin-right: 7px; vertical-align: middle;
}
