/* ==========================================================================
   Espace membres — maquette v2 (outil de gestion de projet)
   Reprend les couleurs et polices du site (style.css), en version « outil » :
   surfaces neutres, densité d'information, couleur réservée au sens.
   ========================================================================== */
.espace-body {
  --side-w: 256px;
  --top-h: 56px;
  --tab-h: 64px;
  --surface: #FFFFFF;
  --surface-2: #F7F8F6;
  --hair: #E6E9E4;
  --late: #B3473A; --late-bg: #FCEEEB;
  --soon: #7F5200; --soon-bg: #FFF5E0;
  --ok: #3F5238;   --ok-bg: #E3EEDB;
  --prog: #386783; --prog-bg: #EAF2F7;
  --t-gouter: #F5D97A; --t-kermesse: #C9E86A; --t-vente: #8EC3E0;
  --t-fete: #F4A58E; --t-apero: #C3ACEB; --t-comito: #A7C79A;
  background: var(--bg-soft);
  font-size: 15px;
  color: var(--ink);
}
@media (max-width: 899px) { .espace-body { font-size: 16px; } }
.espace-body .ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.espace-body .ico svg { width: 100%; height: 100%; }
.espace-body button { font: inherit; }
.espace-body button:not(.btn) { color: inherit; }
.main:focus { outline: none; }
.espace-body .toast-zone { top: auto; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .espace-body .toast-zone { bottom: 20px; } }
.toast .undo { margin-left: 12px; background: none; border: 0; color: var(--lime); font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 32px; }

/* ---------- Coque : barre latérale (ordinateur), barre haute + onglets (téléphone) ---------- */
.shell { min-height: 100dvh; }
.side { display: none; }
.topbar { position: relative; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--hair); backdrop-filter: blur(8px); }
.topbar .title { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; border-radius: 10px; color: var(--ink); }
.main { padding: 16px var(--gutter) calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--hair); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--ink-3); text-decoration: none; background: none; border: 0; white-space: nowrap; }
.tabbar .ico { width: 24px; height: 24px; }
.tabbar [aria-current="page"] { color: var(--pop-strong); }
.tabbar .fab .ico { width: 46px; height: 46px; padding: 11px; border-radius: 16px; background: var(--pop-strong); color: #fff; box-shadow: 0 6px 16px rgba(216, 27, 106, .3); }
.shell.is-login .tabbar, .shell.is-login .topbar { display: none; }

@media (min-width: 900px) {
  .topbar, .tabbar { display: none; }
  /* Sous l'en-tête du site public : menu latéral collant + contenu */
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
  .side { display: flex; flex-direction: column; position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); background: var(--surface-2); border-right: 1px solid var(--hair); padding: 14px 10px; overflow-y: auto; }
  .main { padding: 24px 32px 48px; min-width: 0; }
  .shell.is-login { display: block; }
  .shell.is-login .side { display: none; }
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; text-decoration: none; color: var(--ink); }
.side-brand strong { display: block; font-family: var(--font-display); color: var(--green-800); }
.side-brand small { color: var(--ink-3); font-size: .78rem; }
.side .new-btn { margin: 0 4px 12px; }
.side-nav { display: grid; gap: 1px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.side-nav a:hover { background: #EEF0EC; color: var(--ink); }
.side-nav a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.side-nav .badge { margin-left: auto; }
.side h3 { font: 700 .76rem/1 var(--font-body); color: var(--ink-3); margin: 18px 10px 6px; letter-spacing: .02em; }
.side-foot { margin-top: auto; padding: 12px 10px 0; font-size: .85rem; display: grid; gap: 6px; }
.side-foot a, .side-foot button { color: var(--ink-3); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Éléments communs ---------- */
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--theme, var(--hair)); flex: none; display: inline-block; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--hair); color: var(--ink-2); }
.badge.late { background: var(--late-bg); color: var(--late); }
.muted { color: var(--ink-3); }
.mock-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--lime); color: #2b3a10; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.h1 { font-family: var(--font-display); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); line-height: 1.15; margin: 0; color: var(--ink); }
.h2 { font-size: 1.02rem; font-weight: 700; margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head .sub { color: var(--ink-2); margin: 4px 0 0; }
.crumbs { font-size: .86rem; color: var(--ink-3); margin-bottom: 6px; display: none; }
.crumbs a { color: var(--ink-2); }
@media (min-width: 900px) { .crumbs { display: block; } }
.btn.btn-xs { min-height: 32px; padding: 4px 12px; font-size: .86rem; border-width: 1.5px; }
.espace-body .btn.btn-plain { background: #fff !important; color: var(--ink) !important; border: 1.5px solid #D9DDD6 !important; box-shadow: none !important; }
.espace-body .btn.btn-plain:hover { background: var(--surface-2); color: var(--ink); }
.espace-body .btn:not(.btn-plain) { box-shadow: 0 3px 10px rgba(216, 27, 106, .18); }
.espace-body .btn.btn-green, .espace-body .btn.btn-danger-ghost, .espace-body .btn.btn-wa { box-shadow: none; }
.icon-btn2 { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: none; border: 0; color: var(--ink-2); cursor: pointer; }
.icon-btn2:hover { background: #EEF0EC; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; }
.section-gap { margin-top: 26px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Statut : forme + mot, jamais la couleur seule */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; border: 0; cursor: default; }
.status i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.status.todo { background: #EFF1ED; color: var(--ink-2); }
.status.doing { background: var(--prog-bg); color: var(--prog); } .status.doing i { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status.done { background: var(--ok-bg); color: var(--ok); } .status.done i { background: currentColor; }
.status.cancel { background: #EFF1ED; color: var(--ink-3); text-decoration: line-through; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; }
.health i { width: 10px; height: 10px; display: inline-block; }
.health.ok { background: var(--ok-bg); color: var(--ok); } .health.ok i { background: var(--ok); border-radius: 50%; }
.health.watch { background: var(--soon-bg); color: var(--soon); } .health.watch i { background: var(--soon); transform: rotate(45deg) scale(.85); border-radius: 2px; }
.health.late { background: var(--late-bg); color: var(--late); } .health.late i { background: var(--late); clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 12px; }
.health.closed { background: #EFF1ED; color: var(--ink-2); } .health.closed i { background: var(--ink-3); border-radius: 2px; }
.due { font-size: .84rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.due.late { color: var(--late); } .due.soon { color: var(--soon); }
.due .ico { width: 15px; height: 15px; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--ink); background: var(--avc, #E3E6E0); flex: none; }
.av.none { background: #fff; border: 1.5px dashed var(--late); color: var(--late); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hair); color: var(--ink-2); white-space: nowrap; }
.pill.doc { border-style: dashed; border-color: var(--orange); color: var(--soon); background: #fff; }
.pill .ico { width: 13px; height: 13px; }
.bar { height: 6px; border-radius: 99px; background: #E9ECE6; overflow: hidden; min-width: 60px; }
.bar b { display: block; height: 100%; background: var(--green-800); border-radius: 99px; }

/* ---------- Case à cocher de tâche ---------- */
.tick { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 10px; flex: none; }
.tick span { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #A8B39F; display: grid; place-items: center; background: #fff; }
.tick svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.tick[aria-pressed="true"] span { background: var(--ok); border-color: var(--ok); }
.tick[aria-pressed="true"] svg { opacity: 1; }
.tick:hover span { border-color: var(--ok); }

/* ---------- Listes de tâches (style tableur léger) ---------- */
.tlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.trow { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 0 6px; padding: 4px 10px 4px 4px; border-bottom: 1px solid var(--hair); position: relative; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: #FAFBF9; }
.trow.is-done .ttitle { text-decoration: line-through; color: var(--ink-3); }
.ttitle { background: none; border: 0; padding: 6px 0 2px; text-align: left; font-weight: 600; cursor: pointer; color: var(--ink); width: 100%; }
.ttitle:hover { color: var(--pop-strong); }
.tmeta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding-bottom: 6px; }
@media (min-width: 900px) {
  .trow { grid-template-columns: 40px minmax(0, 1fr) 160px 190px 120px; padding: 0 12px 0 4px; min-height: 46px; }
  .tlist.no-who .trow, .tlist.no-who .thead { grid-template-columns: 40px minmax(0, 1fr) 190px 120px; }
  .tlist.no-who .tcol.c-who, .tlist.no-who .thead .c-who { display: none; }
  .ttitle { padding: 0; }
  .tmeta { grid-column: auto; padding: 0 0 6px; }
  .ttitle { padding-top: 8px; }
  .tcol { font-size: .86rem; }
}
.tcol { display: none; }
@media (min-width: 900px) { .tcol { display: flex; align-items: center; } }
.thead { display: none; }
@media (min-width: 900px) {
  .thead { display: grid; grid-template-columns: 40px minmax(0, 1fr) 160px 190px 120px; padding: 8px 12px 8px 4px; font-size: .76rem; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--hair); background: var(--surface-2); }
}
.group-head { display: flex; align-items: center; gap: 8px; margin: 22px 2px 8px; }
.group-head:first-child { margin-top: 0; }
.quick-add { display: flex; gap: 8px; padding: 6px 10px 6px 12px; border-top: 1px solid var(--hair); background: var(--surface-2); }
.quick-add input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; min-height: 38px; color: var(--ink); }
.quick-add input:focus { outline: none; }
.quick-add:focus-within { box-shadow: inset 0 0 0 2px var(--orange); }

/* ---------- Mes actions ---------- */
.hello { margin: 4px 0 18px; }
.hello .greet { color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.hello h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.15rem + 2vw, 2.4rem); line-height: 1.12; margin: 4px 0 0; color: var(--ink); max-width: 24ch; }
.hello h1 .late { color: var(--late); }
.home-grid { display: grid; gap: 22px; }
@media (min-width: 1180px) { .home-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.aside-card { padding: 14px 16px; }
.aside-card + .aside-card { margin-top: 14px; }
.aside-card h2 { margin-bottom: 10px; }
.mini-proj { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hair); text-decoration: none; color: var(--ink); }
.mini-proj:first-of-type { border-top: 0; }
.mini-proj .bar, .mini-proj small { grid-column: 2 / 4; }
.mini-proj:hover strong { color: var(--pop-strong); }
.week-mail { font-size: .9rem; color: var(--ink-2); }

/* ---------- Portefeuille de projets ---------- */
.seg { display: inline-flex; background: #EEF0EC; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 6px 12px; border-radius: 8px; font-size: .88rem; font-weight: 650; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: 34px; display: inline-flex; align-items: center; }
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.alert-strip { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 900px) { .alert-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.alert-tile { padding: 12px 14px; display: grid; gap: 2px; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; }
.alert-tile strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.alert-tile span { font-size: .86rem; color: var(--ink-2); }
.alert-tile.hot strong { color: var(--late); }
.alert-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.ptable { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; font-size: .9rem; }
.ptable th { text-align: left; font-size: .76rem; color: var(--ink-3); font-weight: 700; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.ptable td { padding: 10px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover { background: #FAFBF9; }
.ptable .pname { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); text-decoration: none; }
.pcards { display: grid; gap: 10px; }
.pcard { padding: 12px 14px; display: grid; gap: 8px; text-decoration: none; color: var(--ink); border-left: 6px solid var(--theme); }
.pcard .line { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.pcard strong { font-size: 1.02rem; }
@media (max-width: 899px) { .ptable { display: none; } }
@media (min-width: 900px) { .pcards { display: none; } }

/* ---------- Chronologie (Gantt) ---------- */
.gantt { background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; overflow-x: auto; }
.gantt-inner { min-width: 720px; position: relative; }
.g-scale, .g-row { display: grid; grid-template-columns: 200px 1fr; }
.g-scale { border-bottom: 1px solid var(--hair); background: var(--surface-2); font-size: .74rem; color: var(--ink-3); font-weight: 700; position: sticky; top: 0; }
.g-scale > div:first-child { padding: 8px 12px; }
.g-ticks { position: relative; height: 32px; }
.g-ticks span { position: absolute; top: 9px; transform: translateX(-50%); white-space: nowrap; }
.g-row { border-bottom: 1px solid var(--hair); min-height: 40px; }
.g-row:last-child { border-bottom: 0; }
.g-label { padding: 8px 12px; font-size: .86rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-label button, .g-label a { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; text-decoration: none; }
.g-track { position: relative; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #EFF1EC; }
.g-bar { position: absolute; top: 50%; height: 18px; transform: translateY(-50%); border-radius: 6px; background: var(--theme, var(--prog-bg)); border: 1.5px solid rgba(0,0,0,.12); min-width: 8px; cursor: pointer; padding: 0; }
.g-bar.done { opacity: .45; }
.g-bar.late { border-color: var(--late); box-shadow: inset 0 0 0 1px var(--late); }
.g-ms { position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%) rotate(45deg); background: var(--pop-strong); border-radius: 2px; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pop-strong); opacity: .5; z-index: 2; pointer-events: none; }
.g-today::after { content: "Aujourd'hui"; position: absolute; top: 2px; left: 4px; font-size: .7rem; font-weight: 700; color: var(--pop-strong); white-space: nowrap; }

/* ---------- Fiche projet ---------- */
.proj-head { display: grid; gap: 10px; margin-bottom: 14px; }
.proj-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.proj-title .theme-sq { width: 16px; height: 16px; border-radius: 4px; background: var(--theme); }
.props { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--ink-2); }
.props b { color: var(--ink); font-weight: 650; }
.props .bar { width: 120px; display: inline-block; vertical-align: middle; margin-left: 6px; }
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hair); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.ptabs a { padding: 9px 12px; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptabs a[aria-current="page"] { color: var(--ink); border-color: var(--pop-strong); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* ---------- Tableau (kanban) ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.col { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 14px; padding: 10px; min-height: 200px; scroll-snap-align: start; }
.col.drop { box-shadow: inset 0 0 0 2px var(--prog); }
.col-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 10px; }
.kcard { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 8px; cursor: grab; border-left: 5px solid var(--theme, var(--hair)); }
.kcard:active { cursor: grabbing; }
.kcard .ttitle { padding: 0; }
.kcard .line { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.kcard select { font: inherit; font-size: .8rem; border: 1px solid var(--hair); border-radius: 8px; padding: 3px 6px; background: #fff; }
@media (min-width: 900px) { .kcard select { display: none; } }

/* ---------- Panneau de tâche (tiroir à droite / plein écran sur téléphone) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(46, 53, 48, .28); z-index: 60; }
.drawer { position: fixed; z-index: 61; inset: 0; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 900px) { .drawer { inset: 0 0 0 auto; width: min(520px, 100vw); border-left: 1px solid var(--hair); box-shadow: -20px 0 40px rgba(46,53,48,.12); } }
.drawer-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--hair); background: #fff; }
.drawer-head .crumb { flex: 1; min-width: 0; font-size: .86rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-head .crumb a { color: var(--ink-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; }
.drawer-title { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 14px; }
.drawer-title textarea { flex: 1; font: 700 1.3rem/1.25 var(--font-body); border: 0; background: transparent; resize: none; color: var(--ink); padding: 6px 4px; border-radius: 8px; field-sizing: content; min-height: 2.6em; }
.drawer-title textarea:focus { outline: 2px solid var(--orange); }
.fields { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; align-items: center; font-size: .92rem; margin-bottom: 18px; }
.fields > label, .fields > span.k { color: var(--ink-3); font-weight: 600; }
.fields select, .fields input { font: inherit; min-height: 40px; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 8px; color: var(--ink); width: 100%; }
.fields select:hover, .fields input:hover { background: #fff; border-color: var(--hair); }
.fields select:focus, .fields input:focus { background: #fff; border-color: var(--green-600); outline: none; }
.date-pair { display: flex; gap: 6px; align-items: center; }
.block { margin-top: 20px; }
.block h3 { font-size: .9rem; color: var(--ink); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.subs { list-style: none; margin: 0; padding: 0; }
.subs li { display: flex; align-items: center; gap: 8px; min-height: 40px; border-bottom: 1px solid var(--hair); }
.subs label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.subs input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ok); }
.subs .add input { border: 0; background: transparent; font: inherit; min-height: 40px; flex: 1; }
.linked { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--hair); text-decoration: none; color: var(--ink); }
.linked:hover { border-color: var(--green-600); color: var(--ink); }
.linked .ico { width: 22px; height: 22px; color: var(--prog); }
.linked small { display: block; color: var(--ink-3); }
.linked.missing { border-style: dashed; border-color: var(--orange); background: var(--soon-bg); }
.msg-box { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 12px; white-space: pre-wrap; font-size: .92rem; line-height: 1.5; }
.comments { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.comments li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: .9rem; }
.comments .tip { background: var(--butter); border-radius: 10px; padding: 8px 10px; }
.comments time { color: var(--ink-3); font-size: .78rem; margin-left: 6px; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; min-width: 0; font: inherit; min-height: 42px; border: 1px solid var(--hair); border-radius: 10px; padding: 0 12px; background: #fff; }
.drawer-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hair); background: #fff; display: flex; gap: 8px; justify-content: space-between; align-items: center; }

/* ---------- Fenêtres (modales) ---------- */
.modal { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--bg); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 20px; }
.modal h2 { font-size: 1.2rem; color: var(--ink); margin: 0 0 6px; }
.modal .lead { color: var(--ink-2); margin: 0 0 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.f { display: grid; gap: 6px; margin-bottom: 14px; }
.f label { font-weight: 650; font-size: .92rem; }
.f .hint { font-size: .84rem; color: var(--ink-3); }
.f input, .f select, .f textarea { font: inherit; min-height: 44px; padding: 8px 12px; border: 1.5px solid #D9DDD6; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.f textarea { min-height: 84px; resize: vertical; }
.f input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--ok); }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500 !important; min-height: 32px; }
.f-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.choice { text-align: left; padding: 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--hair); cursor: pointer; display: grid; gap: 4px; border-top: 6px solid var(--theme, var(--hair)); }
.choice:hover, .choice[aria-pressed="true"] { border-color: var(--ink); }
.choice strong { font-size: .98rem; }
.choice small { color: var(--ink-3); }
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--hair); }
.steps li.on { background: var(--pop-strong); }
.steps li.done { background: var(--green-800); }
.warn { background: var(--soon-bg); color: var(--soon); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.reassign { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.reassign li { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair); font-size: .9rem; }
.reassign select { font: inherit; min-height: 38px; border-radius: 8px; border: 1px solid #D9DDD6; background: #fff; padding: 0 6px; }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 36px 18px; border: 1.5px dashed var(--hair); border-radius: 16px; color: var(--ink-2); }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.agenda-day { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.agenda-day .d { text-align: center; }
.agenda-day .d b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.agenda-day .d small { color: var(--ink-3); font-size: .78rem; }
.agenda-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.agenda-day li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agenda-day li button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 600; color: var(--ink); }
.agenda-day.today .d b { color: var(--pop-strong); }
.slot { display: inline-flex; align-items: center; gap: 6px; }
.prose { max-width: 70ch; line-height: 1.6; }
.prose h2 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--ink); }
.prose ol, .prose ul { padding-left: 1.3em; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.plist li:last-child { border-bottom: 0; }
.plist .av { width: 36px; height: 36px; font-size: .9rem; }
.plist .nm { flex: 1; min-width: 150px; }
.plist .nm small { display: block; color: var(--ink-3); }
.lock { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; color: var(--ink-2); background: #EFF1ED; padding: 4px 10px; border-radius: 999px; }
.lock .ico { width: 14px; height: 14px; }
.log { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.log li { padding: 9px 14px; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--ink-3); }
.settings { display: grid; gap: 14px; max-width: 760px; }
.settings .card { padding: 16px; }
.settings h2 { margin-bottom: 4px; }
.settings .card > p { color: var(--ink-2); margin: 0 0 12px; font-size: .92rem; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px var(--gutter); }
.login-card { width: 100%; max-width: 400px; padding: 26px 22px; box-shadow: var(--shadow); text-align: left; }
.login-card .logo { display: block; margin: 0 auto 8px; }
.login-card h1 { text-align: center; font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 4px; color: var(--ink); }
.login-card .lead { text-align: center; color: var(--ink-2); margin: 0 0 20px; }
.login-card .foot { text-align: center; font-size: .88rem; color: var(--ink-3); margin: 14px 0 0; }
.pw { position: relative; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; background: none; border: 0; color: var(--blue-700); font-weight: 600; font-size: .86rem; cursor: pointer; padding: 0 10px; }
.kbd { font-size: .74rem; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--ink-3); background: #fff; }
/* Recherche (palette) */
.modal.modal-search { top: 12vh; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: min(640px, 76dvh); background: #fff; }
.sp-bar { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--hair); }
.sp-lens svg { width: 20px; height: 20px; color: var(--green-800); display: block; }
.espace-body .sp-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 1.06rem/1.3 var(--font-body); color: var(--ink); min-height: 44px; padding: 0; -webkit-appearance: none; appearance: none; }
.sp-input::placeholder { color: var(--ink-3); font-weight: 500; }
.sp-input::-webkit-search-cancel-button { display: none; }
.espace-body .sp-close { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--ink-3); cursor: pointer; min-height: 40px; padding: 0 6px; border-radius: 8px; }
.sp-close svg { width: 18px; height: 18px; display: none; }
.sp-close:hover { background: var(--surface-2); }
.sp-results { overflow-y: auto; padding: 6px 8px 10px; flex: 1; overscroll-behavior: contain; }
.sp-group { font: 700 .74rem/1 var(--font-body); color: var(--ink-3); letter-spacing: .03em; text-transform: uppercase; padding: 14px 10px 6px; }
.espace-body .sp-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); min-height: 48px; }
.sp-item[aria-selected="true"] { background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-100); }
.sp-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--hair); display: grid; place-items: center; flex: none; font-size: 1.05rem; color: var(--green-800); }
.sp-ico svg { width: 18px; height: 18px; }
.sp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sp-txt strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-txt small { color: var(--ink-3); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-enter { color: var(--ink-3); font-size: .9rem; opacity: 0; }
.sp-item[aria-selected="true"] .sp-enter { opacity: 1; }
.sp-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 32px 16px; color: var(--ink-2); }
.sp-empty span { color: var(--ink-3); font-size: .9rem; }
.sp-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--hair); background: var(--surface-2); color: var(--ink-3); font-size: .8rem; }
.sp-foot .kbd { margin-right: 3px; }
@media (max-width: 899px) {
  .modal.modal-search { top: 0; bottom: auto; width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sp-foot, .sp-close .kbd, .sp-enter { display: none; }
  .sp-close svg { display: block; }
}

@media (prefers-reduced-motion: reduce) { .espace-body * { transition: none !important; animation: none !important; } }
.agenda-day .pill { white-space: normal; }
.g-today::after { top: auto; bottom: 2px; }
@media (max-width: 899px) {
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: 20px 20px 0 0; max-height: 92dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

.espace-body .seg [aria-pressed="true"], .espace-body .seg [aria-current="page"] { background: #fff !important; color: var(--ink) !important; box-shadow: 0 1px 2px rgba(0,0,0,.08) !important; border: 0 !important; }
.espace-body .seg button[aria-pressed="false"] { background: none !important; color: var(--ink-2) !important; border: 0 !important; }

/* ---------- Application (v1) : compléments ---------- */
.pad { padding: 8px 16px; }
.pad-x { padding: 4px 16px; }
.grow { flex: 1; min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; letter-spacing: .02em; }
.small { font-size: .86rem; }
.ml { margin-left: 6px; }
.section-gap-s { margin-top: 8px; }
.qa-form { display: contents; }
.grow-form { display: flex; flex: 1; }
.espace-body select.auto { width: auto; }
.espace-body input.grow { min-height: 40px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; }
.espace-body textarea.tall { min-height: 320px; font-family: inherit; line-height: 1.6; }
.slot-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.slot-form input { font: inherit; min-height: 40px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; background: #fff; flex: 1 1 140px; min-width: 0; }
.slot-form input.num { flex: 0 0 72px; }
.invite-form { margin-bottom: 8px; max-width: 560px; }
.wiki-row { grid-template-columns: 40px 1fr auto !important; text-decoration: none; }
.wiki-row .ttitle { text-decoration: none; }
.linked.flat { border: 0; border-radius: 0; border-bottom: 1px solid var(--hair); }
.contact-links .btn { font-weight: 600; }
.contact-links .ico { width: 15px; height: 15px; }
.steps-text { padding-left: 1.2em; display: grid; gap: 10px; margin: 0 0 14px; }
.modal-day { border: 0; grid-template-columns: 1fr; padding: 0; }
.pill.fer { background: #FCEEEB; border-color: #F2C9C0; color: var(--late); }
.pill.hol { background: #E4F1F8; border-color: #C7DFEC; color: var(--prog); }
.pill.star { background: var(--lime); border-color: transparent; color: #2b3a10; }
.prose p { margin: 0 0 8px; }

/* Agenda : vue mois */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head .h2 { min-width: 170px; justify-content: center; }
@media (max-width: 420px) { .cal-head { gap: 4px; } .cal-head .h2 { min-width: 0; flex: 1; font-size: 1rem; } .cal-head > .btn { margin-left: auto; padding-inline: 10px; } }
.cal-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--hair); gap: 1px; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; min-width: 320px; }
.cal-dow { background: var(--surface-2); font-size: .74rem; font-weight: 700; color: var(--ink-3); padding: 6px 8px; }
.cal-cell { background: #fff; min-height: 110px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cal-cell.we { background: #FBFCFA; }
.cal-cell.out { background: #F6F7F5; }
.cal-cell.out .cal-num b { color: #BFC4BB; }
.cal-cell.hol { background: repeating-linear-gradient(135deg, #EEF6FB 0 6px, #F7FBFD 6px 12px); }
.cal-cell.fer { background: #FFF4F1; }
.cal-num { display: flex; align-items: baseline; gap: 6px; min-height: 22px; }
.cal-num b { font-size: .86rem; color: var(--ink-2); }
.cal-num small { font-size: .66rem; font-weight: 700; color: var(--prog); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell.fer .cal-num small { color: var(--late); }
.cal-cell.today .cal-num b { background: var(--pop-strong); color: #fff; border-radius: 999px; padding: 1px 7px; }
.cal-ev { display: block; width: 100%; text-align: left; font-size: .74rem; font-weight: 600; line-height: 1.25; padding: 2px 5px; border-radius: 5px; border: 0; background: color-mix(in srgb, var(--theme, #ddd) 35%, #fff); border-left: 3px solid var(--theme, #ccc); color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cal-ev.j { background: var(--lime); border-left-color: #6E8A00; font-weight: 800; }
.cal-ev.slot { background: #fff; border: 1px dashed var(--prog); border-left-width: 3px; }
.cal-abs { display: flex; align-items: center; gap: 4px; font-size: .7rem; color: var(--ink-2); background: #EFF1ED; border-radius: 5px; padding: 1px 4px; overflow: hidden; white-space: nowrap; }
.cal-abs .av { width: 16px; height: 16px; font-size: .6rem; }
.cal-more { font-size: .72rem; font-weight: 700; color: var(--prog); background: none; border: 0; padding: 0 4px; text-align: left; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .82rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--hair); }
.lg-hol { background: repeating-linear-gradient(135deg, #CFE5F2 0 3px, #F7FBFD 3px 6px); }
.lg-fer { background: #FFE2DA; }
.lg-abs { background: #EFF1ED; }
.lg-j { background: var(--lime); }
@media (max-width: 899px) {
  .cal-cell { min-height: 64px; padding: 3px; cursor: pointer; }
  .cal-ev, .cal-abs span { font-size: 0; padding: 0; height: 6px; border-radius: 3px; border-left-width: 0; }
  .cal-ev.j { height: 8px; }
  .cal-abs { height: 6px; padding: 0; }
  .cal-abs .av { display: none; }
  .cal-num small { display: none; }
  .cal-more { font-size: .66rem; }
}

.block select { font: inherit; min-height: 40px; border: 1px solid var(--hair); border-radius: 8px; padding: 0 8px; background: #fff; width: 100%; color: var(--ink); }
.flabel { font-weight: 650; font-size: .92rem; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1.5px solid var(--hair); border-radius: 999px; background: #fff; cursor: pointer; font-size: .9rem; min-height: 40px; }
.chip-check input { width: 18px; height: 18px; accent-color: var(--ok); }
.chip-check:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }

/* Intégration au site public */
.espace-body .site-header { z-index: 45; }
.login-wrap { min-height: calc(100dvh - var(--header-h)); }
.side-brand { display: none; }
.side .new-btn { margin-top: 4px; }
.admin-shell.embedded { max-width: 980px; }
.admin-shell.embedded .admin-panel, .admin-shell.embedded .card { background: #fff; }
.site-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); }
.site-link:hover { border-color: var(--green-600); color: var(--ink); }
.site-link .ico { width: 22px; height: 22px; color: var(--prog); }
.site-link small { display: block; color: var(--ink-3); }
.cal-ev.pub { background: #fff; border: 1px solid var(--prog); border-left-width: 3px; }
.espace-body { touch-action: manipulation; }
.drawer, .modal { overscroll-behavior: contain; }
.h1, .hello h1 { text-wrap: balance; }
.topbar { height: 48px; }

/* ==========================================================================
   v4 (octobre 2026) : édition en ligne, catégories, éditeur riche, réunions,
   notices, clôture en deux colonnes, administration du site
   ========================================================================== */
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-emoji { width: 22px; text-align: center; flex: none; font-size: 1rem; }
.ico.ico-xs { width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px; }
.mb { margin-bottom: 12px; }
.ml-auto { margin-left: auto; }
.nowrap { white-space: nowrap; }
.end { justify-content: flex-end; }
.theme-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--theme, #ddd) 55%, #fff); font-size: 1rem; flex: none; line-height: 1; }
.proj-title .theme-ico { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 11px; }
.ptable .pname .theme-ico { width: 26px; height: 26px; font-size: .9rem; }

/* Catégories : icône + couleur discrète, jamais la couleur seule */
.cat-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--cat-bg, #EFF1ED); color: var(--ink, #1F2A1D); white-space: nowrap; }
.kcard { border-left-color: var(--cat, var(--hair)); }

/* Lignes de tâche : on modifie directement, sans ouvrir */
.trow { grid-template-columns: 40px minmax(0, 1fr); }
.trow.is-late { box-shadow: inset 3px 0 0 var(--late); }
.tmain { min-width: 0; padding: 4px 0; }
.tline { display: flex; align-items: center; gap: 4px; }
.in-title { flex: 1; min-width: 0; font: inherit; font-weight: 650; color: var(--ink); border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 6px 8px; margin-left: -8px; min-height: 36px; text-overflow: ellipsis; }
.in-title:hover { border-color: var(--hair); background: #fff; }
.in-title:focus { outline: none; border-color: var(--green-600); background: #fff; box-shadow: 0 0 0 3px rgba(124, 141, 113, .18); }
.trow.is-done .in-title { text-decoration: line-through; color: var(--ink-3); }
.open-btn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.open-btn:hover, .open-btn:focus-visible { background: #EEF0EC; color: var(--ink); }
.open-btn .ico { width: 18px; height: 18px; }
.tmeta { padding: 0 0 4px; gap: 4px 8px; }
.in-sel, .in-date { font: inherit; font-size: .85rem; color: var(--ink-2); border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 6px; min-height: 34px; max-width: 100%; cursor: pointer; }
.in-sel:hover, .in-date:hover { border-color: var(--hair); background: #fff; }
.in-sel:focus, .in-date:focus { outline: none; border-color: var(--green-600); background: #fff; }
.in-sel.none { color: var(--late); font-weight: 650; }
.in-date.late { color: var(--late); font-weight: 700; }
.in-date.soon { color: var(--soon); font-weight: 650; }
.in-sel.st-done { color: var(--ok); font-weight: 700; } .in-sel.st-doing { color: var(--prog); font-weight: 700; } .in-sel.st-cancel { color: var(--ink-3); text-decoration: line-through; }
.c-who { gap: 4px; min-width: 0; }
.c-who .in-sel { flex: 1; min-width: 0; }
.late-flag { color: var(--late); display: inline-flex; }
.late-flag .ico { width: 15px; height: 15px; }
.m-edit { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; width: 100%; }
.m-edit label { display: inline-flex; align-items: center; gap: 2px; }
.m-edit .ico { width: 15px; height: 15px; color: var(--ink-3); }
.m-edit .av { width: 20px; height: 20px; font-size: .64rem; }
.m-date.late .ico { color: var(--late); }
@media (min-width: 900px) {
  .trow, .thead { grid-template-columns: 40px minmax(0, 1fr) 190px 150px 96px 116px; }
  .tlist.no-who .trow, .tlist.no-who .thead { grid-template-columns: 40px minmax(0, 1fr) 150px 96px 116px; }
  .trow { min-height: 52px; }
}
.todo-prog { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--ink-2); font-weight: 650; }
.todo-prog .bar { width: 56px; min-width: 56px; height: 6px; }
.todo-prog .bar b { background: var(--ok); }

/* Tiroir de tâche : blocs propres à la catégorie */
.dur-chips, .var-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { font: inherit; font-size: .82rem; font-weight: 650; padding: 4px 10px; min-height: 32px; border-radius: 999px; border: 1.5px solid var(--hair); background: #fff; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--green-600); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-block { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 14px; }
.msg-edit { width: 100%; font: inherit; font-size: .9rem; min-height: 120px; border: 1.5px solid var(--hair); border-radius: 10px; padding: 10px; margin: 8px 0; background: #fff; resize: vertical; line-height: 1.5; }
.var-chips { margin-top: 8px; }
.var-chips .chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; min-height: 28px; padding: 2px 8px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.mini-table th, .mini-table td { padding: 5px 6px; border-bottom: 1px solid var(--hair); text-align: left; }
.mini-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-table tfoot th { border-bottom: 0; }
.mini-table.exp input { font: inherit; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; background: transparent; }
.mini-table.exp input:hover, .mini-table.exp input:focus { border-color: var(--hair); background: #fff; outline: none; }
.mini-table.exp td.num input { text-align: right; width: 64px; }

/* Éditeur de texte enrichi */
.md-editor { border: 1.5px solid #D9DDD6; border-radius: 12px; background: #fff; overflow: hidden; }
.md-editor:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(124, 141, 113, .15); }
.md-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-bottom: 1px solid var(--hair); background: var(--surface-2); }
.seg.seg-sm button { min-height: 30px; padding: 4px 10px; font-size: .82rem; }
.md-tools { display: flex; flex-wrap: wrap; gap: 2px; }
.md-btn { min-width: 34px; height: 32px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.md-btn.b { font-weight: 900; } .md-btn.i { font-style: italic; font-family: Georgia, serif; }
.md-btn:hover, .md-btn:focus-visible { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.f .md-input, .md-input { display: block; width: 100%; border: 0 !important; border-radius: 0 !important; min-height: 200px; padding: 12px 14px; font: inherit; line-height: 1.6; resize: vertical; background: #fff; }
.md-input.tall { min-height: 340px; }
.md-input:focus { outline: none; }
.md-preview { padding: 12px 16px; min-height: 200px; }
.md-help { margin: 0; padding: 6px 12px; font-size: .74rem; color: var(--ink-3); border-top: 1px solid var(--hair); background: var(--surface-2); }
.prose .rich h3, .md-preview .rich h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.rich p { color: var(--ink); }

/* Deux colonnes (bilan, clôture) */
.two-col { display: grid; gap: 16px; }
@media (min-width: 1080px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.col-stack { display: grid; gap: 14px; align-content: start; }
.pad-l { padding: 16px 18px; }
.pad-l > .h2 { margin-bottom: 8px; }
.tall-s { width: 100%; min-height: 220px; font: inherit; line-height: 1.55; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 10px 12px; background: #fff; resize: vertical; }
.bilan-card { padding: 14px 16px; display: grid; gap: 8px; }
.bilan-block h4 { margin: 0 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.bilan-block .rich p { margin: 0 0 4px; }
.figures { margin: 0; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
.viewer { margin-top: 4px; }
.result { margin: 6px 0 0; font-size: 1.05rem; }
.result .pos { color: var(--ok); } .result .neg { color: var(--late); }
.big-num { margin: 6px 0 0; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.f-row.f-row-3 { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 599px) { .f-row, .f-row.f-row-3 { grid-template-columns: 1fr; } }

/* Assistant nouveau projet */
.modal.modal-wide { width: min(720px, calc(100vw - 24px)); }
@media (max-width: 899px) { .modal.modal-wide { width: 100vw; } }
.reassign li { grid-template-columns: 1fr 170px; }
.reassign li.off { opacity: .5; }
.reassign .keep { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.reassign .keep input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); flex: none; }
.past-box { border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.past-box > summary { cursor: pointer; font-weight: 700; }
.past-proj { padding: 10px 0; border-top: 1px solid var(--hair); display: grid; gap: 6px; }
.past-proj:first-of-type { border-top: 0; }
.past-proj p { margin: 0; }
.recap { padding-left: 1.2em; display: grid; gap: 4px; margin: 0 0 14px; }
.radio-set { border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; background: var(--soon-bg); }
.radio-set input { width: 18px; height: 18px; accent-color: var(--ok); }

/* Réunions */
.mtable td { vertical-align: middle; }
.decisions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: dec; }
.decision { padding: 12px 14px; }
.decision-text { font-weight: 600; min-width: 200px; }
.remarks { margin: 8px 0 0; font-size: .9rem; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.vote { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; }
.vote i { width: 10px; height: 10px; display: inline-block; }
.vote-unanimite { background: var(--ok-bg); color: var(--ok); } .vote-unanimite i { background: var(--ok); border-radius: 50%; }
.vote-partiel { background: var(--soon-bg); color: var(--soon); } .vote-partiel i { background: linear-gradient(90deg, var(--soon) 50%, transparent 50%); border: 2px solid var(--soon); border-radius: 50%; width: 11px; height: 11px; }
.vote-refuse { background: var(--late-bg); color: var(--late); } .vote-refuse i { background: var(--late); clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); width: 11px; height: 11px; }
.decision-edit { padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.decision-edit textarea { min-height: 60px; }
.vote-seg .v-unanimite[aria-pressed="true"] { color: var(--ok) !important; }
.vote-seg .v-partiel[aria-pressed="true"] { color: var(--soon) !important; }
.vote-seg .v-refuse[aria-pressed="true"] { color: var(--late) !important; }
.title-preview { margin: -6px 0 12px; font-size: .86rem; color: var(--ink-3); }
.settings.wide { max-width: 980px; }
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); padding: 10px 12px; border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--shadow); z-index: 5; }
@media (min-width: 900px) { .sticky-actions { bottom: 12px; } }
.cal-ev.meet { background: #ECE3FA; border-left-color: #8B6BC8; }
.lg-meet { background: #ECE3FA; }

/* Notices */
.notice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.notice-card { display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--ink); border-top: 5px solid var(--green); align-content: start; }
.notice-card.c-terra { border-top-color: var(--terra); } .notice-card.c-orange { border-top-color: var(--orange); } .notice-card.c-blue { border-top-color: var(--blue); }
.notice-card:hover { box-shadow: var(--shadow); }
.notice-card p { margin: 0; }
.vis { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.vis::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vis.on { background: var(--ok-bg); color: var(--ok); } .vis.off { background: #EFF1ED; color: var(--ink-2); }
.vis.off::before { background: none; border: 2px solid currentColor; width: 6px; height: 6px; }
.att-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.att-video { padding: 8px; }
.att-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; }
.att-video p { margin: 6px 4px 0; }
.links-edit { display: grid; gap: 8px; }
.link-row { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: center; padding: 8px; border: 1px solid var(--hair); border-radius: 12px; background: var(--surface-2); }
@media (min-width: 760px) { .link-row { grid-template-columns: 150px 1fr 1.4fr 40px; } }
.link-row input { font: inherit; min-height: 40px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; background: #fff; min-width: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--sw, #ddd); box-shadow: 0 0 0 1px var(--hair); cursor: pointer; padding: 0; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.swatch.tile-green { --sw: var(--green); } .swatch.tile-terra { --sw: var(--terra); } .swatch.tile-orange { --sw: var(--orange); } .swatch.tile-blue { --sw: var(--blue); }

/* Administration site */
.toc { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; position: sticky; top: calc(var(--header-h) + 0px); z-index: 4; padding: 6px 0; background: var(--bg-soft); }
@media (max-width: 899px) { .toc { top: 0; } }
.toc a { font-size: .84rem; font-weight: 650; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--hair); color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); border-color: var(--green-600); }
.settings .card { scroll-margin-top: calc(var(--header-h) + 60px); }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
img.av { object-fit: cover; }
.av.av-lg { width: 40px; height: 40px; font-size: .95rem; }
.av.av-xl { width: 72px; height: 72px; font-size: 1.6rem; }
.plist .av.av-lg { width: 40px; height: 40px; }
.kids-edit { display: grid; gap: 8px; margin-bottom: 12px; }
.kid-row { display: grid; grid-template-columns: 1fr 140px 40px; gap: 8px; align-items: center; }
.kid-row input, .kid-row select { font: inherit; min-height: 42px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; background: #fff; min-width: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); cursor: pointer; }
.switch-row small { display: block; color: var(--ink-3); font-size: .86rem; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #CDD2C9; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--orange); outline-offset: 2px; }
.theme-edit { display: grid; gap: 10px; }
.theme-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-left: 6px solid var(--theme); }
.theme-row input { font: inherit; font-weight: 650; min-height: 38px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; background: #fff; width: 100%; margin-bottom: 8px; }
@media (max-width: 599px) { .theme-row { grid-template-columns: auto 1fr auto; } .theme-row > small { display: none; } }
.emoji-pick { position: relative; }
.emoji-pick > summary { list-style: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--theme) 50%, #fff); cursor: pointer; border: 1.5px solid var(--hair); }
.emoji-pick > summary::-webkit-details-marker { display: none; }
.emoji-grid { position: absolute; z-index: 20; top: 54px; left: 0; width: 272px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-lg); }
.emoji-grid button { font-size: 1.2rem; height: 32px; border: 0; background: none; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover, .emoji-grid button[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.table-scroll { overflow-x: auto; }
.edit-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.edit-table th { text-align: left; font-size: .76rem; color: var(--ink-3); padding: 6px; border-bottom: 1px solid var(--hair); }
.edit-table td { padding: 4px; border-bottom: 1px solid var(--hair); }
.edit-table input, .edit-table select { font: inherit; font-size: .88rem; min-height: 36px; border: 1px solid #D9DDD6; border-radius: 8px; padding: 0 8px; background: #fff; width: 100%; min-width: 0; }
.edit-table input.num { width: 64px; }
.jx { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink-3); }
.roles p { margin: 0 0 6px; }
.invite-form select { font: inherit; min-height: 40px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 8px; background: #fff; }
.plist select { font: inherit; font-size: .86rem; min-height: 34px; border: 1px solid var(--hair); border-radius: 8px; padding: 0 6px; background: #fff; }
.tip-line { color: var(--ink-2); }
.mini-proj { grid-template-columns: 22px 1fr auto; }
.block .grow { width: auto; }
.espace-body .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.home-grid section + section, .home-grid details { margin-top: 20px; }
.f-row { align-items: start; } .icon-btn2:disabled { opacity: .3; cursor: not-allowed; }
.slot-form select { font: inherit; min-height: 40px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 8px; background: #fff; }
@media (max-width: 599px) { .mini-table.exp td.num input { width: 48px; } .mini-table.exp th:nth-child(4), .mini-table.exp td:nth-child(4) { display: none; } }
.settings > *, .two-col > *, .col-stack > * { min-width: 0; }
@media (max-width: 599px) {
  .invite-form input.grow { flex: 1 1 100%; }
  .theme-row { grid-template-columns: auto 1fr auto; gap: 10px; }
  .kid-row { grid-template-columns: 1fr 110px 40px; }
  .page-head .row-gap .btn { min-height: 40px; }
}
@media (max-width: 899px) { .in-sel, .in-date { min-height: 40px; } .open-btn { width: 40px; height: 40px; } }

/* v4.1 : sollicitation parents visible, bulles cliquables, bilans complets */
.parents-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; margin: 4px 0 14px; text-decoration: none; color: var(--ink); border: 2px solid; }
.parents-strip.empty-s { border: 2px dashed #E36FA2; background: #FFF4F9; }
.parents-strip.draft { border-color: var(--orange); background: var(--soon-bg); }
.parents-strip.live { border-color: #8FB07D; background: var(--ok-bg); }
.parents-strip:hover { box-shadow: var(--shadow); color: var(--ink); }
.parents-strip .ps-ico { font-size: 1.8rem; line-height: 1; }
.parents-strip strong { display: block; }
.parents-strip small { display: block; color: var(--ink-2); }
.parents-strip.draft .ps-state { color: var(--soon); }
.parents-strip.live .ps-state { color: var(--ok); }
.parents-strip .grow { flex: 1 1 220px; min-width: 0; }
.ptabs .badge { margin-left: 6px; }
.badge.ok-b { background: var(--ok-bg); color: var(--ok); }
.badge.warn-b { background: var(--soon-bg); color: var(--soon); }
.back-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--ink-2); }
.back-inline .ico { width: 16px; height: 16px; }
.soll-card { padding: 16px 18px; display: grid; gap: 12px; margin-bottom: 14px; border-left: 6px solid var(--orange); }
.soll-card.live { border-left-color: #8FB07D; }
.soll-card p { margin: 0; }
.soll-head { display: flex; gap: 12px; align-items: flex-start; }
.soll-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stat-box { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.stat-box strong { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; }
.stat-box span { font-size: .82rem; color: var(--ink-2); }
.pill-link { cursor: pointer; text-decoration: none; font: inherit; font-size: .76rem; font-weight: 700; }
.pill-link:hover, .pill-link:focus-visible { border-color: var(--ink-2); color: var(--ink); }
.pill-notice { background: #EAF2F7; border-color: #C7DFEC; color: #1B5F85; }
.pill-msg { background: #FFF6D8; border-color: #F2DE9C; color: #7A4E00; }
.pill.pill-ok { background: var(--ok-bg); border-color: #C7DDB9; color: var(--ok); }
.facts { margin: 0; font-size: .88rem; color: var(--ink-2); }
.mini-table tr.sum th { border-top: 1.5px solid var(--ink-3); }
.mini-table .pos { color: var(--ok); } .mini-table .neg { color: var(--late); }
.tip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.bilan-more > summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.task-recap { list-style: none; margin: 6px 0 0; padding: 0; font-size: .88rem; }
.task-recap li { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; }
.st-dot.done { background: var(--ok); border-color: var(--ok); } .st-dot.doing { border-color: var(--prog); background: linear-gradient(90deg, var(--prog) 50%, transparent 50%); } .st-dot.cancel { opacity: .4; }

/* Éditeur visuel (comme un traitement de texte) */
.rte-wrap { border: 1.5px solid #D9DDD6; border-radius: 14px; background: #fff; }
.rte-wrap:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(124, 141, 113, .15); }
.rte-bar { position: sticky; top: calc(var(--header-h) + 0px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hair); background: var(--surface-2); border-radius: 13px 13px 0 0; }
@media (max-width: 899px) { .rte-bar { top: 0; } .rte-sep { display: none; } .rte-btn { min-width: 40px; height: 40px; } }
.rte-btn { flex: none; display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; }
.rte-btn svg { width: 19px; height: 19px; }
.rte-btn.txt { font-weight: 800; font-size: .86rem; }
.rte-btn.txt.h4 { font-weight: 700; font-size: .8rem; }
.rte-btn:hover, .rte-btn:focus-visible { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--hair); }
.rte-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rte-sep { width: 1px; height: 22px; background: var(--hair); margin: 0 4px; flex: none; }
.rte { min-height: 180px; padding: 14px 18px; outline: none; line-height: 1.65; font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
.rte.tall { min-height: 340px; }
.rte.is-empty::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; white-space: pre-line; }
.rte p { margin: 0 0 .6em; }
.rte h3 { font-family: var(--font-display); font-size: 1.25rem; margin: .8em 0 .35em; color: var(--ink); }
.rte h4 { font-size: 1.05rem; margin: .7em 0 .3em; color: var(--ink); }
.rte ul, .rte ol { margin: 0 0 .6em; padding-left: 1.5em; }
.rte li { margin-bottom: .2em; }
.rte ul.checklist { list-style: none; padding-left: 0; }
.rte ul.checklist li { position: relative; padding-left: 30px; }
.rte ul.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border: 2px solid var(--green-600); border-radius: 5px; cursor: pointer; background: #fff; }
.rte ul.checklist li.is-checked::before { background: var(--green-600); box-shadow: inset 0 0 0 3px #fff; }
.rte ul.checklist li.is-checked { color: var(--ink-3); text-decoration: line-through; }
.rte blockquote { margin: 0 0 .6em; padding: 8px 14px; border-left: 4px solid var(--green); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.rte hr { border: 0; border-top: 2px solid var(--hair); margin: 1em 0; }
.rte a { color: var(--blue-700); }
.rte-help { margin: 0; padding: 8px 14px; font-size: .78rem; color: var(--ink-3); border-top: 1px solid var(--hair); }
.espace-body .rte-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.form-chooser { margin-bottom: 14px; }
.more-form > summary { list-style: none; display: inline-flex; cursor: pointer; margin-bottom: 12px; }
.more-form > summary::-webkit-details-marker { display: none; }
.choice { align-content: start; }

/* ---------- Projets › Tableau de bord ---------- */
.dash { --dv: #2F6FA0; --dv-track: #DDE8F2; --dv-neg: #D0632F; --dv-grid: #ECEFEA; display: grid; gap: 14px; }
.dash-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-filter .seg { overflow-x: auto; max-width: 100%; }
.dash-k { display: block; font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.dash-hero { display: grid; gap: 18px; padding: 20px; }
@media (min-width: 900px) { .dash-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }
.dash-big { display: block; font: 750 clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem)/1.05 var(--font-body); color: var(--ink); margin: 6px 0; letter-spacing: -.01em; }
.dash-big.neg { color: var(--late); }
.dash-goal { display: grid; gap: 8px; justify-items: start; }
.dash-goal-head { font-size: .95rem; }
.dv-meter { width: 100%; height: 12px; border-radius: 99px; background: var(--dv-track); overflow: hidden; }
.dv-meter span { display: block; height: 100%; background: var(--dv); border-radius: 99px; }
.dash-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .dash-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .dash-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dash-tile { padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.dash-tile strong { font: 700 1.45rem/1.15 var(--font-body); color: var(--ink); }
.dash-tile small { font-size: .78rem; }
.dash-chart { padding: 16px; position: relative; min-width: 0; }
.dash-sub { margin: 2px 0 10px; font-size: .86rem; }
.dash-two { display: grid; gap: 14px; }
@media (min-width: 900px) { .dash-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dv-wrap { width: 100%; }
.dv-svg { width: 100%; height: auto; display: block; overflow: visible; }
.dv-grid { stroke: var(--dv-grid); stroke-width: 1; }
.dv-axis { stroke: #CDD3C9; stroke-width: 1; }
.dv-tick { font: 500 11px var(--font-body); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.dv-ref { stroke: var(--ink-2); stroke-width: 1; }
.dv-ref-lab { font: 650 11px var(--font-body); fill: var(--ink-2); }
.dv-area { fill: var(--dv); fill-opacity: .1; }
.dv-line { fill: none; stroke: var(--dv); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dv-dot { fill: var(--dv); stroke: #fff; stroke-width: 2; }
.dv-end { font: 700 12px var(--font-body); fill: var(--ink); }
.dv-cross { stroke: var(--ink-3); stroke-width: 1; }
.dv-hit { fill: transparent; cursor: crosshair; outline: none; }
.dv-hit:focus-visible { fill: rgba(47, 111, 160, .08); }
.dv-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: .8rem; display: grid; gap: 1px; box-shadow: var(--shadow); max-width: 240px; }
.dv-tip[hidden] { display: none; }
.dv-tip span { color: #DDE3D9; }
.dv-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dv-hbars li { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 32px; border-radius: 8px; padding: 0 4px; outline: none; }
.dv-hbars li:hover, .dv-hbars li:focus-visible { background: var(--surface-2); }
.dv-lab { font-size: .88rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-track { height: 16px; display: block; }
.dv-bar { display: block; height: 100%; max-height: 16px; background: var(--dv); border-radius: 0 4px 4px 0; }
.dv-val { font-size: .86rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }
.dash-table { margin-top: 8px; }
.dash-table summary { cursor: pointer; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.dash-table table { margin-top: 8px; }
.table-scroll { overflow-x: auto; }
.dash-ptable td, .dash-ptable th { vertical-align: middle; }
.dash-ptable .strong { font-weight: 700; }
.dash-ptable .dv-col { width: 22%; min-width: 110px; }
.dv-div { position: relative; display: block; height: 14px; }
.dv-div .dv-zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #CDD3C9; }
.dv-div b { position: absolute; top: 0; height: 100%; }
.dv-div b.pos { left: 50%; background: var(--dv); border-radius: 0 4px 4px 0; }
.dv-div b.neg { right: 50%; background: var(--dv-neg); border-radius: 4px 0 0 4px; }
.dash-ptable .pname { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; color: var(--ink); text-decoration: none; }
.obj-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 12px; }
.euro-in { position: relative; }
.euro-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.euro-in input { padding-right: 30px; }
@media (max-width: 899px) { .dash-ptable .dv-col { display: none; } }

/* ---------- Paramétrage › E-mails ---------- */
.mail-state { display: flex; gap: 14px; align-items: flex-start; }
.mail-state p { margin: 4px 0 0; }
.mail-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 4px; background: var(--ink-3); box-shadow: 0 0 0 4px #EFF1ED; }
.mail-state.is-ok .mail-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.mail-state.is-warn .mail-dot { background: var(--late); box-shadow: 0 0 0 4px var(--late-bg); }
.mail-form .f-row { margin-bottom: 4px; }
.mail-adv { margin: 10px 0 4px; }
.mail-adv summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: .9rem; padding: 6px 0; }
.hint-box { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: .9rem; }
.hint-box ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.hint-box small { display: block; }
.link-btn.danger { color: var(--late); }
/* Envoi d'un message par e-mail */
.mail-to { display: grid; gap: 6px; margin: 4px 0 10px; }
.mail-to label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; cursor: pointer; }
.mail-to input { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.mail-to small { color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.mail-preview { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; max-height: 200px; overflow-y: auto; font-size: .88rem; }
.mail-result li { margin: 2px 0; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: .92rem; margin-top: 6px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ok); }
.mail-compose { display: grid; gap: 4px; }
.mail-fs { border: 1px solid var(--hair); border-radius: 14px; padding: 10px 14px 12px; margin: 0 0 12px; min-width: 0; display: grid; gap: 6px; }
.mail-fs legend { font-weight: 700; padding: 0 6px; color: var(--ink); }
.mail-fs > .k { font-size: .84rem; font-weight: 650; color: var(--ink-2); margin-top: 6px; }
.mail-count { margin: 6px 0 0; font-weight: 650; color: var(--ok); font-size: .9rem; }
.mail-count.is-empty { color: var(--ink-3); font-weight: 500; }
.pp { display: grid; gap: 6px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chips:empty { display: none; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--green-50); border: 1px solid var(--green-100); font-size: .86rem; font-weight: 600; }
.espace-body .pp-chip button { border: 0; background: none; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1.05rem; line-height: 1; color: var(--ink-2); }
.pp-chip button:hover { background: #fff; }
.pp-field { position: relative; }
.espace-body .pp-input { width: 100%; font: inherit; min-height: 42px; padding: 8px 12px; border: 1.5px solid #D9DDD6; border-radius: 10px; background: #fff; color: var(--ink); }
.pp-sugg { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.pp-sugg[hidden] { display: none; }
.espace-body .pp-sugg button { width: 100%; text-align: left; display: grid; gap: 1px; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink); }
.pp-sugg button:hover, .pp-sugg button:focus-visible { background: var(--green-50); }
.pp-sugg small { color: var(--ink-3); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.att-list:empty { display: none; }
.att-list li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 10px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; min-width: 0; }
.att-list li.att-total { border: 0; background: none; padding: 0 2px; }
.att-name { display: grid; min-width: 0; flex: 1; }
.att-name strong, .att-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-name small { color: var(--ink-3); font-size: .8rem; }
.link-add { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; }
.espace-body .link-add input { font: inherit; min-height: 40px; padding: 6px 10px; border: 1.5px solid #D9DDD6; border-radius: 10px; background: #fff; min-width: 0; }
@media (max-width: 599px) { .link-add { grid-template-columns: 1fr; } }
.ml-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--hair); font-size: 1.2rem; flex: none; }
/* Tableau de bord : objectifs et écarts */
.dash { --dv-plan: #9AA39A; }
.dash-land { margin: 8px 0 0; font-size: .95rem; }
.dv-meter2 { position: relative; height: 14px; }
.dv-meter2 .m-plan, .dv-meter2 .m-done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.dv-meter2 .m-plan { background: repeating-linear-gradient(135deg, #B9CDE0 0 4px, #D3E1EE 4px 8px); }
.dv-meter2 .m-done { background: var(--dv); box-shadow: 2px 0 0 #fff; }
.dv-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--ink-2); margin: 2px 0 6px; }
.dv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dv-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.dv-legend .lg-done { background: var(--dv); }
.dv-legend .lg-plan { background: repeating-linear-gradient(135deg, #B9CDE0 0 3px, #D3E1EE 3px 6px); }
.dv-legend .lg-plan-line { height: 0; border-top: 2px dashed var(--dv-plan); border-radius: 0; }
.dv-legend .lg-ref { height: 0; border-top: 1px solid var(--ink-2); border-radius: 0; }
.dv-legend .lg-neg { background: var(--dv-neg); }
.dv-legend .lg-tick { width: 3px; height: 14px; background: var(--ink); border-radius: 1px; }
.dv-plan { fill: none; stroke: var(--dv-plan); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; }
.dv-plan-lab { font: 650 11px var(--font-body); fill: var(--ink-2); }
.dv-div .dv-goal { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 1px; box-shadow: 0 0 0 1px #fff; }
.gap-ok { color: var(--ok); font-weight: 650; }
.gap-bad { color: var(--late); font-weight: 650; }
.dash-tile strong.gap-ok, .dash-tile strong.gap-bad { font-size: 1.3rem; }
.dash-alerts { padding: 16px; }
.dash-alerts ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.dash-alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hair); }
.dash-alerts .al-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; color: #fff; background: var(--ink-3); }
.dash-alerts .al-bad .al-ico { background: var(--late); }
.dash-alerts .al-warn .al-ico { background: #8A6D1F; }
.al-links { margin-top: 6px; }
.mg-now { display: grid; align-content: center; gap: 2px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--surface-2); }
.mg-now .k { font-size: .82rem; color: var(--ink-2); font-weight: 650; }
.mg-now strong { font-size: 1.25rem; }

/* ---------- Synthèses (préparation des réunions) ---------- */
.dash-syn { padding: 16px; }
.syn-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.syn-actions select { font: inherit; min-height: 38px; padding: 6px 10px; border: 1.5px solid #D9DDD6; border-radius: 10px; background: #fff; }
.syn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.syn-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; }
.syn-list a { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); text-decoration: none; }
.syn-list a:hover strong { text-decoration: underline; }
.syn-paper { padding: clamp(16px, 3vw, 32px); max-width: 900px; }
.syn-narr { background: #EAF2F7; border: 1px solid #D3E3EE; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.syn-narr.is-pending { background: var(--surface-2); border-color: var(--hair); }
.syn-narr-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
.syn-narr p { margin: 0; line-height: 1.6; white-space: pre-line; }
.syn-sec { margin-top: 22px; }
.syn-sec h2 { font: 700 1.1rem/1.3 var(--font-body); color: var(--ink); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--green-100); }
.syn-sec h3 { font-size: .98rem; margin: 14px 0 6px; }
.syn-table td, .syn-table th { padding: 7px 8px; }
.syn-table .strong { font-weight: 700; }
.syn-kpis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.syn-kpis > div { border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 2px; }
.syn-kpis span { font-size: .8rem; color: var(--ink-2); font-weight: 650; }
.syn-kpis strong { font-size: 1.25rem; color: var(--ink); }
.syn-ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.syn-note { margin: 10px 0 0; font-size: .86rem; color: var(--ink-2); background: var(--surface-2); border-left: 3px solid var(--ink-3); padding: 8px 12px; border-radius: 0 8px 8px 0; }
@media print {
  .site-header, .side, .topbar, .tabbar, .test-banner, .site-footer, .page-head button, .page-head a, .toast, .skip-link { display: none !important; }
  .shell, .main { display: block !important; padding: 0 !important; margin: 0 !important; }
  body, .espace-body { background: #fff !important; }
  .syn-paper { box-shadow: none !important; border: 0 !important; max-width: none; padding: 0; }
  .syn-sec { break-inside: avoid-page; }
  .syn-table tr { break-inside: avoid; }
}
/* Couleurs vives : bouton Rechercher du menu latéral (et loupe mobile), bouton de déconnexion */
.side-nav a.side-search { background: var(--pop-strong); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(216, 27, 106, .28); margin-bottom: 6px; }
.side-nav a.side-search:hover { background: #B8155A; color: #fff; }
.side-nav a.side-search .kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); color: #fff; }
.espace-body .icon-btn2.top-search { background: var(--pop-strong); color: #fff; border-radius: 12px; }
.espace-body .btn.btn-logout { background: #C94200 !important; color: #fff !important; border: 0 !important; box-shadow: 0 4px 12px rgba(201, 66, 0, .3) !important; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.espace-body .btn.btn-logout:hover { background: #A93700 !important; }
.btn-logout svg { width: 18px; height: 18px; }
.side-foot .btn-logout { margin-top: 8px; justify-content: center; text-decoration: none; }
.btn-logout.btn-block { width: 100%; justify-content: center; min-height: 48px; }
/* Suppression (administrateurs) */
.proj-title .proj-del { margin-left: auto; color: var(--ink-3); }
.proj-title .proj-del:hover { color: var(--late); background: var(--late-bg); }
.open-btn.row-del { color: var(--ink-3); opacity: 0; }
.trow:hover .row-del, .row-del:focus-visible { opacity: 1; }
.open-btn.row-del:hover { color: var(--late); }
@media (hover: none) { .open-btn.row-del { display: none; } }
.espace-body .btn.btn-danger { background: var(--late) !important; color: #fff !important; border: 0 !important; box-shadow: none !important; }

/* ---------- v5 : décisions → projet, demandes du site, réponses e-mail, documents (Drive) ---------- */
.decision-row { align-items: flex-start; }
.decision-acts { flex-wrap: wrap; justify-content: flex-end; }
.status.linkish { cursor: pointer; text-decoration: none; }
.status.linkish:hover { filter: brightness(.96); text-decoration: underline; }
@media (max-width: 640px) { .decision-row { flex-wrap: wrap; } .decision-acts { width: 100%; justify-content: flex-start; } }
.np-inline { border: 1.5px dashed var(--hair); border-radius: 12px; padding: 10px 12px 4px; margin: 0 0 12px; background: var(--surface-2); }
.np-inline legend { font-weight: 700; font-size: .86rem; padding: 0 6px; }
.np-inline[hidden] { display: none; }
.req-block .req-msg { margin: 6px 0 10px; padding: 10px 12px; border-left: 4px solid var(--orange, #FFA400); background: var(--soon-bg); border-radius: 0 10px 10px 0; white-space: pre-wrap; font-size: .93rem; }
.req-who { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .9rem; }
.req-who dt { color: var(--ink-3); font-weight: 600; }
.req-who dd { margin: 0; overflow-wrap: anywhere; }
.av.av-mail { display: inline-grid; place-items: center; background: var(--prog-bg); color: var(--prog); }
.av.av-mail .ico { width: 14px; height: 14px; }
.comments .from-mail > div { background: var(--prog-bg); border-radius: 10px; padding: 8px 10px; }
.pill.pill-mail { background: #fff; color: var(--prog); border-color: #C7DFEC; }
.comments .c-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.req-types { display: grid; gap: 10px; margin: 10px 0; }
.req-type { padding: 12px 14px; box-shadow: none; border: 1px solid var(--hair); }
.req-type.off { opacity: .65; }
.req-type-head { grid-template-columns: 70px 1fr 1fr; }
@media (max-width: 640px) { .req-type-head { grid-template-columns: 70px 1fr; } .req-type-head > :last-child { grid-column: 1 / -1; } }
.icon-in { text-align: center; font-size: 1.2rem; }
.g-step > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.g-step > summary::-webkit-details-marker { display: none; }
.g-step > summary::before { content: '▸'; color: var(--ink-3); }
.g-step[open] > summary::before { content: '▾'; }
.g-howto { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; font-size: .93rem; }
.g-howto code { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 6px; font-size: .84rem; overflow-wrap: anywhere; }
.drive-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--hair); border-radius: 12px; padding: 4px 12px; margin: 8px 0 12px; }
.drive-search input { border: 0; flex: 1; min-width: 0; min-height: 40px; background: transparent; font: inherit; }
.drive-search input:focus { outline: none; }
.drive-search:focus-within { border-color: var(--ink-2); }
.drive-zone { border-radius: 14px; min-height: 120px; transition: box-shadow .15s; }
.drive-zone.is-drop { box-shadow: 0 0 0 3px var(--prog) inset; background: var(--prog-bg); }
.drive-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .92rem; margin-bottom: 10px; }
.drive-crumbs .sep { color: var(--ink-3); }
.drive-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.drive-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--hair); }
.drive-item:first-child { border-top: 0; }
.drive-item:hover { background: var(--surface-2); }
.drive-main { min-width: 0; display: grid; gap: 2px; }
.drive-name { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 650; min-width: 0; }
.drive-name:hover .ellipsis { text-decoration: underline; }
.drive-ico { font-size: 1.25rem; flex: none; width: 28px; text-align: center; }
.drive-main small { padding-left: 38px; }
.drive-acts { display: flex; gap: 4px; align-items: center; flex: none; }
@media (max-width: 640px) { .drive-item { flex-wrap: wrap; } .drive-acts { width: 100%; padding-left: 38px; flex-wrap: wrap; } }

/* ---------- Rubriques en couleur (palette du site) : chaque module prend la couleur de sa rubrique ----------
   --sec : texte et icônes (contraste ≥ 4,5:1 sur blanc) · --sec-a : liserés et accents · --sec-bg : fonds pâles */
.espace-body, .main[data-sec] { --sec: var(--green-800); --sec-a: var(--green); --sec-bg: var(--green-50); }
.sec-accueil, .main[data-sec="accueil"] { --sec: #A3134F; --sec-a: #F06AA4; --sec-bg: #FFEDF5; }
.sec-projets, .main[data-sec="projets"] { --sec: #8A5300; --sec-a: #FFA400; --sec-bg: #FFF4DE; }
.sec-calendrier, .main[data-sec="calendrier"] { --sec: #2F5D78; --sec-a: #518AAA; --sec-bg: #E7F1F7; }
.sec-reunions, .main[data-sec="reunions"] { --sec: #A23E31; --sec-a: #E67261; --sec-bg: #FDECE8; }
.sec-documents, .main[data-sec="documents"] { --sec: #3F5238; --sec-a: #9DAC93; --sec-bg: #EDF2E9; }
.sec-notices, .main[data-sec="notices"] { --sec: #5B3FA0; --sec-a: #A88BE0; --sec-bg: #F2EDFC; }
.sec-annuaire, .main[data-sec="annuaire"] { --sec: #4F6108; --sec-a: #B5CF3A; --sec-bg: #F3F8DE; }
.sec-tresorerie, .main[data-sec="tresorerie"] { --sec: #1F6B5C; --sec-a: #4FB3A0; --sec-bg: #E6F5F1; }
.sec-plus, .main[data-sec="plus"], .main[data-sec="admin"] { --sec: #3E4A5A; --sec-a: #8FA3B8; --sec-bg: #EEF2F6; }

/* Menu latéral : une pastille colorée par rubrique */
.side-nav .side-ico { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--sec-bg); color: var(--sec); flex: none; transition: background-color .15s, color .15s; }
.side-nav .side-ico .ico { width: 16px; height: 16px; }
.side-nav a[class^="sec-"]:hover { background: var(--sec-bg); }
.side-nav a[class^="sec-"][aria-current="page"] { background: var(--sec-bg); box-shadow: inset 3px 0 0 var(--sec-a); color: var(--ink); }
.side-nav a[class^="sec-"][aria-current="page"] .side-ico { background: var(--sec-a); color: #fff; }
.side-nav a.side-search .ico { color: var(--pop-strong, #D81B6A); }

/* Barre d'onglets (téléphone) : l'onglet actif prend la couleur de sa rubrique */
.tabbar a[aria-current="page"] { color: var(--sec); }
.tabbar a[aria-current="page"] .ico { background: var(--sec-bg); border-radius: 10px; padding: 3px; width: 30px; height: 30px; margin: -3px 0; }

/* Titre de page avec liseré, cartes avec bandeau de couleur */
.main .page-head > div:first-child { border-left: 5px solid var(--sec-a); padding-left: 12px; }
.main .page-head .sub { color: var(--ink-2); }
.main .card { border-top: 4px solid var(--sec-a); }
.main .card .h2 { color: var(--sec); }
.main .ptabs a[aria-current="page"] { border-color: var(--sec-a); color: var(--sec); }
.main .empty { background: var(--sec-bg); border-color: color-mix(in srgb, var(--sec-a) 45%, transparent); }
.main .group-head .h2::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--sec-a); flex: none; }

/* Mes actions : un module, une couleur */
.main[data-sec="accueil"] .hello { background: linear-gradient(120deg, #FFEDF5, #FFF4DE 60%, #EDF2E9); border-radius: 18px; padding: 16px 18px; }
.main[data-sec="accueil"] .hello h1 .late { color: var(--late); }
.main .aside-card:nth-of-type(4n+1) { border-top-color: #FFA400; } .main .aside-card:nth-of-type(4n+1) .h2 { color: #8A5300; }
.main .aside-card:nth-of-type(4n+2) { border-top-color: #E67261; } .main .aside-card:nth-of-type(4n+2) .h2 { color: #A23E31; }
.main .aside-card:nth-of-type(4n+3) { border-top-color: #518AAA; } .main .aside-card:nth-of-type(4n+3) .h2 { color: #2F5D78; }
.main .aside-card:nth-of-type(4n+4) { border-top-color: #9DAC93; } .main .aside-card:nth-of-type(4n+4) .h2 { color: #3F5238; }

/* Tableau de bord : chaque indicateur sa couleur */
.dash-tile { border-top-width: 0 !important; position: relative; overflow: hidden; }
.dash-tile::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tile, var(--sec-a)); }
.dash-tile:nth-child(6n+1) { --tile: #F06AA4; background: #FFF6FA; }
.dash-tile:nth-child(6n+2) { --tile: #FFA400; background: #FFFAF0; }
.dash-tile:nth-child(6n+3) { --tile: #518AAA; background: #F4F9FC; }
.dash-tile:nth-child(6n+4) { --tile: #E67261; background: #FEF6F4; }
.dash-tile:nth-child(6n+5) { --tile: #9DAC93; background: #F6F9F4; }
.dash-tile:nth-child(6n+6) { --tile: #A88BE0; background: #F8F5FE; }

/* Les cartes de projets gardent la couleur de leur thème, sans bandeau en plus */
.main .card.pcard, .main .card.mini-proj, .main .req-type, .main .card.decision, .main .card.mail-state { border-top-width: 1px; border-top-color: var(--hair); }
.main .card.decision { border-left: 4px solid var(--sec-a); }
@media (prefers-reduced-motion: reduce) { .side-nav .side-ico { transition: none; } }

/* Contrôle responsive (ui-ux-pro-max « touch-target-size », guidelines Vercel) : zones de toucher ≥ 44 px au doigt */
@media (pointer: coarse) {
  .btn.btn-xs { min-height: 44px; padding: 6px 14px; }
  .btn.btn-sm { min-height: 44px; }
  .icon-btn2 { width: 44px; height: 44px; }
  .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .chip { min-height: 40px; }
  .side-nav a, .plist a { min-height: 44px; }
}
/* Textes longs (noms de fichiers, adresses e-mail, titres de tâches) : jamais de débordement horizontal */
.main, .drawer-body { overflow-wrap: break-word; }
.main .row-gap > *, .drive-main, .decision-text { min-width: 0; }
.espace-body select { background-color: var(--surface); color: var(--ink); }

/* Sélecteur « + Google Doc » des notices */
.drive-picker { margin-top: 12px; padding: 14px; border-top-color: var(--sec-a); display: grid; gap: 8px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-head strong { display: inline-flex; align-items: center; gap: 6px; }
.drive-picker .drive-search { margin: 0; }
.dp-list { max-height: min(50dvh, 380px); overflow-y: auto; overscroll-behavior: contain; }
.dp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dp-item { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; }
.dp-item:hover, .dp-item:focus-visible { background: var(--sec-bg); border-color: var(--sec-a); }
.dp-item[disabled] { opacity: .6; cursor: progress; }
.dp-share { align-items: flex-start; }
.g-sub { border-top: 1px dashed var(--hair); padding-top: 12px; }
.h3 { font-size: .95rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }

/* Liste de tâches : le titre ouvre le détail, et « Détails › » est écrit en clair */
.tmain { cursor: pointer; }
.ttitle-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 6px 0; min-height: 36px; }
.ttitle-link .ttitle { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.ttitle-link:hover .ttitle, .ttitle-link:focus-visible .ttitle { text-decoration-color: currentColor; }
.ttitle-link:focus-visible { outline: 2px solid var(--sec-a, var(--green-600)); outline-offset: 2px; border-radius: 6px; }
.trow.is-done .ttitle { text-decoration: line-through; color: var(--ink-3); }
.tcount { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--ink-3); }
.tcount .ico { width: 14px; height: 14px; }
.detail-btn { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 4px 8px 4px 12px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--sec-a, var(--green)) 55%, transparent); background: var(--sec-bg, var(--green-50)); color: var(--sec, var(--green-800)); font-size: .82rem; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s; }
.detail-btn .ico { width: 16px; height: 16px; }
.detail-btn:hover, .detail-btn:focus-visible { background: var(--sec-a, var(--green)); border-color: var(--sec-a, var(--green)); color: #fff; }
.trow:hover { background: var(--sec-bg, #FAFBF9); }
@media (pointer: coarse) {
  .detail-btn { min-height: 44px; padding: 6px 10px 6px 14px; }
  .ttitle-link { min-height: 44px; }
}
/* Petit téléphone : seul le chevron reste, la ligne entière s'ouvre au toucher */
@media (max-width: 380px) { .detail-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .detail-btn { padding: 6px 12px; } }
@media (prefers-reduced-motion: reduce) { .detail-btn, .ttitle-link .ttitle { transition: none; } }

/* Panneau d'une tâche : « Retour » bien visible, état d'enregistrement, « Enregistrer et fermer » en évidence */
.drawer-head { min-height: 56px; gap: 10px; }
.drawer-back { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px 0 6px; border-radius: 12px; border: 1.5px solid var(--hair); background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.drawer-back span { display: inline-flex; align-items: center; gap: 4px; }
.drawer-back:hover, .drawer-back:focus-visible { background: var(--surface-2); border-color: var(--ink-3); }
.drawer-back .only-d { display: none; }
@media (min-width: 900px) { .drawer-back .only-m { display: none; } .drawer-back .only-d { display: inline-flex; } .drawer-back { padding: 0 12px 0 8px; } }
.save-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--ink-3); font-weight: 600; transition: color .2s; }
.save-state .ico { width: 14px; height: 14px; }
.save-state.is-fresh { color: var(--ok); }
@media (max-width: 480px) { .save-state:not(.is-fresh) { display: none; } .drawer-head .crumb { font-size: .8rem; } }
.drawer-foot { flex-direction: column; align-items: stretch; gap: 8px; }
.drawer-foot .drawer-save { width: 100%; min-height: 48px; font-size: 1rem; justify-content: center; }
.drawer-foot-2 { display: flex; gap: 8px; justify-content: space-between; }
.drawer-foot-2 .btn { flex: 1; justify-content: center; }
.espace-body .btn.btn-plain.done-btn { color: var(--ok) !important; border-color: #A9C79B !important; background: var(--ok-bg) !important; }
.espace-body .btn.btn-plain.done-btn:hover { background: #D5E7CA !important; }
@media (min-width: 900px) {
  .drawer-foot { flex-direction: row-reverse; align-items: center; }
  .drawer-foot .drawer-save { width: auto; min-height: 40px; font-size: .92rem; }
  .drawer-foot-2 { flex: 1; justify-content: flex-start; }
  .drawer-foot-2 .btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .save-state { transition: none; } }

/* Supports de réunion (documents du Drive liés) */
.meet-docs { margin-top: 16px; }
.meet-docs .att-list { margin-top: 4px; grid-template-columns: minmax(0, 1fr); }
.att-list a.att-name { color: var(--ink); text-decoration: none; min-height: 40px; align-content: center; }
.att-list a.att-name:hover strong, .att-list a.att-name:focus-visible strong { text-decoration: underline; }
.meet-docs .drive-picker { margin-top: 12px; }
@media (max-width: 599px) { .meet-docs > .row-gap > .ml-auto { margin-left: 0; width: 100%; } }

/* Paramétrage › Import / Export */
.io [hidden] { display: none !important; }
.io-sets { display: flex; flex-wrap: wrap; gap: 8px; }
.io-set small { font-weight: 500; }
.io-steps { margin: 4px 0 14px; padding-left: 1.3em; display: grid; gap: 6px; line-height: 1.5; }
.io-report { margin-top: 12px; display: grid; gap: 10px; }
.io-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--hair); border-radius: 10px; }
.io-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.io-table th, .io-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.io-table tr:last-child td { border-bottom: 0; }
.io-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.io-errors summary, .io-legacy summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.io-errors ul { margin: 6px 0; padding-left: 1.2em; display: grid; gap: 4px; }
.io-legacy { border-top: 1px dashed var(--hair); padding-top: 10px; }
.io-legacy-body { display: grid; gap: 10px; padding-top: 8px; }
.ok-msg { background: var(--ok-bg); color: var(--ink); border-radius: 10px; padding: 10px 12px; }
.ico.rot180 svg { transform: rotate(180deg); }
@media (max-width: 599px) { .io-table th:first-child, .io-table td:first-child { display: none; } .io-table td { white-space: normal; } .io-table th { white-space: normal; } }

/* ---------- Projet : vue d'ensemble (tableau de bord) ---------- */
.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; margin-bottom: 16px; }
@media (max-width: 1099px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-head .h3 { margin: 0; flex: 1; font-size: 1rem; }
.dash-foot { margin-top: auto; font-weight: 600; }
.dash-donut { display: flex; align-items: center; gap: 16px; }
.donut { width: 112px; height: 112px; flex: none; display: block; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut .dn-big { font: 800 18px var(--font-body); fill: var(--ink); }
.donut .dn-sub { font: 500 8.5px var(--font-body); fill: var(--ink-2); }
.dash-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 0; font-size: .88rem; }
.dash-legend li { display: flex; align-items: center; gap: 8px; }
.dash-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dash-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 8px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.dash-chip.late { background: var(--late-bg); color: #9A3B2E; }
.dash-chip.soon { background: var(--soon-bg); color: var(--soon); }
.dash-chip.ok { background: var(--ok-bg); color: var(--ok); }
.dash-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dash-big b { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-big span { font-size: .85rem; color: var(--ink-2); }
.dash-line { margin: 0; font-size: .82rem; color: var(--ink-2); }
.ok-t { color: #2F7A3A; } .soon-t { color: var(--soon); } .late-t { color: #9A3B2E; } .goal-t { color: #9A4A3A; }
.waffle { display: flex; flex-wrap: wrap; gap: 4px; }
.waffle span { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #E67261; box-sizing: border-box; background: var(--surface); }
.waffle span.on { background: #E67261; }
.gauge { height: 8px; border-radius: 99px; background: #EEF0EC; overflow: hidden; flex: 1; min-width: 40px; }
.gauge i { display: block; height: 100%; background: #E67261; border-radius: 99px; }
.dash-sub { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hair); }
.dash-sub .k { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.dash-bar { display: grid; grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .85rem; }
.dash-bar small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bullet { position: relative; height: 28px; }
.bullet .b-track, .bullet .b-val { position: absolute; left: 0; top: 7px; height: 14px; border-radius: 4px; }
.bullet .b-track { right: 0; background: #EEF0EC; }
.bullet .b-val { background: #2B6FB6; max-width: 100%; }
.bullet .b-mark { position: absolute; top: 1px; width: 2px; height: 26px; transform: translateX(-1px); }
.bullet .b-mark.ref { background: var(--ink); } .bullet .b-mark.goal { background: #E67261; }
.bullet-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2); margin-top: -6px; }
.bullet-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bullet-legend i { width: 2px; height: 12px; } .bullet-legend i.ref { background: var(--ink); } .bullet-legend i.goal { background: #E67261; }
.dash-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding-top: 10px; border-top: 1px solid var(--hair); }
.dash-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.dash-facts dd { margin: 2px 0 0; font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.dash-plan { padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
/* Planning : couleurs d'état (toujours accompagnées de la légende et du libellé au survol) */
.g-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { width: 18px; height: 10px; border-radius: 3px; }
.st-done { background: #3A8F45; } .st-doing { background: #2B6FB6; } .st-late { background: #C8413A; } .st-todo { background: #C9CDC5; }
.g-legend i.jday, .g-bar.st-jday { background: #FDE2D8; border: 1.5px dashed #E67261; }
.g-bar.st-done, .g-bar.st-doing, .g-bar.st-late, .g-bar.st-todo { opacity: 1; border-color: rgba(0,0,0,.08); box-shadow: none; }
.g-bar.st-done { background: #3A8F45; } .g-bar.st-doing { background: #2B6FB6; } .g-bar.st-late { background: #C8413A; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #C8413A; } .g-bar.st-todo { background: #C9CDC5; }
/* Tâches : Liste / Tableau / Planning */
.view-seg { flex: none; }
/* Détail du projet : rubriques repliables, choix à deux options */
details.fold { padding: 0; overflow: hidden; }
details.fold > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; font-weight: 700; cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▾'; color: var(--ink-2); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.fold[open] { padding-bottom: 16px; }
.seg-sm button { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { details.fold > summary::after { transition: none; } }
.pill.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.pill.warn { background: var(--soon-bg); border-color: transparent; color: var(--soon); }

/* ---------- Tâches sur téléphone : lignes compactes, filtres sur une ligne, en-tête réduit ---------- */
.proj-head.is-slim { gap: 4px; margin-bottom: 6px; }
.proj-head.is-slim .h1 { font-size: 1.3rem; }
.slim-pilot { font-size: .86rem; font-weight: 700; justify-self: start; text-decoration: none; }
.ftool { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.fsel { position: relative; display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hair); background: #fff; color: var(--ink); font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
.fsel .ico { width: 15px; height: 15px; }
.fsel select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; color: inherit; padding: 0; margin: 0; cursor: pointer; }
.fsel select:focus { outline: none; }
.fsel:focus-within { outline: 2px solid var(--green-600); outline-offset: 2px; }
.fsel.is-on, .espace-body .fsel.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar .fsel { min-height: 36px; }
.done-more { margin: 4px 0 8px; min-height: 44px; font-weight: 650; }
.trow.is-compact { padding: 2px 6px 2px 2px; }
.trow.is-compact .tmain { padding: 6px 0; }
.trow.is-compact .ttitle { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.is-compact .ttitle-link { min-width: 0; flex: 1; }
.trow.is-compact .row-del { display: none; }
.trow.is-compact .detail-btn { min-height: 40px; padding: 4px 6px; border: 0; background: none; color: var(--ink-3); }
.trow.is-compact .detail-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.trow.is-compact .tmeta { padding: 0 0 2px; gap: 4px 8px; }
.m-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; width: 100%; font-size: .8rem; color: var(--ink-2); }
.m-sum > span { display: inline-flex; align-items: center; gap: 4px; }
.m-sum .ico { width: 14px; height: 14px; }
.m-sum .av { width: 18px; height: 18px; font-size: .6rem; }
.ms-date.late { color: var(--late); font-weight: 700; }
.ms-date.soon { color: var(--soon); font-weight: 650; }
.miss { position: relative; display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 7px; background: var(--soon-bg); color: var(--soon); }
.miss .ico { width: 14px; height: 14px; }
.miss b { position: absolute; top: -5px; right: -5px; min-width: 13px; height: 13px; padding: 0 2px; border-radius: 999px; background: var(--soon); color: #fff; font-size: 9px; font-weight: 800; line-height: 13px; text-align: center; }
.miss.late { background: var(--late-bg); color: var(--late); }
.miss.late b { background: var(--late); }
.proj-head.is-slim .proj-title { flex-wrap: nowrap; gap: 10px; }
.proj-head.is-slim .proj-title .h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-head.is-slim .theme-ico { width: 32px; height: 32px; font-size: 1.05rem; flex: none; }
.proj-head.is-slim .health { flex: none; }
.proj-head.is-slim .proj-del { margin-left: 0; flex: none; }
.trow.is-compact .m-sum { width: auto; }
.trow.is-compact .pill-notice, .trow.is-compact .pill-msg { font-size: 0; gap: 0; padding: 3px 6px; }
.trow.is-compact .pill-notice .ico, .trow.is-compact .pill-msg .ico { width: 14px; height: 14px; }
/* Paramétrage › Projets : couleur en menu déroulant, options de catégorie, suppression avec réattribution */
.color-pick { position: relative; }
.color-pick > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 10px 3px 4px; border: 1.5px solid var(--hair); border-radius: 999px; background: #fff; min-height: 38px; }
.color-pick > summary::-webkit-details-marker { display: none; }
.color-pick > summary .swatch { width: 26px; height: 26px; pointer-events: none; }
.color-pick > summary small { font-weight: 650; color: var(--ink-2); }
.color-grid { position: absolute; z-index: 20; top: 44px; left: 0; display: grid; grid-template-columns: repeat(7, 34px); gap: 6px; padding: 10px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-lg); }
.color-grid .swatch { width: 34px; height: 34px; }
.cat-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.opt-chip { white-space: nowrap; font: inherit; font-size: .8rem; font-weight: 650; min-height: 32px; padding: 3px 11px; border-radius: 999px; border: 1.5px dashed #C9CEC6; background: #fff; color: var(--ink-2); cursor: pointer; }
.opt-chip.on { border-style: solid; border-color: color-mix(in srgb, var(--theme) 70%, #333); background: color-mix(in srgb, var(--theme) 35%, #fff); color: var(--ink); }
.reassign-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px; border-radius: 10px; background: var(--late-bg, #FDECEA); }
.reassign-ask label { font-weight: 650; font-size: .88rem; }
.reassign-ask select { min-height: 36px; border-radius: 10px; border: 1.5px solid #D9DDD6; padding: 0 8px; font: inherit; }
.gone-list:empty { display: none; }
.gone-list { margin-top: 10px; display: grid; gap: 4px; }
.gone { margin: 0; font-size: .9rem; }
.dur-chip { display: inline-flex; align-items: center; gap: 4px; }
.chip-x { border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 0 2px 0 6px; min-width: 24px; min-height: 24px; }
.chip-x:disabled { opacity: .3; cursor: default; }
.dur-in { width: 110px; min-height: 38px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; font: inherit; }
.add-year select { min-height: 34px; border-radius: 10px; border: 1.5px solid #D9DDD6; padding: 0 8px; font: inherit; }
.set-link { font-weight: 600; }
@media (max-width: 599px) { .color-grid { grid-template-columns: repeat(6, 34px); } }
@media (max-width: 599px) { .theme-row { grid-template-columns: auto 1fr auto; align-items: start; } .theme-row .opt-chip { font-size: .76rem; padding: 3px 9px; } }
.created-note { border-left: 6px solid var(--ok, #6CC69A); background: #F1FAF4; display: grid; gap: 10px; }
.created-note p { margin: 0; }
/* Champs à insérer dans un message, rangés par catégorie */
.var-panel { display: grid; gap: 4px; margin-top: 8px; }
.var-group { border: 1px solid var(--hair); border-radius: 10px; padding: 4px 10px; background: #fff; }
.var-group > summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--ink-2); min-height: 30px; display: flex; align-items: center; }
.var-group[open] > summary { margin-bottom: 4px; }
.var-group .var-chips { margin: 0 0 6px; }
/* Écriture avancée d'un message */
.modal.modal-xl { width: min(1040px, calc(100vw - 24px)); }
.mw-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: 'main side' 'prev side' 'save save'; gap: 12px 20px; align-items: start; }
.mw-main { grid-area: main; } .mw-side { grid-area: side; } .mw-prev { grid-area: prev; } .mw-prev p { margin: 0 0 6px; }
.mw-main .msg-edit { min-height: 220px; }
.mw-src select { width: 100%; min-height: 38px; }
.mw-side { max-height: 60vh; overflow: auto; }
.mw-side .var-panel { margin-top: 0; }
.mw-save { grid-area: save; margin: 0; }
@media (max-width: 899px) { .modal.modal-xl { width: 100vw; } .mw-grid { grid-template-columns: 1fr; grid-template-areas: 'main' 'side' 'prev' 'save'; } .mw-side { max-height: none; } }
/* Sélecteur d'émojis (écriture avancée) */
.emo-search { width: 100%; min-height: 36px; border: 1.5px solid #D9DDD6; border-radius: 10px; padding: 0 10px; font: inherit; margin-bottom: 6px; }
.emo-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 6px; }
.emo-tabs button { width: 36px; height: 34px; font-size: 1.15rem; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.emo-tabs button[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; max-height: 236px; overflow-y: auto; padding-bottom: 6px; }
.emo-grid button { height: 36px; font-size: 1.35rem; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.emo-grid button:hover, .emo-grid button:focus-visible { background: var(--surface-2); }

/* ==========================================================================
   Tags des tâches : pastilles vives ou fluo (Paramétrage › Projets › Tags)
   Le texte suit la teinte (--tag-ink : noir sur fluo clair, blanc sur teinte foncée).
   ========================================================================== */
.tag-chip { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; font: inherit; font-size: .76rem; font-weight: 800; letter-spacing: .01em; line-height: 1.2;
  padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--tag); color: var(--tag-ink); border: 1.5px solid color-mix(in srgb, var(--tag) 75%, #000);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag) 22%, transparent); }
.tag-chip .tag-hash { opacity: .65; font-weight: 700; }
.tag-chip .ico { width: 14px; height: 14px; }
button.tag-chip { cursor: pointer; min-height: 32px; padding: 4px 12px 4px 9px; font-size: .82rem; touch-action: manipulation; }
button.tag-chip.is-off { background: #fff; color: var(--ink); border-style: dashed; border-color: color-mix(in srgb, var(--tag) 80%, #555); box-shadow: inset 4px 0 0 var(--tag); }
button.tag-chip.is-off .tag-hash { color: color-mix(in srgb, var(--tag) 60%, #222); opacity: 1; }
button.tag-chip:hover { filter: brightness(1.04); }
button.tag-chip.is-off:hover { background: color-mix(in srgb, var(--tag) 14%, #fff); }
button.tag-chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tag-chip .tag-n { font-size: .72rem; font-weight: 700; opacity: .7; margin-left: 2px; }
.tag-head { font-size: .9rem; padding: 3px 12px 3px 9px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.fields .tag-pick + * { margin-top: 0; }
/* Barre de filtre d'un projet : une ligne qui défile sur téléphone */
.tag-bar { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tag-bar > * { flex: none; }
.tag-bar-lab { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.tag-bar-lab .ico { width: 16px; height: 16px; }
.tag-clear { white-space: nowrap; font-size: .85rem; min-height: 32px; }
.tag-note { margin: -4px 0 10px; }
@media (max-width: 899px) {
  .tag-bar { margin-inline: -16px; padding-inline: 16px; }
  .tag-bar button.tag-chip { min-height: 40px; }
  .tag-pick button.tag-chip { min-height: 40px; }
  .fields .tag-pick { grid-column: 1 / -1; }
}
.theme-row.no-ico { grid-template-columns: 1fr auto auto; }
@media (max-width: 599px) { .theme-row.no-ico { grid-template-columns: 1fr auto; } }
.theme-row .tag-chip { align-self: center; }
@media (forced-colors: active) { .tag-chip { border: 1px solid CanvasText; } }

/* ==========================================================================
   Panneau d'une tâche sur téléphone : une seule barre d'actions compacte
   (avant : deux rangées de gros boutons, ~130 px pris sur l'écran).
   Enregistrer garde le texte ; Terminer et Supprimer passent en boutons
   carrés (44 px min., libellé lu par les lecteurs d'écran).
   La barre se cache quand le clavier est ouvert, pour ne pas masquer le champ saisi.
   ========================================================================== */
.drawer-foot .lbl-short { display: none; }
@media (max-width: 899px) {
  .drawer-foot { flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .drawer-foot .drawer-save { flex: 1; width: auto; min-height: 48px; font-size: .98rem; padding-inline: 12px; }
  .drawer-foot .lbl-long { display: none; }
  .drawer-foot .lbl-short { display: inline; }
  .drawer-foot-2 { flex: none; gap: 8px; }
  .drawer-foot-2 .btn { flex: none; min-height: 48px; min-width: 48px; padding: 0 12px; }
  .drawer-foot-2 .btn.icon-only { width: 48px; padding: 0; justify-content: center; }
  .drawer-foot-2 .btn.icon-only .ico { margin: 0; }
  body.kb-open .drawer-foot { display: none; }
}
@media (max-width: 359px) {
  .drawer-foot-2 .done-btn .lbl-short { display: none; }
  .drawer-foot-2 .done-btn { width: 48px; padding: 0; justify-content: center; }
}
.drawer-foot .btn.icon-only .lbl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 900px) { .drawer-foot-2 .btn.icon-only { width: 40px; min-width: 40px; padding: 0; justify-content: center; } .drawer-foot-2 .btn.icon-only .ico { margin: 0; } }
#tags { scroll-margin-top: 80px; }
/* Téléphone : rien ne doit dépasser à droite (titre du projet en en-tête réduit, champs du panneau de tâche) */
.proj-head, .proj-head.is-slim .proj-title { min-width: 0; max-width: 100%; }
.fields { grid-template-columns: 120px minmax(0, 1fr); }
.fields > * { min-width: 0; }
.fields .date-pair input[type="date"] { min-width: 0; }
@media (max-width: 420px) { .fields { grid-template-columns: 100px minmax(0, 1fr); } }

/* ---------- Trésorerie (administrateurs) ---------- */
.tr-year { min-height: 36px; }
.tr-tile-link { text-decoration: none; color: inherit; }
.tr-tile-link:hover { border-color: var(--ink-3); }
.tr-tile-link:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tr-filters { margin-bottom: 10px; }
.tr-filters input[type=search] { min-width: 0; flex: 1 1 220px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; font: inherit; }
.tr-count { margin: 0 0 8px; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-list > li + li { border-top: 1px solid var(--hair); }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main check" "meta meta"; gap: 4px 10px; padding: 10px 12px; align-items: center; }
.tr-main { grid-area: main; display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; min-height: 44px; border-radius: 8px; }
.tr-main:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.tr-date { font-size: .84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tr-what { min-width: 0; display: grid; }
.tr-what strong, .tr-what small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 6px; padding-left: calc(4.6em + 10px); }
.tr-meta:empty { display: none; }
.tr-amt { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-amt.pos { color: var(--ok); }
.tr-amt.neg { color: var(--ink); }
.tr-amt.due { color: var(--late); }
.pill.tr-due { background: var(--late-bg); border-color: transparent; color: var(--late); }
.pill.tr-ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.tr-check { grid-area: check; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--ink-2); min-width: 48px; min-height: 44px; justify-content: center; cursor: pointer; }
.tr-check input { width: 22px; height: 22px; accent-color: var(--ok); cursor: pointer; }
.tr-check input:disabled { cursor: not-allowed; opacity: .45; }
.tr-check.na { color: var(--ink-3); cursor: default; }
.tr-deleted summary, details > summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.tr-modal { max-width: 620px; }
.tr-stock-box { margin: 6px 0 10px; }
.tr-person-head { display: flex; gap: 12px; align-items: center; }
.tr-person-head .grow { display: grid; min-width: 0; }
.tr-open { margin: 10px 0 0; }
.tr-open-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 44px; }
.tr-open-row + .tr-open-row { border-top: 1px solid var(--hair); }
.tr-open-row .grow { min-width: 0; }
.tr-point { margin: 0; }
.tr-point input { width: 22px; height: 22px; flex: none; }
.tr-stock-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tr-item.is-low { border-color: var(--soon); }
.tr-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tr-qty { margin: 4px 0 0; }
.tr-qty .big-num { font-size: 1.8rem; }
.mtable .num, .tr-bilan .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-bilan tfoot th, .tr-bilan tfoot td { border-top: 2px solid var(--hair); font-weight: 750; }
.tr-bilan th[scope=row] { text-align: left; font-weight: 650; }
@media (max-width: 599px) {
  .tr-row { padding: 10px; }
  .tr-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amt" "date date"; gap: 0 8px; }
  .tr-main .tr-date { grid-area: date; font-size: .78rem; }
  .tr-main .tr-what { grid-area: what; }
  .tr-main .tr-amt { grid-area: amt; }
  .tr-meta { padding-left: 0; }
  .tr-filters select { flex: 1 1 45%; }
}
.tr-list > .tr-open-row { padding: 8px 14px; }
.tr-moves th, .tr-moves td { padding: 8px 12px; }
.tr-moves td:nth-child(3) { min-width: 12em; }
.tr-settle input[type=date] { min-height: 36px; }

/* v5.0.5 — dupliquer un projet (liste), todos des modèles et des projets passés */
.dup-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.dup-tools input[type="search"] { flex: 1 1 200px; min-width: 0; min-height: 38px; font: inherit; border: 1px solid #D9DDD6; border-radius: 10px; padding: 0 12px; background: #fff; }
.dup-list { max-height: 340px; overflow-y: auto; }
.dup-list li { padding: 8px 12px; }
.dup-list .nm strong { overflow-wrap: anywhere; }
.todo-choice { border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.todo-choice legend { padding: 0 4px; }
.sub-peek { margin-top: 2px; font-size: .82rem; }
.sub-peek summary { cursor: pointer; color: var(--ink-3); }
.sub-peek ul { margin: 4px 0 0; padding-left: 18px; }
.tpl-subs-btn { white-space: nowrap; }
.tpl-subs-row td { background: #F7F8F5; }
.tpl-subs-row textarea { width: 100%; min-height: 70px; font: inherit; border: 1px solid #D9DDD6; border-radius: 8px; padding: 8px; margin: 4px 0; box-sizing: border-box; }
@media (max-width: 520px) {
  .dup-list li { gap: 8px; }
  .dup-list .btn { margin-left: auto; }
}
.reassign li .sub-peek { grid-column: 1 / -1; padding-left: 30px; margin-top: -4px; }
.reassign .sub-peek li { display: list-item; border: 0; padding: 1px 0; font-size: .82rem; }
