@font-face { font-family: "Chakra Petch"; font-weight: 400; font-display: swap; src: url("../fonts/chakra-petch-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #171A2B;
  --surface: #242843;
  --text: #F1EFFA;
  --accent: #FFC53D;
  --on-accent: #171A2B;
  --radius: 14px;
  --depth: 4px;
  --gap: 10px;
  --font: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --muted: color-mix(in srgb, var(--text) 55%, var(--bg));
  --line: color-mix(in srgb, var(--surface) 82%, var(--text));
  --key: var(--surface);
  --danger: #FF5D5D;
}

* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------- Touche ----------
   Une seule base, trois niveaux :
   - action principale (.accent) : pleine, avec relief. Une par écran ou fenêtre.
   - action secondaire : plate.
   - navigation (onglets, dock) : sans fond, l'élément actif prend l'accent. */

.key {
  --c: var(--key);
  --on: var(--text);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c);
  color: var(--on);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s, background-color .12s;
}
.key svg { width: 20px; height: 20px; flex: none; }
.key:hover { filter: brightness(1.1); }
.key:active, .key.down { transform: scale(.97); filter: none; }
.key:focus-visible, .input:focus-visible, .rowi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.key.accent {
  --c: var(--accent); --on: var(--on-accent);
  min-height: 52px;
  margin-bottom: var(--depth);
  box-shadow: 0 var(--depth) 0 color-mix(in srgb, var(--accent) 62%, #000);
}
.key.accent:active { transform: translateY(var(--depth)); box-shadow: 0 0 0 transparent; }
.key.danger { --c: color-mix(in srgb, var(--danger) 16%, var(--key)); --on: var(--danger); }
.key.on { --c: var(--accent); --on: var(--on-accent); }
.key.square { width: 44px; min-height: 44px; padding: 0; flex: none; border-radius: 50%; }
.key.flat { pointer-events: none; opacity: .6; }
.key[disabled] { opacity: .45; pointer-events: none; }
.key.toggle svg { opacity: .15; }
.key.toggle.on svg { opacity: 1; }

/* ---------- Structure ---------- */

.shell {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom));
}
.bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: var(--gap); margin-bottom: 18px; }
.bar h1 {
  font-size: 19px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center;
  overflow-wrap: anywhere;
}
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 480px);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  padding: 6px;
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  z-index: 10;
}
.dock .key { --c: transparent; --on: var(--muted); flex-direction: column; gap: 3px; min-height: 50px; padding: 0 2px; font-size: 9.5px; letter-spacing: .04em; }
.dock .key.on { --c: color-mix(in srgb, var(--accent) 16%, transparent); --on: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 800px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.stack { display: grid; gap: 6px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.block { margin-top: 16px; }

/* Onglets et filtres : contrôle segmenté */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; margin-bottom: 14px;
  background: var(--surface); border-radius: calc(var(--radius) + 4px);
}
.seg .key { --c: transparent; --on: var(--muted); min-height: 38px; padding: 0 6px; font-size: 12px; letter-spacing: .06em; }
.seg .key.on { --c: var(--accent); --on: var(--on-accent); }
.seg.icons .key { flex-direction: column; gap: 3px; min-height: 50px; font-size: 10px; }
.seg.icons .key svg { width: 18px; height: 18px; }
.seg.icons.many { grid-auto-columns: minmax(62px, 1fr); overflow-x: auto; scrollbar-width: none; }
.seg.icons.many::-webkit-scrollbar { display: none; }
.seg.thin { background: none; padding: 0; }
.seg.thin .key { --c: var(--surface); min-height: 34px; font-size: 11px; }
.seg.thin .key.on { --c: color-mix(in srgb, var(--accent) 16%, var(--surface)); --on: var(--accent); }

/* ---------- Tuile : un objet (univers, projet, membre, lien…) ---------- */

.tile { aspect-ratio: 1; min-height: 0; flex-direction: column; gap: 8px; padding: 8px; font-size: 11px; line-height: 1.2; letter-spacing: .06em; border-radius: calc(var(--radius) + 2px); }
.tile svg { width: 32%; height: auto; max-width: 42px; }
.tile .name { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tile.add { --c: transparent; border: 2px dashed var(--line); color: var(--muted); }
.tile.add:hover { color: var(--accent); border-color: var(--accent); filter: none; }
.tile.off { opacity: .4; }
.tile .badge { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; }
.tile .badge svg { width: 100%; max-width: none; }
.tile .owner {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--oc); color: var(--oon); border: 2px solid rgba(0, 0, 0, .28);
}
.tile .owner svg { width: 13px; height: 13px; }
.tile .role { font-size: 9px; opacity: .75; letter-spacing: .1em; margin-top: -6px; }
.tile.pop { animation: pop .38s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@media (min-width: 560px) { .tile { font-size: 12px; gap: 10px; } }

.swatch-dots { display: flex; gap: 5px; }
.swatch-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(128, 128, 128, .35); }

/* ---------- Liste : fiche d'informations, réglages ---------- */

.list { display: grid; background: var(--surface); border-radius: calc(var(--radius) + 2px); overflow: hidden; }
.rowi {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center;
  min-height: 54px; padding: 8px 16px; width: 100%;
  border: 0; border-top: 1px solid var(--line); background: none; color: inherit;
  text-align: left; cursor: pointer; transition: background-color .12s;
}
.rowi:first-child { border-top: 0; }
.rowi:hover { background: color-mix(in srgb, var(--surface) 92%, var(--text)); }
.rowi.static { cursor: default; }
.rowi.static:hover { background: none; }
.rowi > svg { width: 20px; height: 20px; color: var(--muted); }
.rowi .label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rowi .val { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.rowi .val.late { color: var(--danger); }
.rowi.danger .label, .rowi.danger > svg { color: var(--danger); }
.dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--oc); color: var(--oon); }
.dot svg { width: 12px; height: 12px; }
.dot.small { width: 10px; height: 10px; }

/* ---------- Tâches ---------- */

.strip { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px; scrollbar-width: none; justify-content: safe center; }
.strip::-webkit-scrollbar { display: none; }
.strip .key { width: auto; flex: none; min-height: 38px; padding: 0 14px; font-size: 12px; border-radius: 999px; gap: 8px; }
.strip .key.on { --c: var(--accent); --on: var(--on-accent); }
.strip .key small { opacity: .65; font-size: 11px; }
.strip .key.round { width: 38px; padding: 0; --c: transparent; border: 2px dashed var(--line); color: var(--muted); }
.strip .sep { flex: none; width: 14px; height: 14px; color: var(--muted); }

.mhead { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; margin-top: 14px; padding: 0 2px; }
.mhead:first-child { margin-top: 0; }
.mhead .title { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; overflow-wrap: anywhere; }
.mhead .title small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.mhead .key { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; }
.mhead .key svg { width: 16px; height: 16px; }

.line { display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px; min-height: 52px; padding: 6px 10px; text-transform: none; letter-spacing: .02em; font-size: 15px; }
.line .mid { display: grid; gap: 2px; text-align: center; overflow-wrap: anywhere; }
.line small { font-size: 11px; opacity: .65; letter-spacing: .08em; text-transform: uppercase; }
.line small.late { color: var(--danger); opacity: 1; }
.line.done .mid > span { text-decoration: line-through; opacity: .5; }
.line .state { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.line .state.doing { color: var(--accent); }
.line .state.done { background: var(--accent); color: var(--on-accent); }
.line .state svg { width: 18px; height: 18px; }
.line .dot { width: 26px; height: 26px; justify-self: end; }
.line.add { display: flex; min-height: 44px; --c: transparent; border: 2px dashed var(--line); color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.line.add:hover { color: var(--accent); border-color: var(--accent); filter: none; }
.win-inner { display: grid; gap: 14px; }
.step .stitle { font-weight: 600; font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.step.done .stitle { text-decoration: line-through; opacity: .5; }
.step.done > svg { color: var(--accent); }
.empty { padding: 28px 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Fenêtre : la même partout ---------- */

.veil {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .15s;
}
.win {
  --key: color-mix(in srgb, var(--surface) 88%, var(--text));
  width: 100%; max-width: 420px; max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  animation: rise .2s cubic-bezier(.2, 1.2, .4, 1);
}
.win-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 12px 12px 0; }
.win-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.win-head .key { min-height: 40px; width: 40px; padding: 0; border-radius: 50%; --c: transparent; }
.win-body { padding: 16px; overflow-y: auto; display: grid; gap: 14px; }
.win-foot { padding: 0 16px 12px; display: grid; gap: 8px; }
.win .grid { grid-template-columns: repeat(3, 1fr); }
.win .seg, .win .list { background: var(--bg); }
.win .rowi:hover { background: color-mix(in srgb, var(--bg) 90%, var(--text)); }
.win .rowi.static:hover { background: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@media (max-width: 559px) {
  .veil { align-items: flex-end; padding: 0; }
  .win { max-width: none; max-height: 92dvh; border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- Champs ---------- */

.field { display: grid; gap: 6px; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--muted); }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
  text-align: center; text-align-last: center; font-weight: 600; font-size: 16px;
  outline: none; -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.search { margin-bottom: 14px; height: 44px; background: var(--surface); border-color: transparent; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar .search { margin: 0; flex: 1; }
.picks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pick {
  aspect-ratio: 1; width: 100%; padding: 0; border: 0; border-radius: calc(var(--radius) * .6);
  background: var(--c, var(--bg)); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .1s;
}
.pick:active { transform: scale(.88); }
.pick svg { width: 55%; height: auto; }
.pick.on { outline: 3px solid var(--text); outline-offset: 2px; }
.pick.icon.on { background: var(--accent); color: var(--on-accent); outline: 0; }
.pick.free { background: conic-gradient(#FF5D5D, #FFC53D, #7ED957, #2FC6D6, #7C6BFF, #FF5DA2, #FF5D5D); }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hex { position: relative; height: 48px; border-radius: var(--radius); border: 2px solid var(--line); overflow: hidden; }
.hex input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; background: none; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices .key { min-height: 42px; font-size: 12px; }
.choices .key.sel { outline: 3px solid var(--text); outline-offset: -3px; }
input[type=range].range { width: 100%; height: 48px; accent-color: var(--accent); }
.code {
  padding: 16px; border-radius: var(--radius); background: var(--bg); border: 2px dashed var(--line);
  text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .12em; user-select: all; overflow-wrap: anywhere;
}
.sub { text-align: center; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.hero { width: 84px; height: 84px; margin: 0 auto; border-radius: calc(var(--radius) + 4px); display: flex; align-items: center; justify-content: center; }
.hero svg { width: 44px; height: 44px; }

/* ---------- Menu contextuel ---------- */

.menu {
  --key: transparent;
  position: fixed; z-index: 60; width: max-content; min-width: 150px; max-width: 240px; padding: 5px;
  display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  animation: rise .14s cubic-bezier(.2, 1.2, .4, 1);
}
.menu .key { min-height: 38px; padding: 0 14px; font-size: 11px; gap: 8px; justify-content: flex-start; border-radius: calc(var(--radius) - 4px); }
.menu .key svg { width: 16px; height: 16px; }
.menu .key:hover { --c: color-mix(in srgb, var(--surface) 86%, var(--text)); filter: none; }
.menu .key.danger { --c: transparent; }
.menu .key.danger:hover { --c: color-mix(in srgb, var(--danger) 16%, var(--surface)); }
.menu-veil { position: fixed; inset: 0; z-index: 59; }
@media (max-width: 559px) {
  .menu-veil { background: color-mix(in srgb, var(--bg) 70%, transparent); }
  .menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; padding: 8px; }
  .menu .key { min-height: 48px; font-size: 12px; justify-content: center; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 80; bottom: calc(96px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center;
  animation: drop .25s cubic-bezier(.2, 1.4, .4, 1);
}
.toast.bad { background: var(--danger); color: #2A0A0A; animation: drop .25s, shake .3s .25s; }
@keyframes drop { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes shake { 25% { margin-left: -6px; } 75% { margin-left: 6px; } }

/* ---------- Porte d'entrée (connexion, installation) ---------- */

.gate { max-width: 340px; min-height: 100dvh; margin: 0 auto; padding: 32px 16px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.logo { font-size: 56px; font-weight: 700; letter-spacing: .3em; margin-right: -.3em; text-align: center; line-height: 1; padding-bottom: 12px; }
.group { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); }
.group-title { font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.alert { padding: 12px; border-radius: var(--radius); background: var(--danger); color: #2A0A0A; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 0.3 : présentation, sections, cartes, calendrier, documents ---------- */

.key.square.me svg.ico-img, .tile svg.ico-img, .pick svg.ico-img, .present-icon svg.ico-img, .hero svg.ico-img, .dot svg.ico-img { border-radius: 22%; }
.dot svg.ico-img, .owner svg.ico-img { border-radius: 50%; width: 100% !important; height: 100% !important; }
.pick.icon.more { background: none; border: 2px dashed var(--line); color: var(--muted); }
.pick.icon.img.on { background: none; outline: 3px solid var(--accent); outline-offset: 2px; }
.input.area { height: auto; min-height: 104px; padding: 12px 14px; line-height: 1.5; resize: vertical; text-align: justify; text-align-last: left; font-weight: 400; font-size: 15px; }

.sect { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sect::before, .sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sect.link { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; color: var(--text); }
.sect.link svg { width: 14px; height: 14px; color: var(--muted); }
.sect.link:hover span { color: var(--accent); }
.sect-wrap:first-of-type .sect { margin-top: 14px; }
main > .line.add:first-child, .sect-wrap ~ .line.add { margin-bottom: 4px; }

.present { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; }
.present-icon { width: 76px; height: 76px; border-radius: calc(var(--radius) + 6px); display: flex; align-items: center; justify-content: center; }
.present-icon svg { width: 40px; height: 40px; }
.present-icon svg.ico-img { width: 100%; height: 100%; border-radius: inherit; }
.present .alt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.present .desc { width: 100%; max-width: 62ch; text-align: center; hyphens: auto; -webkit-hyphens: auto; line-height: 1.6; color: color-mix(in srgb, var(--text) 85%, var(--bg)); }

.stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 16px; }
.stat { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 92px; padding: 10px 6px; border: 0; border-radius: calc(var(--radius) + 2px); background: var(--surface); color: inherit; font: inherit; text-align: center; }
.stat.link { cursor: pointer; transition: filter .12s; }
.stat.link:hover { filter: brightness(1.1); }
.stat .label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .big { font-size: 24px; font-weight: 700; line-height: 1.1; display: flex; }
.stat .big svg { width: 24px; height: 24px; }
.stat small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat.late .big, .stat.late small { color: var(--danger); }
.stat .progress { width: 70%; }
.progress { display: block; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.switch { width: 38px; height: 22px; border-radius: 22px; background: color-mix(in srgb, var(--text) 18%, transparent); position: relative; transition: background-color .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); background: var(--on-accent); }

.tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.tools .seg { margin-bottom: 12px; }
.seg.views .key { width: 44px; padding: 0; }
.seg.views .key svg { width: 16px; height: 16px; }
.pipeline { margin-bottom: 14px; }

.card { margin-bottom: 10px; padding: 10px; border-radius: calc(var(--radius) + 4px); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); border: 1px solid var(--line); border-top: 3px solid var(--sc, var(--line)); display: grid; gap: 8px; }
.card-head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; }
.card-head .title { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; overflow-wrap: anywhere; }
.card-head .title small { color: var(--muted); font-weight: 600; margin-left: 8px; }
.card-head .key { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; }
.card-head .key svg { width: 16px; height: 16px; }
.card > .progress { margin: 0 4px; }
.line .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.line small.tag { color: var(--accent); opacity: 1; }
.soon { display: flex; justify-content: center; padding: 64px 0; color: var(--muted); }
.soon svg { width: 40px; height: 40px; }
.empty svg { width: 28px; height: 28px; margin: 0 auto; opacity: .6; }


.tile.thumb { padding: 0; overflow: hidden; justify-content: flex-end; }
.tile.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.thumb .name { position: relative; width: 100%; padding: 18px 6px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff; }
.tile .badge.review, .tile .badge.ok, .tile .badge.redo { width: 24px; height: 24px; top: 6px; right: 6px; border-radius: 50%; padding: 4px; }
.badge.review { background: var(--accent); color: var(--on-accent); }
.badge.ok { background: #2ED3A0; color: #0B2A20; }
.badge.redo { background: var(--danger); color: #2A0A0A; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pill.review { background: var(--accent); color: var(--on-accent); }
.pill.ok { background: #2ED3A0; color: #0B2A20; }
.pill.redo { background: var(--danger); color: #2A0A0A; }
.rowi.doc { grid-template-columns: 28px 1fr auto; }
.rowi.doc .mini { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.rowi .stitle { font-weight: 600; font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.preview { display: block; width: 100%; padding: 0; border: 0; background: var(--bg); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.preview img { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
button.hero { border: 0; cursor: pointer; background: var(--bg); color: var(--text); }

.cal { display: grid; gap: 10px; }
.cal-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.cal-title { border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted); padding-bottom: 2px; }
.day { min-height: 92px; padding: 6px 5px; border: 0; border-radius: calc(var(--radius) - 4px); background: var(--surface); color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: default; overflow: hidden; }
.day.has { cursor: pointer; }
.day.has:hover { filter: brightness(1.1); }
.day.out { opacity: .35; }
.day .num { font-size: 12px; font-weight: 700; text-align: center; }
.day.today .num { color: var(--on-accent); background: var(--accent); border-radius: 999px; align-self: center; padding: 0 8px; }
.day .items { display: grid; gap: 3px; }
.day .item { display: block; font-size: 10px; line-height: 1.3; padding: 1px 5px; border-radius: 4px; border-left: 3px solid var(--ic); background: color-mix(in srgb, var(--ic) 22%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day .item.done { opacity: .45; text-decoration: line-through; }
.day .more { font-size: 10px; color: var(--muted); text-align: center; }
@media (max-width: 559px) {
  .day { min-height: 54px; padding: 4px 2px; align-items: center; }
  .day .items { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .day .item { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--ic); font-size: 0; }
  .day .more { display: none; }
  .stats { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .stat { min-height: 84px; }
  .stat .big { font-size: 20px; }
}

/* ---------- 0.4 : outils, kanban, glisser-déposer, pipeline, graphe, membres ---------- */

.key.square.tool { border-radius: var(--radius); --c: var(--surface); --on: var(--muted); }
.key.square.tool.on { --c: color-mix(in srgb, var(--accent) 18%, var(--surface)); --on: var(--accent); }
.key .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10px; line-height: 18px; letter-spacing: 0; }
.sect > svg { width: 14px; height: 14px; flex: none; }
.sect > .dot { flex: none; }
.win-head .key { color: var(--muted); }
.who { text-align: center; font-weight: 600; font-size: 15px; margin-top: -4px; }
.contact-keys { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.contact-keys .key { flex-direction: column; gap: 4px; min-height: 60px; font-size: 10px; }
.field-wrap { display: block; }

/* Glisser-déposer */
.dnd-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; margin: 0 !important; opacity: .94; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: none !important; }
.dnd-src { opacity: .28; }
.dnd-over { outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 4px; border-radius: var(--radius); }
.lift { transform: scale(1.03) !important; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
[data-dnd] { touch-action: pan-y; }
.strip [data-dnd] { touch-action: pan-x; }
@media (pointer: fine) { [data-dnd]:not(.tile):not(.line) { cursor: grab; } }
.grip { display: flex; justify-content: center; color: var(--muted); opacity: .6; }
.grip svg { width: 16px; height: 16px; }
.stack.tasks { min-height: 8px; }
.missions { display: grid; gap: 10px; margin-bottom: 10px; min-height: 8px; }
.missions .card { margin: 0; }
.card .stack.tasks { min-height: 6px; }
.line.add.danger-line { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.line.add.danger-line:hover { color: var(--danger); border-color: var(--danger); }
.rowi.step { grid-template-columns: 20px 1fr 20px; }

/* Secteurs : flèches entre étapes */
.pipeline .key.sector + .key.sector { margin-left: 16px; }
.pipeline .key.sector + .key.sector::before { content: ""; position: absolute; left: -13px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.kcol { display: grid; gap: 8px; padding: 10px; border-radius: calc(var(--radius) + 4px); background: color-mix(in srgb, var(--surface) 50%, var(--bg)); border: 1px solid var(--line); }
.col-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 2px 0 4px; }
.col-head svg { width: 16px; height: 16px; color: var(--muted); }
.kcol.doing .col-head svg, .kcol.review .col-head svg { color: var(--accent); }
.kcol.done .col-head svg { color: #2ED3A0; }
.col-head small { color: var(--muted); }
.kcol .stack.tasks { min-height: 60px; }
.kcol .line { min-height: 48px; font-size: 14px; }
@media (max-width: 799px) {
  .kanban { grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .kanban::-webkit-scrollbar { display: none; }
  .kcol { scroll-snap-align: center; }
  body.dragging .kanban { scroll-snap-type: none; }
}

/* Schéma du pipeline */
.pipe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 24px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.pipe::-webkit-scrollbar { display: none; }
.stage { position: relative; display: grid; align-content: start; gap: 10px; padding: 12px; border-radius: calc(var(--radius) + 4px); background: var(--surface); border-top: 3px solid var(--sc); }
.stage + .stage::before { content: ""; position: absolute; left: -24px; top: 26px; width: 24px; height: 2px; background: var(--line); }
.stage + .stage::after { content: ""; position: absolute; left: -9px; top: 22px; width: 7px; height: 7px; border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: rotate(45deg); }
.stage-top { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.stage-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sc); color: #16182A; font-weight: 700; font-size: 12px; }
.stage-num svg { width: 15px; height: 15px; }
.stage-name { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.stage-top small { color: var(--muted); font-size: 11px; font-weight: 600; }
.stage .progress i { background: var(--sc); }
.stage-missions { display: grid; gap: 4px; }
.ms { display: grid; grid-template-columns: 16px 1fr 16px; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 12px; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.ms svg { width: 14px; height: 14px; color: var(--muted); }
.ms.done { color: var(--muted); }
.ms.done span { text-decoration: line-through; }
.ms.done svg { color: var(--sc); }
.tools-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 8px; }
.key.tool-chip { width: auto; min-height: 28px; padding: 0 11px; border-radius: 999px; font-size: 10px; letter-spacing: .08em; --c: color-mix(in srgb, var(--text) 10%, transparent); }
.tools-all { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: calc(var(--radius) + 4px); border: 1px dashed var(--line); }
.tools-all .label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tools-all .tools-row { flex: 0 1 auto; }
.tools-all .key.round { width: 30px; min-height: 30px; padding: 0; border-radius: 50%; --c: transparent; border: 2px dashed var(--line); color: var(--muted); }
.tools-all .key.round svg { width: 14px; height: 14px; }

/* Tâches : secteurs en sections repliables */
.secs { display: grid; gap: 8px; }
.sec { display: grid; gap: 10px; padding: 8px; border-radius: calc(var(--radius) + 8px); border: 1.5px solid color-mix(in srgb, var(--sc, var(--line)) 55%, transparent); background: color-mix(in srgb, var(--sc, var(--surface)) 5%, transparent); }
.sec.closed { padding: 4px; }
.sec-head { display: grid; grid-template-columns: 30px 1fr auto 18px; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: calc(var(--radius) + 2px); background: none; color: var(--text); font: inherit; cursor: pointer; }
.sec-head:hover { filter: brightness(1.08); }
.sec-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sc); color: #16182A; font-weight: 700; font-size: 12px; }
.sec-num svg { width: 15px; height: 15px; }
.sec-name { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; overflow-wrap: anywhere; }
.sec-head small { color: var(--muted); font-size: 12px; font-weight: 600; }
.sec-head > svg { width: 16px; height: 16px; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.sec-head.closed > svg { transform: rotate(0deg); }
.sec .missions { margin-bottom: 0; }
.sec .card { border-top: 1px solid var(--line); background: var(--bg); }
.secs + .line.add { margin-top: 8px; }
.mcheck { width: 30px; height: 30px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mcheck svg { width: 14px; height: 14px; opacity: 0; }
.mcheck:hover svg { opacity: .6; }
.mcheck.on { background: var(--sc); border-color: var(--sc); color: #16182A; }
.mcheck.on svg { opacity: 1; }
.card.done { opacity: .62; }
.card.done .card-head .title { text-decoration: line-through; }
.key.pill-key { width: auto; min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 11px; gap: 8px; --c: var(--surface); }
.key.pill-key.on { --c: color-mix(in srgb, var(--accent) 18%, var(--surface)); --on: var(--accent); }
.key.pill-key svg { width: 14px; height: 14px; }
.key.pill-key .dot { width: 18px; height: 18px; }
.tools { grid-template-columns: 1fr auto auto; }
.tools > .pill-key { margin-bottom: 12px; }
@media (max-width: 559px) { .tools { grid-template-columns: 1fr auto; } .tools > .pill-key { grid-column: 1 / -1; grid-row: 2; width: 100%; } }

/* Graphe */
.graph { position: relative; height: calc(100dvh - 300px); min-height: 360px; border-radius: calc(var(--radius) + 6px); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--surface) 70%, var(--bg)), var(--bg) 75%); border: 1px solid var(--line); overflow: hidden; }
.graph-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.graph-svg:active { cursor: grabbing; }
.edge { stroke: color-mix(in srgb, var(--text) 22%, transparent); stroke-width: 1.5; transition: opacity .2s; }
.edge.in { stroke: color-mix(in srgb, var(--text) 38%, transparent); stroke-width: 2.5; }
.edge.owner { stroke: color-mix(in srgb, var(--accent) 70%, transparent); stroke-width: 2; }
.edge.creator { stroke-dasharray: 4 5; }
.edge[class*="rel"] { stroke: #C86BFA; stroke-width: 2.5; stroke-dasharray: 9 4; }
.edge.dim, .node.dim { opacity: .12; }
.node { cursor: pointer; transition: opacity .2s; }
.node circle { stroke: var(--bg); stroke-width: 3; }
.node.sel circle { stroke: var(--text); }
.node text { fill: var(--text); font-size: 10px; font-weight: 600; letter-spacing: .06em; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; pointer-events: none; }
.node.univers text { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.node.membre text { font-size: 9px; fill: var(--muted); }
.graph-card { position: absolute; left: 12px; right: 12px; bottom: 12px; display: none; grid-template-columns: 30px 1fr 44px 44px; gap: 10px; align-items: center; padding: 8px 8px 8px 12px; border-radius: calc(var(--radius) + 4px); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px); animation: rise .18s; }
.graph-card.on { display: grid; }
.graph-card .dot { width: 30px; height: 30px; }
.graph-card .dot svg { width: 16px; height: 16px; }
.gc-name { display: grid; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.gc-name small { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.graph-card .key.square { border-radius: var(--radius); }
.graph-card .accent-flat { --c: var(--accent); --on: var(--on-accent); }
.graph-filters { margin: 0 0 10px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 10px; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.edge-key { display: inline-block; width: 22px; height: 0; border-top: 2px solid color-mix(in srgb, var(--text) 38%, transparent); }
.edge-key.owner { border-color: var(--accent); }
.edge-key.member { border-top-width: 1.5px; border-color: color-mix(in srgb, var(--text) 22%, transparent); }
.edge-key.rel { border-top: 2px dashed #C86BFA; }
@media (max-width: 559px) { .graph { height: calc(100dvh - 280px); margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; } }

/* Graphe 0.5 */
.graph-modes { margin-bottom: 10px; }
.graph-svg path.edge { fill: none; }
.ring { fill: none; stroke: color-mix(in srgb, var(--text) 7%, transparent); stroke-width: 1; stroke-dasharray: 2 6; }
.node.root circle { stroke: var(--accent); stroke-width: 4; }
.node.root text { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.node.groupe circle { stroke: var(--line); stroke-dasharray: 3 3; }
.node.groupe text { fill: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.node.projet text { font-size: 11px; }
.arbre .edge { stroke-width: 2; }
.arbre .edge.owner { stroke: color-mix(in srgb, var(--accent) 80%, transparent); }
.arbre .edge.in { stroke: color-mix(in srgb, var(--text) 45%, transparent); }
.toolbar .pill-key { min-height: 44px; border-radius: var(--radius); flex: none; }
.edge-key.in { border-top-width: 2.5px; }

/* Passe de finition 0.5 */
.node text { font-size: calc(10px / var(--gk, 1)); stroke-width: calc(3px / var(--gk, 1)); }
.node.projet text { font-size: calc(11px / var(--gk, 1)); }
.node.univers text, .node.root text { font-size: calc(12px / var(--gk, 1)); }
.node.membre text { font-size: calc(9.5px / var(--gk, 1)); }
.line .mid { overflow-wrap: break-word; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }
.kcol .line { grid-template-columns: 24px 1fr 24px; gap: 6px; padding: 6px 8px; }
.kcol .line .state { width: 24px; height: 24px; }
.kcol .line .dot { width: 22px; height: 22px; }
@media (min-width: 800px) { .kanban { grid-auto-columns: minmax(190px, 1fr); overflow-x: auto; padding-bottom: 6px; } }
.stage-name, .sec-name { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 559px) { .stage-name { font-size: 11px; letter-spacing: .06em; } .pipe { grid-auto-columns: minmax(160px, 72%); } }
.seg.icons.many { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.seg.icons.many.end { -webkit-mask-image: none; mask-image: none; }

.reseau .edge.member { stroke: color-mix(in srgb, var(--text) 14%, transparent); }
.reseau .edge.owner { stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.reseau .edge.rel { stroke-width: 2; opacity: .75; }
.graph-svg:not(.has-sel) .edge.rel { opacity: .55; }

/* 0.6 : secteurs, leads, dossiers */
.sec { --sc: var(--line); }
.tile .uni { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--oc); color: var(--oon); border: 2px solid rgba(0, 0, 0, .28); }
.tile .uni svg { width: 13px; height: 13px; }
.tile .badge.lead { width: 22px; height: 22px; top: 6px; right: 6px; padding: 3px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.teams { display: grid; gap: 12px; }
.team-block { display: grid; gap: 10px; padding: 10px; border-radius: calc(var(--radius) + 8px); border: 1.5px solid color-mix(in srgb, var(--sc) 55%, transparent); background: color-mix(in srgb, var(--sc) 5%, transparent); }
.team-head { display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: 10px; padding: 4px 6px; }
.team-head .dot { width: 14px; height: 14px; }
.team-name { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.team-leads { display: flex; gap: 4px; }
.team-leads .dot { width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--accent); }
.team-head small { color: var(--muted); font-weight: 600; }
.team-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.team-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1.5px solid color-mix(in srgb, var(--sc) 60%, transparent); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.team-chip .dot { width: 22px; height: 22px; }
.team-chip .dot.small { width: 10px; height: 10px; }
.team-chip small { color: var(--muted); }
.line small.team-tag { color: var(--tc); opacity: 1; }
.line .dot.pool { background: none; border: 2px dashed var(--oc); color: var(--oc); }
.line .take { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; justify-self: end; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.line .take svg { width: 15px; height: 15px; }
.rowi .val.ok { color: #2ED3A0; }
.rowi .val { display: flex; align-items: center; gap: 8px; }
.key.picker-key { justify-content: space-between; min-height: 48px; padding: 0 14px; text-transform: none; letter-spacing: .02em; font-size: 15px; --c: var(--bg); border: 2px solid var(--line); }
.key.picker-key > svg:last-child { width: 16px; height: 16px; color: var(--muted); margin-left: auto; }
.key.picker-key .dot { width: 24px; height: 24px; }
.key.picker-key .dot.small { width: 12px; height: 12px; }
.key.picker-key > span:not(.dot) { flex: 1; text-align: center; overflow-wrap: anywhere; }
.filter-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.filter-note .key.square { width: 26px; min-height: 26px; --c: var(--surface); }
.filter-note .key.square svg { width: 13px; height: 13px; }
.sect .key.square.mini { width: 28px; min-height: 28px; flex: none; --c: var(--surface); --on: var(--muted); }
.sect .key.square.mini svg { width: 14px; height: 14px; }
.crumbs { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding: 2px; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs .key { width: auto; flex: none; min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: 11px; gap: 6px; --c: var(--surface); --on: var(--muted); }
.crumbs .key + .key::before { content: "/"; position: absolute; left: -6px; color: var(--muted); }
.crumbs .key.on { --c: color-mix(in srgb, var(--accent) 16%, var(--surface)); --on: var(--accent); }
.tile.folder { --c: var(--surface); }
.tile.folder svg { color: var(--fc, var(--muted)); }
.tile.folder.teamed { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fc, transparent) 70%, transparent); }
.tile.dnd-over, .crumbs .key.dnd-over { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 559px) {
  .tools { grid-template-columns: 1fr auto auto; gap: 6px; }
  .tools .seg.thin .key { font-size: 10px; letter-spacing: .03em; padding: 0 4px; }
  .seg.views .key { width: 34px; }
  .tools .key.square.tool { width: 36px; min-height: 34px; }
}
.tile .name { overflow-wrap: break-word; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }

/* ---------- 0.7 : accès, compétences, recrutement ---------- */
.tile .badge.corner { top: auto; bottom: 6px; right: 6px; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(0, 0, 0, .28); color: inherit; }
.tile .badge.corner.hot { background: var(--accent); color: var(--on-accent); }
.key.tool.hot .count { animation: pop .38s cubic-bezier(.2, 1.5, .4, 1); }
.dots { display: inline-flex; gap: 5px; align-items: center; }

/* Compétences : étiquettes et pastilles */
.line small.team-tag.skill, .val .team-tag.skill { display: inline-flex; align-items: center; gap: 3px; }
.team-tag.skill svg { width: 10px; height: 10px; }
.skill-row { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; }
.skill-row .team-tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tc); }
.skill-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.skill-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 14px; border-radius: 18px;
  border: 2px solid var(--tc); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
  transition: transform .12s, background .12s;
}
.skill-pill svg { width: 14px; height: 14px; color: var(--tc); }
.skill-pill.on { background: var(--tc); color: #111; }
.skill-pill.on svg { color: inherit; opacity: .7; }
.skill-pill:active { transform: scale(.94); }
.skill-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Tâches ouvertes : proposition envoyée */
.line .dot.pool.on, .line .take.on { border-style: solid; background: var(--oc, var(--accent)); color: var(--on-accent); }
.line .take.on { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.line small.tag.hot { color: var(--accent); }

/* Postes ouverts et candidatures */
.line .app-state, .count-pill { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; justify-self: end; color: var(--muted); }
.line .app-state svg { width: 16px; height: 16px; }
.app-state.pending { color: var(--accent); }
.app-state.accepted { background: #2ED3A0; color: #0B2A20; }
.app-state.refused { color: var(--danger); }
.count-pill { background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.cand { display: grid; gap: 6px; padding: 8px 10px; border-radius: var(--radius); background: var(--surface); }
.cand-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.cand-who { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: inherit; font: inherit; font-size: 15px; cursor: pointer; justify-self: start; }
.cand-who .dot { width: 26px; height: 26px; }
.cand .mini-ok { color: var(--accent); display: inline-flex; }
.cand .mini-ok svg { width: 13px; height: 13px; }
.cand-keys { display: inline-flex; gap: 6px; }
.cand-keys .key.square.mini { width: 34px; min-height: 34px; padding: 0; flex: none; }
.cand-keys .key.square.mini svg { width: 15px; height: 15px; }
.cand-msg { margin: 0; font-size: 14px; color: var(--muted); text-align: justify; text-align-last: left; hyphens: auto; white-space: pre-line; }
.win .grid.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 280px; margin: 0 auto; }

/* ---------- 0.8 : bannières, nom de code, versions de tâche, rôles fixes ---------- */
.present.has-banner { gap: 0; }
.present .banner { width: 100%; aspect-ratio: 3 / 1; max-height: 260px; border-radius: calc(var(--radius) + 6px); overflow: hidden; background: var(--surface); }
.present .banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.present.has-banner .present-icon { margin-top: -38px; box-shadow: 0 0 0 5px var(--bg); position: relative; }
.present.has-banner > :nth-child(n+3) { margin-top: 10px; }
.present .codename { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; border: 1px dashed color-mix(in srgb, var(--text) 30%, transparent); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.present .codename svg { width: 12px; height: 12px; }

.banner-field { position: relative; }
.banner-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.banner-x svg { width: 16px; height: 16px; }
.banner-x:hover { background: var(--danger); }
.banner-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.banner-pick { aspect-ratio: 3 / 1; width: 100%; border-radius: var(--radius); border: 2px dashed color-mix(in srgb, var(--text) 22%, transparent); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; padding: 0; }
.banner-pick.on { border-style: solid; border-color: transparent; }
.banner-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-pick svg { width: 26px; height: 26px; }
.banner-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Validation dans l'ordre : rang de chaque validateur */
.rank { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Versions d'une tâche */
.ver { --vc: var(--muted); display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 2px solid color-mix(in srgb, var(--vc) 70%, transparent); }
.ver.pending { --vc: var(--accent); }
.ver.ok { --vc: #2ED3A0; }
.ver.changes { --vc: var(--danger); }
.ver.compact { border-width: 1px; }
.ver.compact { cursor: pointer; opacity: .75; }
.ver.compact > :not(.ver-head) { display: none; }
.ver-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.ver-num { font-weight: 800; font-size: 15px; letter-spacing: .04em; }
.ver-name { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ver-state svg { width: 14px; height: 14px; }
.ver.pending .ver-state { color: var(--accent); }
.ver.ok .ver-state { color: #2ED3A0; }
.ver.changes .ver-state { color: var(--danger); }
.ver-loc { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: calc(var(--radius) - 4px); border: 0; background: color-mix(in srgb, var(--bg) 55%, var(--surface)); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ver-loc svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.ver-loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-note, .ver-fb p { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-line; text-align: justify; text-align-last: left; hyphens: auto; }
.ver-fb { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px 10px; border-radius: calc(var(--radius) - 4px); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.ver-fb .dot { width: 22px; height: 22px; }
.ver-fb > svg { width: 16px; height: 16px; color: var(--danger); margin-top: 2px; }
.ver-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.ver-meta .dot { width: 18px; height: 18px; }
.ver-meta span:last-child { margin-left: auto; }

/* Rôles : une liste verrouillée se lit sans se modifier */
.list.locked .rowi { cursor: default; opacity: .7; }

/* Compétences et sous-compétences */
.skill-group { display: grid; justify-items: center; gap: 8px; padding: 10px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); }
.skill-subs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.skill-pill.sub { min-height: 30px; padding: 0 10px 0 12px; font-size: 12px; border-width: 1.5px; }
.skill-pill.sub.add { padding: 0; width: 30px; justify-content: center; border-style: dashed; }
.skill-pill.sub.add svg { color: var(--tc); }
.choices:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Tuile de projet : liseré de l'univers (icône de l'univers en bas, porteur en haut) ; coins : recrute, fiche seule */
.tile.proj { --lw: 8px; }
.tile.proj.in-uni { box-shadow: inset 0 0 0 var(--lw) var(--uc), inset 0 0 0 calc(var(--lw) + 2px) rgba(0, 0, 0, .32); }
.tile.proj .uni-tab, .tile.proj .own-tab { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; }
.tile.proj .uni-tab { bottom: 0; height: 24px; min-width: 42px; padding: 2px 12px 0; border-radius: 12px 12px 0 0; background: var(--uc); }
.tile.proj .uni-tab svg { width: 15px; height: 15px; max-width: none; }
.tile.proj .own-tab { top: 4px; }
.tile.proj.in-uni .own-tab { top: 0; height: 30px; min-width: 42px; padding: 0 9px 3px; border-radius: 0 0 14px 14px; background: var(--uc); }
.tile.proj .own-tab .owner { position: static; }
/* Coins : icône simple ; dans un univers, une encoche du liseré qui porte l'icône */
.tile.proj .corner-ico { position: absolute; top: 8px; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; opacity: .85; }
.tile.proj .corner-ico svg { width: 100%; height: 100%; max-width: none; }
.tile.proj .corner-ico.hire { left: 8px; }
.tile.proj .corner-ico.peek { right: 8px; }
.tile.proj.in-uni .corner-ico { top: 0; width: 30px; height: 30px; padding: 7px; opacity: 1; background: var(--uc); }
.tile.proj.in-uni .corner-ico.hire { left: 0; border-radius: inherit; border-top-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 14px; }
.tile.proj.in-uni .corner-ico.peek { right: 0; border-radius: inherit; border-top-left-radius: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 14px; }
/* Nom : marge pour le liseré et les encoches, taille qui suit la largeur de la tuile */
.tile.proj { container-type: inline-size; padding: 30px calc(var(--lw) + 6px) 26px; }
.tile.proj .name { font-size: clamp(8px, 8.6cqi, 11px); letter-spacing: .04em; }
.tile.proj svg { max-width: 38px; }


/* Familles de projets liés : un signe dans l'espace entre deux tuiles qui se suivent */
.tile.linked { overflow: visible; }
.tile .chain { position: absolute; left: calc(var(--gap) / -2); top: 50%; transform: translate(-50%, -50%); z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 25%, transparent); pointer-events: auto; }
.tile .chain svg { width: 14px; height: 14px; max-width: none; }
.tile .chain.back svg { transform: scaleX(-1); }
/* Un signe en début de ligne ne relie rien de visible : on le cache */
.grid > .tile.linked:nth-child(3n+1) .chain { display: none; }
@media (min-width: 560px) { .grid > .tile.linked:nth-child(3n+1) .chain { display: flex; } .grid > .tile.linked:nth-child(4n+1) .chain { display: none; } }
@media (min-width: 800px) { .grid > .tile.linked:nth-child(4n+1) .chain { display: flex; } .grid > .tile.linked:nth-child(5n+1) .chain { display: none; } }
.rel-names { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.rel-names > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 0.9 : images pleine taille, avatars, initiales, barres, documents ---------- */

/* Ascenseurs aux couleurs du thème */
html { scrollbar-color: color-mix(in srgb, var(--text) 22%, transparent) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 22%, transparent); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 38%, transparent); }
.win-body, .win-inner { scrollbar-color: color-mix(in srgb, var(--text) 22%, transparent) transparent; }

/* Image perso d'un univers ou d'un projet : toute la tuile */
.tile.imgfill { padding: 0; overflow: hidden; justify-content: flex-end; }
.tile.imgfill > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tile.imgfill .name { position: relative; z-index: 1; width: 100%; padding: 22px 8px 9px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; }
.tile.imgfill .role { position: relative; z-index: 1; }
.tile.proj.imgfill { padding: 0; }
.tile.proj.imgfill .name { padding: 22px calc(var(--lw) + 8px) 30px; }
.tile.proj.imgfill:not(.in-uni) .name { padding-bottom: 10px; }
/* Le liseré passe au-dessus de l'image */
.tile.proj.in-uni::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; border: var(--lw) solid var(--uc); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .32); }
.tile.proj.in-uni { box-shadow: none; }
.tile.proj .uni-tab, .tile.proj .own-tab, .tile.proj .corner-ico { z-index: 2; }
.present-icon:has(svg.ico-img) { overflow: hidden; }
.present-icon svg.ico-img { border-radius: 0; }
.rel-ico svg.ico-img { width: 100%; height: 100%; }

/* Personne avec une image : l'image prend la place, un liseré de sa couleur autour */
.whochip { position: relative; }
.whochip.has-img { padding: 2px; background: var(--oc); }
.whochip.has-img svg.ico-img { width: 100% !important; height: 100% !important; border-radius: 50%; }
.key.square.me:has(svg.ico-img) { padding: 3px; }
.key.square.me svg.ico-img { width: 100%; height: 100%; border-radius: 50%; }
.hero:has(svg.ico-img) { padding: 5px; overflow: hidden; }
.hero svg.ico-img { width: 100%; height: 100%; border-radius: calc(var(--radius)); }
.tile.person.imgfill { box-shadow: inset 0 0 0 4px var(--c); }
.tile.person.imgfill::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 4px solid var(--c); pointer-events: none; z-index: 1; }
/* Au survol : les initiales */
.whochip::after { content: attr(data-ini); position: absolute; inset: 0; border-radius: inherit; display: none; align-items: center; justify-content: center; background: var(--oc); color: var(--oon); font-weight: 800; font-size: 9px; letter-spacing: .02em; line-height: 1; }
.whochip:hover::after { display: flex; }
.dot.whochip:not(.small)::after { font-size: clamp(8px, 40%, 13px); }
.line .dot.whochip::after, .key.picker-key .dot.whochip::after, .cand-who .dot.whochip::after { font-size: 10px; }
.graph-card .dot.whochip::after, .ver-fb .dot.whochip::after { font-size: 11px; }
.own-tab .owner.whochip::after, .tile .owner.whochip::after { font-size: 8px; }
.team-leads .dot.whochip::after { font-size: 9px; }

/* Dock à six onglets */
.dock { grid-template-columns: repeat(6, 1fr); width: min(calc(100% - 20px), 540px); }
.dock .key { font-size: 9px; }
@media (max-width: 400px) { .dock .key { font-size: 8px; letter-spacing: 0; } }

/* Barre : recherche (avec, au besoin, une petite touche dedans), Tri, Vue */
.toolbar .search-wrap { position: relative; flex: 1; min-width: 0; }
.toolbar .search-wrap .search { width: 100%; }
.toolbar .search-wrap.with-inner .search { padding-right: 46px; }
.in-check { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; border: 2px solid color-mix(in srgb, var(--text) 30%, transparent); background: transparent; color: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.in-check svg { width: 15px; height: 15px; }
.in-check:hover { border-color: var(--accent); color: color-mix(in srgb, var(--accent) 50%, transparent); }
.in-check.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.in-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.graph .graph-fit { position: absolute; right: 10px; bottom: 10px; z-index: 3; }

/* Documents en liste : les mêmes tuiles, couchées */
.grid.as-list { grid-template-columns: 1fr; gap: 6px; }
.grid.as-list .tile { aspect-ratio: auto; flex-direction: row; justify-content: flex-start; min-height: 52px; padding: 8px 12px; gap: 12px; text-align: left; }
.grid.as-list .tile > svg { width: 22px; max-width: 22px; flex: none; }
.grid.as-list .tile .name { -webkit-line-clamp: 1; flex: 1; text-align: left; }
.grid.as-list .tile .role { position: static; margin-left: auto; }
.grid.as-list .tile.thumb, .grid.as-list .tile.imgfill { padding: 6px 12px 6px 6px; justify-content: flex-start; }
.grid.as-list .tile.thumb img, .grid.as-list .tile.imgfill > img { position: static; width: 40px; height: 40px; border-radius: 8px; flex: none; }
.grid.as-list .tile.thumb .name { position: static; padding: 0; background: none; color: inherit; }
.grid.as-list .tile .badge { position: static; margin-left: auto; }
.grid.as-list .tile.add { min-height: 44px; justify-content: center; }

/* Trois choix sur une ligne : l'icône au-dessus du mot, rien ne déborde */
.choices:has(> :nth-child(3):last-child) .key { flex-direction: column; gap: 4px; padding: 8px 4px; min-height: 58px; font-size: 10.5px; letter-spacing: .04em; }
.choices:has(> :nth-child(3):last-child) .key .name { overflow-wrap: anywhere; text-align: center; }
/* Pas de défilement pour rien : la marge du bas fait juste la hauteur du dock */
.shell { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.graph { height: calc(100dvh - 270px - env(safe-area-inset-bottom)); }
.grid.as-list .tile.folder.teamed { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fc, transparent) 70%, transparent); }
.line small.tag.recur { display: inline-flex; align-items: center; gap: 3px; }
.line small.tag.recur svg { width: 10px; height: 10px; }

/* ---------- 0.9.2 : calendrier ---------- */
.cal-wrap { display: grid; gap: 18px; }
@media (min-width: 900px) { .cal-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .cal-side { position: sticky; top: 12px; } }
.cal-side { display: grid; gap: 8px; align-content: start; }
.cal-side .sect { margin-top: 0; }
.day { cursor: pointer; position: relative; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .12s; }
.day:hover { filter: brightness(1.12); }
.day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.day.late .num { color: var(--danger); }
.day.today.late .num { color: var(--on-accent); }
.day .items { min-height: 14px; }
.day .item { border-left: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ic) 60%, transparent); }
.day .item > span { pointer-events: none; }
.day:has(.items.dnd-over), .day.dnd-over { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
@media (max-width: 559px) { .day .item { box-shadow: none; } }

/* ---------- 0.9.2 : page d'univers, case « faites », compétences ---------- */
.uni-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 18px; }
.uni-actions .key { min-height: 46px; font-size: 11px; }
.uni-actions .key.creator { gap: 8px; }
.uni-actions .key.creator .dot { width: 22px; height: 22px; }
@media (max-width: 559px) { .uni-actions { grid-template-columns: repeat(2, 1fr); } }

/* Case « faites » : visible même décochée */
.in-check { border-color: color-mix(in srgb, var(--text) 55%, transparent); color: color-mix(in srgb, var(--text) 35%, transparent); background: color-mix(in srgb, var(--text) 6%, transparent); }
.in-check:hover { border-color: var(--accent); color: var(--accent); }

/* Badges de compétences */
.sk-badge { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--tc); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 35%, transparent); }
.sk-badge svg { width: 55%; height: 55%; }
.sk-badge svg.ico-img { width: 100%; height: 100%; border-radius: 50%; }
.sk-badge.mini { width: 20px; height: 20px; box-shadow: none; }
.sk-badge.big { width: 72px; height: 72px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 30%, transparent); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.badges.center { justify-content: center; width: 100%; margin: 2px 0 6px; }
.badges.center .sk-badge.mini { width: 26px; height: 26px; }
.sk-more { font-size: 10px; font-weight: 700; color: var(--muted); padding-left: 2px; }
.tile .badges.on-tile { position: absolute; left: 7px; bottom: 7px; gap: 2px; z-index: 2; }
.tile .badges.on-tile .sk-badge.mini { width: 18px; height: 18px; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .25); }
.tile .badges.on-tile .sk-more { color: inherit; opacity: .8; }
.skill-pill > svg:first-child { color: var(--tc); }
.skill-pill.on > svg:first-child { color: inherit; }
.skill-pill small { font-size: 10px; opacity: .7; margin-left: 2px; }
.skill-pill.sub.add svg:first-child { color: var(--tc); }
/* Fiche d'une compétence */
.sk-hero { display: grid; justify-items: center; gap: 8px; }
.sk-hero-name { font-size: 18px; font-weight: 700; }
.sk-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sk-person { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.sk-person .dot { width: 24px; height: 24px; }
/* Vue arbre */
.sk-tree .team-block { padding-bottom: 10px; }
.sk-branches { display: grid; gap: 6px; padding: 4px 4px 0; }
.sk-node { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 26px; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 7px; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sk-node:hover { filter: brightness(1.1); }
.sk-node-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-node-people { display: inline-flex; align-items: center; }
.sk-node-people .dot { width: 22px; height: 22px; margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.sk-node-people small { font-size: 10px; color: var(--muted); padding-left: 4px; }
.sk-node-n { font-size: 11px; font-weight: 700; color: var(--muted); text-align: right; }
.sk-children { display: grid; gap: 4px; margin: 4px 0 2px 21px; padding-left: 16px; border-left: 2px solid color-mix(in srgb, var(--text) 14%, transparent); }
.sk-node.child { position: relative; padding: 5px 10px 5px 6px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.sk-node.child::before { content: ""; position: absolute; left: -16px; top: 50%; width: 14px; border-top: 2px solid color-mix(in srgb, var(--text) 14%, transparent); }
.sk-node.child .sk-node-name { font-size: 13px; font-weight: 500; }
@media (max-width: 559px) { .sk-node-people { display: none; } .sk-node { grid-template-columns: auto minmax(0, 1fr) 26px; } }
.tile.person .badges.on-tile { top: 7px; bottom: auto; left: 7px; }
@media (min-width: 560px) { .cal .day { min-height: 66px; } }
.cal-grid { gap: 3px; }

/* ---------- 0.9.3 : compétences sur le profil et sur les tuiles de membres ---------- */
/* Profil : des badges rangés, la principale en tête */
.sk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sk-chips + .sk-chips { margin-top: 8px; }
.sk-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 99px; border: 0; background: color-mix(in srgb, var(--tc) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tc) 55%, transparent); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .12s; }
.sk-chip:hover { transform: translateY(-1px); }
.sk-chip:active { transform: scale(.96); }
.sk-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sk-chip .sk-badge.mini { width: 24px; height: 24px; }
.sk-chip.main { padding: 6px 18px 6px 6px; font-size: 15px; background: color-mix(in srgb, var(--tc) 26%, var(--surface)); box-shadow: inset 0 0 0 2px var(--tc), 0 6px 18px -8px var(--tc); }
.sk-chip.main .sk-badge { width: 36px; height: 36px; }
.sk-chip.main small { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tc); }
.sk-chip.lift, .sk-chip.dnd-ghost { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- 0.9.4 ---------- */
/* Espace entre un bloc et la ligne « + » qui le suit */
.teams + .line.add, .grid + .line.add { margin-top: 12px; }
.solo { display: grid; }
.sk-chips.filter { margin-bottom: 12px; }
.sk-chips.filter .sk-chip { padding-right: 10px; }
.sk-chips.filter .sk-chip > svg { width: 14px; height: 14px; opacity: .6; }
.sk-chips.filter .key.mini { min-height: 32px; padding: 0 14px; font-size: 11px; }

/* Infobulle */
.tip { position: fixed; z-index: 400; pointer-events: none; padding: 5px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; }
.tip.on { opacity: 1; transform: none; }

/* Tuile de membre : un bouton en coin ; il s'anime au survol, il ouvre le cercle au clic */
.fan-btn { position: absolute; top: 7px; left: 7px; z-index: 2; display: inline-flex; border-radius: 99px; cursor: pointer; transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.fan-btn .sk-badge.mini { width: 24px; height: 24px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
.fan-btn:hover { transform: scale(1.18) rotate(-10deg); }
.fan-btn:hover .sk-badge, .fan-btn:hover .fan-many { box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.fan-btn:active { transform: scale(.92); }
.fan-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fan-many { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 7px 0 5px; border-radius: 12px; background: rgba(0, 0, 0, .28); color: inherit; }
.fan-many svg { width: 12px; height: 12px; }
.fan-many small { font-size: 10px; font-weight: 800; }
.fan-many.big { height: 44px; padding: 0 14px 0 11px; border-radius: 22px; gap: 4px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--line); }
.fan-many.big svg { width: 18px; height: 18px; }
.fan-many.big small { font-size: 14px; }

/* Le cercle de compétences, posé sur la page autour du bouton */
.ring-ov { position: fixed; inset: 0; z-index: 55; }
.skring { position: fixed; width: 0; height: 0; }
.ring-disc { position: absolute; left: calc(var(--rr) * -1); top: calc(var(--rr) * -1); width: calc(var(--rr) * 2); height: calc(var(--rr) * 2); border-radius: 50%; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .6); transform: scale(.2); opacity: 0; transition: transform .26s cubic-bezier(.2, 1.2, .4, 1), opacity .18s; }
.skring.on .ring-disc { transform: none; opacity: 1; }
.ring-item { position: absolute; left: 0; top: 0; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%) scale(.3); opacity: 0; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1), opacity .18s; transition-delay: calc(var(--i, 0) * 25ms); }
.ring-item .sk-badge { width: var(--sz); height: var(--sz); box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); transition: box-shadow .12s; }
.ring-item .sk-badge.big { width: 52px; height: 52px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
.skring.on .ring-item { opacity: 1; transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))); }
.skring.on .ring-item:hover { transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(1.15); }
.ring-item:hover .sk-badge { box-shadow: 0 0 0 3px var(--text); }
.ring-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ring-ov.out .ring-disc, .ring-ov.out .ring-item { opacity: 0; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) { .ring-item, .ring-disc, .fan-btn { transition: none; } }

/* Profil : une capsule par famille ; la compétence, puis ses sous-compétences en retrait */
.sk-fam { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 4px; border-radius: 24px; }
.sk-fam.has-subs { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tc) 40%, transparent); background: color-mix(in srgb, var(--tc) 7%, transparent); }
.sk-fam.lead .sk-chip:first-child { padding: 6px 18px 6px 6px; font-size: 15px; }
.sk-subs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-left: 14px; position: relative; }
.sk-subs::before { content: ""; position: absolute; left: 2px; top: 50%; width: 8px; height: 10px; margin-top: -10px; border: solid color-mix(in srgb, var(--tc) 60%, transparent); border-width: 0 0 2px 2px; border-radius: 0 0 0 5px; }
.sk-chip.sub { padding: 3px 11px 3px 3px; font-size: 12px; font-weight: 500; background: color-mix(in srgb, var(--tc) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 40%, transparent); }
.sk-chip.sub .sk-badge.mini { width: 20px; height: 20px; }
.sk-chip.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tc) 35%, transparent); color: var(--muted); }
.sk-chip.ghost .sk-badge { opacity: .5; }
.sk-chip.main { padding: 6px 18px 6px 6px; font-size: 15px; background: color-mix(in srgb, var(--tc) 26%, var(--surface)); box-shadow: inset 0 0 0 2px var(--tc), 0 6px 18px -8px var(--tc); }
.sk-chip.sub.main { padding: 4px 14px 4px 4px; font-size: 13px; font-weight: 700; }
.sk-chip.sub.main .sk-badge { width: 26px; height: 26px; }
.sk-fam.lift, .sk-fam.dnd-ghost { box-shadow: inset 0 0 0 2px var(--accent); }
.sk-fam[data-dnd] { cursor: grab; }

/* Choix de compétences : une liste, les sous-compétences en retrait */
.sk-rows { display: grid; gap: 4px; margin-bottom: 8px; }
.sk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.sk-row.child { margin-left: 26px; font-size: 13px; font-weight: 500; }
.sk-row:hover { border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.sk-row.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, var(--surface)); }
.sk-row.on .switch { background: var(--accent); }
.sk-row.on .switch::after { transform: translateX(16px); background: var(--on-accent); }
.sk-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-row small { font-size: 11px; color: var(--muted); font-weight: 700; }

/* Date effaçable */
.date-wrap { display: flex; gap: 8px; align-items: center; }
.date-wrap .input { flex: 1; min-width: 0; }
.date-wrap .key.square { width: 44px; min-height: 44px; }

/* Déplacer : emplacements en arbre */
.list.tree .rowi { padding-left: calc(16px + var(--depth, 0) * 22px); }
.list.tree .rowi.on, .list.tree .rowi .val.on { color: var(--accent); }

/* Graphe : « Recadrer » en haut, loin de la fiche du bas */
.graph .graph-fit { top: 10px; bottom: auto; }

/* Base de données */
.db-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.db-stat { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: calc(var(--radius) + 2px); border: 1px solid var(--line); background: var(--surface); }
.db-stat svg { width: 18px; height: 18px; color: var(--muted); }
.db-stat b { font-size: 22px; line-height: 1.1; }
.db-stat small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tag-auto { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); margin-right: 8px; }
.duo + .list { margin-top: 10px; }
.sk-chips.filter .key { width: auto; flex: none; }
/* Connexion : « Rester connecté » discret, la touche Connexion reste seule en couleur */
.gate .key.toggle { --c: transparent; --on: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.gate .key.toggle svg { opacity: 0; }
.gate .key.toggle.on { --c: transparent; --on: var(--text); }
.gate .key.toggle.on svg { opacity: 1; color: var(--accent); }

/* ---------- 0.9.5 ---------- */
/* Fenêtres : aucun bloc ne se tasse quand la fenêtre est plus courte que son contenu (profil sur mobile) */
.win-body, .win-inner { grid-auto-rows: max-content; }
/* Clic droit dans le vide : la page occupe tout l'écran */
.shell { min-height: 100dvh; }
/* En-tête fixé en haut, sur chaque onglet */
.bar { position: sticky; top: 0; z-index: 9; margin: calc(-14px - env(safe-area-inset-top)) -16px 18px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
/* Profil : la capsule englobe les sous-compétences, sans trait */
.sk-subs { padding-left: 0; }
.sk-subs::before { content: none; }
/* Cercle de compétences : un fond flouté plutôt qu'une couleur */
.ring-disc { background: color-mix(in srgb, var(--bg) 22%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
/* Calendrier : contour complet ; les prochaines fois d'une tâche répétée en pointillés */
.day .item { border-left: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ic) 70%, transparent); }
.day .item.ghost { background: transparent; box-shadow: none; outline: 1px dashed color-mix(in srgb, var(--ic) 70%, transparent); outline-offset: -1px; opacity: .7; }
.ghost-line { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 8px 14px; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--ic) 60%, var(--line)); background: transparent; color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ghost-line svg { width: 16px; height: 16px; color: var(--ic); }
.ghost-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); opacity: .75; }
.ghost-line small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ghost-line:hover { border-style: solid; }
