/* ==========================================================================
   Plexus — Pistes d'accueil (A Cockpit · B Place du village · C Adaptatif)
   S'appuie sur tokens.css et dashboard.css (chrome existant).
   Composants nouveaux : cartes, lignes d'action, fil, pipeline, pastilles.
   ========================================================================== */

:root {
  --color-success: #2e9e6b;
  --color-success-soft: #e3f4ec;
  --color-late: #d6455d;
  --color-late-soft: #fbe8ec;
  --color-amber: #d98a1c;
  --color-amber-soft: #fdf1df;
  --color-primary-softer: #eaf4fa;
  --color-line: #ececec;
  --radius-card: 6px;
}

/* ---------- Grille des pistes ---------- */
.grid {
  display: grid;
  gap: 24px;
  align-items: start;
}
.grid--a { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid--b { grid-template-columns: 300px minmax(0, 1fr) 320px; }
.grid--c { grid-template-columns: minmax(0, 1fr) 360px; }
.stack { display: grid; gap: 24px; min-width: 0; }

@media (max-width: 1180px) {
  .grid--b { grid-template-columns: 280px minmax(0, 1fr); }
  .grid--b > .stack--aside { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 960px) {
  .grid--a, .grid--b, .grid--c { grid-template-columns: minmax(0, 1fr); }
  .subnav { display: none; }
  .app-header__logo { width: auto; padding-left: 0; margin-right: 12px; }
  .app-header__logo img { height: 40px; }
  .structure-switch, .header-icons .header-icon:not(:nth-child(3)) { display: none; }
  .user-menu { margin-right: 16px; font-size: 0; gap: 0; }
  .user-menu .caret { display: none; }
  .page-title { height: auto; padding: 18px 0 12px; flex-wrap: wrap; gap: 6px; }
  .breadcrumb { display: none; }
}

/* ---------- Carte ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}
.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-heading);
  line-height: 1.25;
}
.card__title .feather { font-size: 17px; color: var(--color-primary); }
.card__body { padding: 0 20px 18px; }
.card__foot {
  padding: 12px 20px;
  border-top: 1px solid var(--color-line);
  font-size: 14px;
}
.card--flush .card__body { padding: 0; }
.card--muted { background: var(--color-widget-bg); box-shadow: none; }
.link-more { font-size: 14px; white-space: nowrap; }

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: var(--font-weight-bold);
}
.count--late { background: var(--color-late); }
.count--soft { background: var(--color-primary-softer); color: var(--color-primary-text); }
.count[data-zero] { background: var(--color-success-soft); color: var(--color-success); }

/* ---------- Petits boutons ---------- */
.b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d7dbdd;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.b:hover { text-decoration: none; border-color: #b9c0c4; }
.b .feather { font-size: 14px; }
.b--primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.b--primary:hover { filter: brightness(0.95); border-color: var(--color-primary); }
.b--ghost { border-color: transparent; background: transparent; color: var(--color-primary-text); padding: 0 8px; }
.b--ghost:hover { background: var(--color-primary-softer); border-color: transparent; }
.b--sm { height: 28px; padding: 0 10px; font-size: 13px; }
.b--block { width: 100%; justify-content: center; }
.b[aria-pressed="true"] { background: var(--color-primary-softer); border-color: var(--color-primary); color: var(--color-primary-text); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  line-height: 18px;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  white-space: nowrap;
}
.tag .feather { font-size: 11px; }
.tag--late { background: var(--color-late-soft); color: var(--color-late); }
.tag--amber { background: var(--color-amber-soft); color: #a8650a; }
.tag--ok { background: var(--color-success-soft); color: var(--color-success); }
.tag--neutral { background: #f0f1f2; color: var(--color-text-nav); }

/* ---------- Avatars ---------- */
.av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8aa3b3;
  color: #fff;
  font-size: 11.5px;
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}
.av--lg { width: 44px; height: 44px; font-size: 16px; }
.av--xl { width: 56px; height: 56px; font-size: 20px; }
.av--c1 { background: #6d682f; }
.av--c2 { background: #2389c0; }
.av--c3 { background: #b0567a; }
.av--c4 { background: #3f8f6e; }
.av--c5 { background: #c07a23; }
.av--c6 { background: #6a5aa8; }
.avs { display: inline-flex; }
.avs .av { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
.avs .av + .av { margin-left: -6px; }

/* ---------- Ligne d'action (concept 1) ---------- */
.acts { margin: 0; padding: 0; list-style: none; }
.act {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--color-line);
  transition: opacity .3s, background .3s;
}
.act:first-child { border-top: 0; }
.act__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f1f2;
  color: var(--color-text);
  font-size: 17px;
}
.act__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.act__title { font-size: 15.5px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); line-height: 1.35; margin-top: 2px; }
.act__sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--color-text); }
.act__cta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.act__done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-success);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
}
.act.is-done { background: #f7fbf9; }
.act.is-leaving { opacity: 0; }
.act--compact { grid-template-columns: 30px minmax(0, 1fr); padding: 12px 16px; gap: 10px; }
.act--compact .act__icon { width: 30px; height: 30px; font-size: 14px; border-radius: 7px; }
.act--compact .act__title { font-size: 14.5px; }
.act--compact .act__cta { grid-column: 2; justify-content: flex-start; margin-top: 8px; }

.act-group {
  padding: 10px 20px 6px;
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: #fafafa;
  border-top: 1px solid var(--color-line);
}

.all-clear {
  display: none;
  padding: 36px 20px;
  text-align: center;
  color: var(--color-text);
}
.all-clear .feather { font-size: 30px; color: var(--color-success); }
.all-clear strong { display: block; margin: 8px 0 2px; font-size: 17px; color: var(--color-text-heading); }
.is-empty > .all-clear { display: block; }

/* ---------- Filtres (chips) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dfe3e5;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-text);
  font-size: 14px;
}
.chip .feather { font-size: 14px; color: var(--color-text-nav); }
.chip .count { height: 19px; min-width: 19px; font-size: 11px; padding: 0 6px; }
.chip[aria-pressed="true"] { background: var(--color-text-heading); border-color: var(--color-text-heading); color: #fff; }
.chip[aria-pressed="true"] .feather { color: #fff; }

/* ---------- Pipeline « votre argent » (concept 3) ---------- */
.pipe { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.pipe__step {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 0 0 16px;
}
.pipe__step::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--color-line);
}
.pipe__step:last-child { padding-bottom: 0; }
.pipe__step:last-child::before { display: none; }
.pipe__dot {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cfd6da;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
}
.pipe__step--done .pipe__dot { background: var(--color-success); border-color: var(--color-success); }
.pipe__step--block .pipe__dot { background: var(--color-late); border-color: var(--color-late); }
.pipe__label { font-size: 14.5px; color: var(--color-text-heading); line-height: 1.3; }
.pipe__hint { display: block; font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }
.pipe__step--block .pipe__hint { color: var(--color-late); }
.pipe__amount { font-size: 15px; font-weight: var(--font-weight-bold); color: var(--color-text-heading); font-variant-numeric: tabular-nums; }
.money-hero { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.money-hero__value { font-size: 30px; font-weight: var(--font-weight-bold); color: var(--color-text-heading); font-variant-numeric: tabular-nums; }
.money-hero__label { font-size: 14px; color: var(--color-text); }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--color-line); margin: 12px 0 16px; }
.bar > span { display: block; height: 100%; }
.bar > span + span { margin-left: 2px; }

/* ---------- Agenda compact ---------- */
.agenda { margin: 0; padding: 0; list-style: none; }
.agenda li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-line); }
.agenda li:first-child { border-top: 0; padding-top: 0; }
.date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-primary-softer);
  color: var(--color-primary-text);
  line-height: 1;
}
.date-box b { font-size: 18px; }
.date-box small { font-size: 11px; text-transform: uppercase; margin-top: 3px; }
.agenda__title { font-size: 14.5px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); line-height: 1.3; }
.agenda__meta { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- Raccourcis projets ---------- */
.shortcuts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--color-text-heading);
  font-size: 14.5px;
}
.shortcut:hover { background: var(--color-primary-softer); text-decoration: none; }
.shortcut__thumb {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #dce7ee 0 6px, #d3e0e8 6px 12px);
  color: #6f8a9b; font-size: 14px;
}
.shortcut__meta { margin-left: auto; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.shortcut .feather.icon-star { color: var(--color-primary); }

/* ---------- Pastilles de notification (niveau « notification ») ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  font-size: 14px;
  border: 0;
}
.pill:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--color-primary); }
.pill .feather { font-size: 15px; color: var(--color-primary); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-late); }
.pill--soon { opacity: .65; }
.pill--soon::after { content: "2027"; font-size: 10.5px; font-weight: 700; color: var(--color-text-muted); border: 1px solid #d7dbdd; border-radius: 4px; padding: 0 4px; }

/* ---------- Fil de la structure (concept 2) ---------- */
.feed { display: grid; gap: 16px; }
.post { padding: 18px 20px; }
.post__head { display: flex; align-items: center; gap: 12px; }
.post__who { font-size: 14.5px; line-height: 1.3; }
.post__who b { color: var(--color-text-heading); font-weight: var(--font-weight-medium); }
.post__when { font-size: 12.5px; color: var(--color-text-muted); }
.post__kind { margin-left: auto; }
.post__title { margin: 14px 0 6px; font-size: 18px; font-weight: var(--font-weight-medium); line-height: 1.3; color: var(--color-text-heading); }
.post__text { margin: 0; font-size: 15px; color: var(--color-text); }
.post__media {
  margin-top: 14px;
  height: 180px;
  border-radius: var(--radius-card);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(135deg, #dce7ee 0 10px, #d3e0e8 10px 20px);
  color: #6f8a9b; font-size: 13px;
}
.post__media--rose { background: repeating-linear-gradient(135deg, #f7dde6 0 10px, #f2d1dd 10px 20px); color: #a8577a; }
.post__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.post__foot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 14px -8px -6px;
  padding-top: 10px;
  border-top: 1px solid var(--color-line);
}
.react {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--color-text-nav); font-size: 13.5px;
}
.react:hover { background: #f3f5f6; }
.react[aria-pressed="true"] { color: var(--color-primary-text); font-weight: var(--font-weight-medium); }
.react[aria-pressed="true"] .feather { color: var(--color-primary); }
.post__seen { margin-left: auto; font-size: 12.5px; color: var(--color-text-muted); display: inline-flex; gap: 5px; align-items: center; }
.post--pinned { box-shadow: 0 0 0 2px var(--color-info), var(--shadow-card); }
.post--event { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 20px; }
.post--event .post__icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary-softer); color: var(--color-primary); font-size: 17px;
}
.post--event .post__text { font-size: 14.5px; }
.post--event .post__text b { font-weight: var(--font-weight-medium); color: var(--color-text-heading); }
.post--event .post__when { margin-top: 2px; }
.post__inline-cta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.composer { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.composer__input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #dfe3e5;
  border-radius: var(--radius-pill);
  background: #f7f8f9;
  color: var(--color-text-muted);
  font-size: 14.5px;
  display: flex; align-items: center;
}

/* ---------- Projets à rejoindre (concept 5) ---------- */
.join { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.join__item { padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-card); }
.join__title { font-size: 15px; font-weight: var(--font-weight-medium); color: var(--color-primary-text); line-height: 1.3; }
.join__why { margin: 4px 0 10px; font-size: 13.5px; color: var(--color-text); }
.join__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.join__row .avs + span { font-size: 12.5px; color: var(--color-text-muted); margin-left: 8px; }

/* ---------- Profil (fiche + raison de compléter) ---------- */
.me { display: flex; align-items: center; gap: 12px; }
.me__name { font-size: 16px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); line-height: 1.25; }
.me__role { font-size: 13px; color: var(--color-text-muted); }
.nudge {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--color-amber-soft);
  font-size: 13.5px;
  color: #6b4a14;
}
.nudge b { display: block; margin-bottom: 2px; color: #5a3c0a; }
.nudge a { font-weight: var(--font-weight-medium); color: #a8650a; }
.nudge__bar { display: flex; gap: 3px; margin: 8px 0; }
.nudge__bar span { flex: 1; height: 5px; border-radius: 3px; background: #f3d9b1; }
.nudge__bar span.on { background: var(--color-amber); }

/* ---------- Liens utiles ---------- */
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.links a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border-radius: var(--radius-md);
  background: #f5f7f8; color: var(--color-text-heading); font-size: 13.5px; line-height: 1.2;
}
.links a:hover { background: var(--color-primary-softer); text-decoration: none; }
.links .feather { color: var(--color-primary); font-size: 15px; flex-shrink: 0; }

/* ---------- Bandeau structure (piste B) ---------- */
.village-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  margin-bottom: 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(120deg, #1f7fb3 0%, #2389c0 55%, #3aa3cf 100%);
  color: #fff;
}
.village-hero__logo {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--color-avatar-structure);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.village-hero h2 { font-size: 23px; font-weight: var(--font-weight-medium); line-height: 1.2; }
.village-hero p { margin: 4px 0 0; color: #d7ecf8; font-size: 14.5px; }
.village-hero__stats { display: flex; gap: 28px; margin-left: auto; }
.village-hero__stats div { text-align: right; }
.village-hero__stats b { display: block; font-size: 24px; line-height: 1.1; }
.village-hero__stats span { font-size: 12.5px; color: #cfe7f5; }
@media (max-width: 960px) {
  .village-hero { flex-wrap: wrap; }
  .village-hero__stats { margin-left: 0; width: 100%; justify-content: space-between; }
  .village-hero__stats div { text-align: left; }
}

/* ---------- Briefing (piste C) ---------- */
.brief {
  padding: 28px 30px;
  margin-bottom: 24px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  border-left: 5px solid var(--color-primary);
}
.brief__date { font-size: 13px; color: var(--color-text-muted); }
.brief__text {
  margin: 8px 0 0;
  font-size: 25px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--color-text-heading);
  max-width: 980px;
}
.brief__text a {
  color: var(--color-primary-text);
  border-bottom: 2px solid var(--color-primary-soft);
  font-weight: var(--font-weight-medium);
}
.brief__text a:hover { text-decoration: none; border-bottom-color: var(--color-primary); }
.brief__text .hl-money { color: var(--color-success); border-bottom-color: #9ed7bd; }
.brief .pills { margin-top: 20px; }
@media (max-width: 960px) { .brief { padding: 20px; } .brief__text { font-size: 20px; } }

.digest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .digest { grid-template-columns: 1fr; } }
.digest__item { padding: 14px; border-radius: var(--radius-card); background: #f6f8f9; }
.digest__num { font-size: 26px; font-weight: 700; color: var(--color-text-heading); line-height: 1; }
.digest__label { font-size: 13.5px; color: var(--color-text); margin: 4px 0 10px; }
.digest__list { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.digest__list li { padding: 4px 0; border-top: 1px solid #e7ebed; color: var(--color-text-heading); line-height: 1.35; }

.more-toggle, .todo-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--color-line);
  background: #fafafa; color: var(--color-primary-text); font-size: 14px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
[data-collapsible]:not(.is-open) [data-overflow] { display: none; }
[data-collapsible].is-open .more-toggle .feather { transform: rotate(180deg); }

/* ---------- Visibilité par profil / fréquence (gérée par pistes.js) ---------- */
.is-role-hidden, .is-freq-hidden, .is-filter-hidden { display: none !important; }

/* ---------- Barre de maquette ---------- */
.proto-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(20, 24, 28, 0.9);
  color: #fff;
  font: 500 12px/1 system-ui, -apple-system, sans-serif;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  z-index: 100;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
}
.proto-bar[hidden] { display: none; }
.proto-bar__hide { flex: none; margin-left: 2px; opacity: .7; }
.proto-show {
  position: fixed; left: 16px; bottom: 18px; z-index: 100;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px;
  background: rgba(20, 24, 28, .85); color: #fff; font: 500 12px/1 system-ui, -apple-system, sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
}
.proto-bar__group { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.proto-bar__group + .proto-bar__group { border-left: 1px solid rgba(255,255,255,.18); padding-left: 8px; }
.proto-bar__label { padding: 0 6px; opacity: .6; white-space: nowrap; }
.proto-bar a, .proto-bar button {
  border: 0; border-radius: 9px; padding: 8px 10px;
  background: transparent; color: #fff; font: inherit; white-space: nowrap; text-decoration: none;
}
.proto-bar a:hover, .proto-bar button:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.proto-bar [aria-pressed="true"], .proto-bar [aria-current="page"] { background: #fff; color: #111; }
.page { padding-bottom: 90px; }
.page-title__role { font-size: 14px; color: var(--color-text-muted); }

/* Nouveautés + FAB : on les garde discrets dans les pistes */
.fab--top { display: none; }

[hidden] { display: none !important; }

/* ==========================================================================
   Piste A — actions fréquentes, actus, gamification
   ========================================================================== */

/* ---------- En-tête : bonjour + résumé cliquable ---------- */
.page-title--tall { height: auto; padding: 22px 0 20px; gap: 16px; flex-wrap: wrap; }
.page-title--tall .page-title__role { display: block; margin-top: 2px; }
.summary {
  display: inline-block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--color-primary-text);
  border-radius: 4px;
}
.summary:hover { text-decoration: underline; }
.summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.summary__part:not(.is-filter-hidden) ~ .summary__part:not(.is-filter-hidden)::before { content: " · "; color: var(--color-text-muted); }
.summary__empty:empty { display: none; }

/* Cible du résumé : focus visible quand on y arrive */
#todo-card:focus { outline: none; }
#todo-card:focus-visible, #todo-card.is-jumped { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Filtres à l'intérieur de la boîte « Ce qui vous attend » */
.chips--in-card { padding: 0 20px 14px; }

.b--outline { border-color: #a9cbe0; color: var(--color-primary-text); }
.b--outline:hover { border-color: var(--color-primary); background: var(--color-primary-softer); }

/* ---------- Actus de la CPTS (version compacte) ----------
   La première actu de la liste est mise en avant (image + texte), les suivantes sont compactes. */
.card__hint { font-size: 13px; font-weight: var(--font-weight-regular); color: var(--color-text-muted); }
.news { margin: 0; padding: 0; list-style: none; }
.news__entry { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-line); }
.news__entry:first-child { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 0 0 16px; border-top: 0; }
.news__media {
  display: none; align-items: center; justify-content: center;
  min-height: 120px; border-radius: var(--radius-card);
  background: repeating-linear-gradient(135deg, #dce7ee 0 8px, #d3e0e8 8px 16px); color: #6f8a9b; font-size: 22px;
}
.news__entry:first-child .news__media { display: flex; }
.news__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: #f0f1f2; color: var(--color-text); font-size: 14px;
}
.news__entry:first-child .news__icon { display: none; }
.news__title { margin: 3px 0 0; font-size: 14.5px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); line-height: 1.3; }
.news__entry:first-child .news__title { margin: 6px 0 4px; font-size: 17px; }
.news__text { display: none; margin: 0; font-size: 14.5px; }
.news__entry:first-child .news__text { display: block; }
.news__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.news__entry:first-child .news__foot { margin-top: 10px; }
.news__admin { display: inline-flex; gap: 2px; margin-left: auto; }
.tag--new { background: var(--color-primary); color: #fff; }
.tag--pin { background: var(--color-primary-softer); color: var(--color-primary-text); }
body:not([data-role="admin"]) .tag--pin.is-scheduled { display: none; }  /* épinglage programmé : coordo seulement */
.news__entry.is-pinned .news__media { box-shadow: inset 0 0 0 2px var(--color-primary); }


/* ==========================================================================
   Cockpit V2 — « Ce qui vous attend » (js/cockpit.js)
   ========================================================================== */
.card__tools { display: flex; align-items: center; gap: 4px; }
.card__title .count { margin-left: 2px; }
.link-btn { border: 0; background: none; padding: 4px 6px; font: inherit; font-size: 14px; color: var(--color-primary-text); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.fold-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: 6px;
  background: none; color: var(--color-text-nav); cursor: pointer;
}
.fold-btn:hover { background: #f3f5f6; }
.fold-btn .feather { font-size: 18px; transition: transform .2s; }
.fold-btn[aria-expanded="false"] .feather { transform: rotate(180deg); }
#todo-card.is-folded .card__head { padding-bottom: 18px; }

/* Filtres : des réglages de la liste, pas des liens */
.chips--in-card .chip { height: 30px; font-size: 13.5px; background: #f3f5f6; border-color: transparent; cursor: pointer; }
.chips--in-card .chip:hover { background: #e9edef; }
.chips--in-card .chip[aria-pressed="true"] { background: var(--color-text-heading); border-color: var(--color-text-heading); }

/* Badge discret « Prioritaire » */
.tag--prio { background: transparent; box-shadow: inset 0 0 0 1px #e8cfa6; color: #a8650a; }

/* Liste : 5 actions, puis « Voir tout (n) » */
#todo-card:not(.is-expanded) .act[data-overflow] { display: none; }
.todo-more[aria-expanded="true"] .feather { transform: rotate(180deg); }

/* Action traitée : retour immédiat, puis sortie animée */
#todo .act.is-done { background: var(--color-success-soft); }
#todo .act.is-done .act__cta > .b { display: none; }
#todo .act.is-done .act__done { animation: act-pop .3s ease-out; }
#todo .act.is-leaving {
  height: 0 !important; padding-top: 0; padding-bottom: 0;
  opacity: 0; overflow: hidden; border-top-color: transparent;
  transition: height .3s ease, padding .3s ease, opacity .2s ease;
}
@keyframes act-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* État vide et fin de liste */
#todo-card .all-clear { display: none; align-items: center; gap: 10px; margin: 0; padding: 4px 20px 20px; text-align: left; font-size: 15px; }
#todo-fold.is-empty > .all-clear { display: flex; }
#todo-fold.is-empty > .chips, #todo-fold.is-empty > .card__body { display: none; }
.all-clear__icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-success-soft); color: var(--color-success);
}
#todo-card .all-clear__icon .feather { font-size: 16px; color: inherit; }
.all-clear__bravo { display: none; margin-right: 2px; color: var(--color-text-heading); }
.all-clear.is-cleared .all-clear__bravo { display: inline; }
.all-clear.is-celebrating .all-clear__icon { animation: all-clear 1.2s ease-out; }
@keyframes all-clear {
  0% { transform: scale(.4); box-shadow: 0 0 0 0 rgba(44, 154, 107, .45); }
  40% { transform: scale(1.15); }
  100% { transform: none; box-shadow: 0 0 0 14px rgba(44, 154, 107, 0); }
}

/* Message temporaire, en haut à droite */
.toasts { position: fixed; top: 84px; right: 24px; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 8px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 8px 6px 8px 16px; border-radius: 8px;
  background: var(--color-text-heading); color: #fff;
  box-shadow: var(--shadow-float); font-size: 14.5px;
  animation: toast-in .25s ease-out;
}
.toast > .feather { font-size: 17px; color: #8fd8b2; }
.toast__text { margin-right: 6px; }
.toast__hint { opacity: .7; }
.toast__btn {
  border: 0; border-radius: 6px; padding: 7px 9px; background: none;
  color: #9fd3f0; font: inherit; font-weight: var(--font-weight-medium); white-space: nowrap; cursor: pointer;
}
.toast__btn:hover { background: rgba(255, 255, 255, .1); }
.toast__close { width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: rgba(255, 255, 255, .7); cursor: pointer; }
.toast__close:hover { background: rgba(255, 255, 255, .1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Fenêtres (archives, épingle) */
.modal { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow-float); color: var(--color-text); }
.modal::backdrop { background: rgba(20, 24, 28, .35); }
.modal__body { padding: 0 20px 8px; }
.modal__lead { margin: 0 0 4px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); }
.modal__hint { margin: 0 0 14px; font-size: 13.5px; color: var(--color-text-muted); }
.modal__error { min-height: 1em; margin: 8px 0 0; font-size: 13.5px; color: var(--color-late); }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--color-line); }
.choice { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.choice__item { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; }
.choice__item input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); }
.choice__dates { display: flex; flex-wrap: wrap; gap: 12px; padding-left: 28px; }
.choice__dates label { display: inline-flex; align-items: center; gap: 8px; }
.choice__dates input { height: 34px; padding: 0 8px; border: 1px solid #dfe3e5; border-radius: 6px; font: inherit; color: var(--color-text-heading); }
.choice__dates input:disabled { opacity: .5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Liste des actions archivées */
.archives__list { max-height: 60vh; overflow: auto; margin: 0; padding: 0 20px 12px; list-style: none; }
.archives__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-line); }
.archives__title { font-weight: var(--font-weight-medium); color: var(--color-text-heading); }

@media (prefers-reduced-motion: reduce) {
  .toast, #todo .act.is-done .act__done { animation: none; }
  #todo .act.is-leaving { transition: none; }
}

/* ==========================================================================
   Cockpit V2 — colonne de droite (widgets)
   ========================================================================== */
.card__hint .feather { font-size: 12px; color: inherit; }
.widget-sub { margin: 4px 0 10px; font-size: 13px; font-weight: var(--font-weight-medium); color: var(--color-text-muted); }
.widget-sub:not(:first-child) { margin-top: 18px; }

/* Agenda : jour + date, statut, visio, réponse dépliable */
.agenda .ag { grid-template-columns: 46px minmax(0, 1fr) auto auto; align-items: center; }
.ag .date-box { height: 56px; }
.ag .date-box small:first-child { margin: 0 0 3px; font-size: 10.5px; }
.ag[data-state="no"] > :not(.ag__answer):not(.ag__toggle) { opacity: .5; }
.ag[data-state="no"] .agenda__title { text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.ag__visio, .ag__toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 32px; border: 0; border-radius: 6px; background: none;
  color: var(--color-primary-text); font: inherit; font-size: 13px; cursor: pointer;
}
.ag__visio { width: 32px; background: var(--color-primary-softer); color: var(--color-primary); }
.ag__visio:hover { filter: brightness(.96); }
.ag__toggle { padding: 0 6px; }
.ag__toggle:hover { background: #f3f5f6; }
.ag__toggle .feather { font-size: 15px; transition: transform .2s; }
.ag__toggle[aria-expanded="true"] .feather { transform: rotate(180deg); }
.ag__answer { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ag.is-new { animation: ag-in .9s ease-out; }
@keyframes ag-in { from { background: var(--color-primary-softer); } to { background: transparent; } }

/* Mon implication */
.me { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
/* Avatar de « Mon activité » : la plante, ou une pièce photo / plante quand il y a une photo */
.coin { --base: 0deg; position: relative; display: inline-block; width: 52px; height: 52px; border-radius: 50%; perspective: 260px; }
.coin:not(.has-photo), .coin.is-flipped { --base: 180deg; }
.coin__inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--base)); transition: transform .55s cubic-bezier(.35, .1, .25, 1.25); }
.coin:not(.has-photo) .coin__inner { transition: none; }
.coin__face { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.coin__face svg { display: block; width: 100%; height: 100%; transform-origin: 50% 92%; }
.coin__face--back { transform: rotateY(180deg); }
.coin.has-photo { cursor: pointer; }
.coin.has-photo:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.coin.is-tilting .coin__inner { animation: coin-tilt .26s ease-out; }
.coin.is-hinting .coin__inner { animation: coin-hint .9s ease-in-out; }
@keyframes coin-tilt { 50% { transform: rotateY(calc(var(--base) - 28deg)); } }
@keyframes coin-hint { 30% { transform: rotateY(calc(var(--base) - 26deg)); } 60% { transform: rotateY(calc(var(--base) + 10deg)); } }
.coin__hint {
  position: absolute; right: -3px; bottom: -3px; display: none; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  color: var(--color-primary); font-size: 11px;
}
.coin.has-photo .coin__hint { display: inline-flex; }
.me__growth { margin-top: 3px; font-size: 13px; color: #3f7d4f; }
@media (prefers-reduced-motion: reduce) { .coin__inner { transition: none; } .coin.is-tilting .coin__inner, .coin.is-hinting .coin__inner { animation: none; } }
.me__name { font-size: 16px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); }
.me__job { font-size: 13.5px; color: var(--color-text-muted); }
.me__status {
  display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: 14px 0 0; padding: 10px 12px;
  border-radius: var(--radius-card); background: var(--color-success-soft); color: #1f6e4b; font-size: 14px;
}
.me__status .feather { color: var(--color-success); }
/* Adhésion à renouveler (profil membre) */
body[data-role="membre"] .me__status.is-todo { background: var(--color-amber-soft); color: #7a4a08; }
body[data-role="membre"] .me__status.is-todo .feather { color: var(--color-amber); }
.me__todo-icon, body[data-role="membre"] .me__status.is-todo .me__ok-icon { display: none; }
body[data-role="membre"] .me__status.is-todo .me__todo-icon { display: inline-block; }

/* Chiffre clé + anneau + légende */
.kpi { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; }
.kpi--small { grid-template-columns: 80px minmax(0, 1fr); }
.ring { width: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.6; }
.ring__track { stroke: #edf0f2; }
.ring__seg { transition: stroke-dasharray .6s ease, stroke-dashoffset .6s ease; }
.ring__seg--ok { stroke: var(--color-success); }
.ring__seg--wait { stroke: var(--color-amber); }
.ring__seg--primary { stroke: var(--color-primary); stroke-linecap: round; }
.kpi__center {
  position: absolute; left: 0; top: 50%; width: 120px; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; line-height: 1.1; pointer-events: none;
}
.kpi--small .kpi__center { width: 80px; }
.kpi__center b { font-size: 28px; color: var(--color-text-heading); font-variant-numeric: tabular-nums; }
.kpi--small .kpi__center b { font-size: 18px; }
.kpi__center span { font-size: 11.5px; color: var(--color-text-muted); }
.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.legend b { color: var(--color-text-heading); font-variant-numeric: tabular-nums; }
.legend--row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--color-text-muted); }
.legend__dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: #dfe4e7; }
.legend__dot--ok { background: var(--color-success); }
.legend__dot--wait { background: var(--color-amber); }
.legend__dot--grey { background: #b9c7d0; }
.legend__dot--soft { background: #b8d8ea; }
.legend__dot--primary { background: var(--color-primary); }
.is-bumped { animation: bump .9s ease-out; }
@keyframes bump { 30% { color: var(--color-success); transform: scale(1.2); } }
.legend b, .kpi__center b { display: inline-block; }

/* Avancement */
.progress-hero { display: flex; align-items: baseline; gap: 8px; }
.progress-hero b { font-size: 30px; color: var(--color-text-heading); }
.progress-hero span { font-size: 13.5px; color: var(--color-text); }
.progress-hero + .bar { margin: 10px 0 10px; }

/* Portée des actus : vues (clair) et lectures complètes (foncé) */
.reach { display: grid; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.reach li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.reach__title { overflow: hidden; font-size: 13.5px; color: var(--color-text-heading); white-space: nowrap; text-overflow: ellipsis; }
.reach__nums { grid-row: 1; grid-column: 2; font-size: 12.5px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.reach__bar { position: relative; grid-column: 1 / -1; height: 6px; border-radius: 99px; background: #f0f2f4; overflow: hidden; }
.reach__bar span { position: absolute; left: 0; top: 0; height: 100%; border-radius: 99px; background: #b8d8ea; }
.reach__bar span + span { background: var(--color-primary); }

/* Mini-courbe */
.spark { display: block; width: 100%; max-width: 180px; height: 36px; }
.spark polyline { fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--color-primary); }
.spark__label { margin-top: 4px; font-size: 12.5px; color: var(--color-text-muted); }

@media (prefers-reduced-motion: reduce) {
  .ag.is-new, .is-bumped { animation: none; }
  .ring__seg { transition: none; }
}

/* ==========================================================================
   Cockpit V2 — élément saisonnier (Octobre Rose) : discret, sous le résumé
   ========================================================================== */
.season {
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
  margin-top: 10px; padding: 4px 4px 4px 12px; border-radius: 10px;
  background: #fdf0f5; color: #8a2c55; font-size: 13.5px;
}
.season[hidden] { display: none; }
.season__ribbon { flex: none; width: 18px; height: 18px; fill: #d6457f; }
.season__text { margin: 0; line-height: 1.4; }
.season__text a { color: #8a2c55; font-weight: var(--font-weight-medium); text-decoration: underline; text-underline-offset: 2px; }
.season__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: #8a2c55; cursor: pointer;
}
.season__close:hover { background: rgba(138, 44, 85, .08); }
.news__entry:focus { outline: none; }
.news__entry.is-jumped { outline: 2px solid var(--color-primary); outline-offset: 4px; border-radius: 6px; }

/* ==========================================================================
   Cockpit V2 — mobile (≤ 600 px) : une colonne, zones de 44 px, boutons en bas des cartes
   ========================================================================== */
.filter-btn, .chip__icon, .chip__check, .archives-btn .feather, .filter-active { display: none; }
#todo-card { position: relative; }

@media (max-width: 600px) {
  /* En-tête : résumé cliquable */
  .page-title--tall { padding: 16px 0 12px; }
  .summary { display: block; min-height: 44px; margin-top: 0; padding: 10px 0; line-height: 1.5; }
  .card__title:has(.card__hint) { flex-wrap: wrap; row-gap: 2px; }
  .card__title .card__hint { flex-basis: 100%; padding-left: 27px; }

  /* Zones cliquables d'au moins 44 px */
  .b, .react, .chip, .todo-more, .toast__btn, .choice__dates input { min-height: 44px; }
  .fold-btn, .ag__visio, .toast__close { width: 44px; height: 44px; }
  .ag__toggle { height: 44px; padding: 0 10px; }
  .link-more, .link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .card__head { padding: 12px 16px 8px; }
  .card__body { padding: 0 16px 16px; }

  /* Ce qui vous attend : boutons en rangée pleine largeur, en bas de chaque action */
  .act { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  .act__icon { width: 32px; height: 32px; font-size: 15px; }
  .act__cta { grid-column: 1 / -1; flex-wrap: nowrap; justify-content: stretch; }
  .act__cta > .b { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 8px; white-space: normal; text-align: center; line-height: 1.2; }
  .act__cta > .act__done { flex: 1; justify-content: center; min-height: 44px; }
  .all-clear { padding: 4px 16px 18px; }

  /* Filtres : un bouton ouvre un menu */
  .filter-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 10px;
    background: none; color: var(--color-text-nav); font: inherit; font-size: 14px; cursor: pointer;
  }
  .filter-btn .feather { font-size: 18px; }
  .filter-btn.is-active, .filter-btn[aria-expanded="true"] { background: var(--color-primary-softer); color: var(--color-primary-text); }
  #todo-card.is-folded .filter-btn { display: none; }
  #todo-card .card__title { flex: 1; min-width: 0; font-size: 18px; }
  #todo-card .card__title > .feather { display: none; }
  .filter-active:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 0 16px 8px; padding: 0 0 0 12px; border-radius: 10px;
    background: var(--color-primary-softer); color: var(--color-primary-text); font-size: 14px;
  }
  #todo-card .card__tools { flex: none; gap: 0; }
  .archives-btn { justify-content: center; width: 44px; padding: 0; color: var(--color-text-nav); }
  .archives-btn .feather { display: inline-block; font-size: 18px; }
  .archives-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .chips--in-card {
    display: none; position: absolute; top: 58px; right: 12px; z-index: 30;
    width: min(280px, calc(100% - 24px)); padding: 6px;
    border-radius: 14px; background: #fff; box-shadow: 0 10px 32px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04);
  }
  .chips--in-card.is-open { display: grid; gap: 2px; }
  .chips--in-card .chip {
    justify-content: flex-start; gap: 12px; width: 100%; padding: 0 12px;
    border: 0; border-radius: 10px; background: none; color: var(--color-text-heading); font-size: 15px;
  }
  .chips--in-card .chip:hover { background: #f3f5f6; }
  .chips--in-card .chip[data-filter="all"] { margin-bottom: 4px; box-shadow: 0 1px 0 var(--color-line); border-radius: 10px 10px 0 0; }
  .chips--in-card .chip[aria-pressed="true"] { background: var(--color-primary-softer); color: var(--color-primary-text); border-color: transparent; }
  .chips--in-card .chip[aria-pressed="true"] .feather { color: var(--color-primary); }
  .chips--in-card .chip__icon { display: inline-block; width: 18px; font-size: 17px; color: var(--color-text-nav); }
  .chips--in-card .chip .count { margin-left: auto; }
  .chips--in-card .chip__check { display: inline-block; visibility: hidden; font-size: 16px; }
  .chips--in-card .chip[aria-pressed="true"] .chip__check { visibility: visible; }

  /* Actus : l'actu mise en avant garde une petite image, à droite */
  .news__entry:first-child { position: relative; grid-template-columns: minmax(0, 1fr); min-height: 88px; }
  .news__entry:first-child .news__media { position: absolute; top: 0; right: 0; width: 88px; min-height: 0; height: 72px; font-size: 18px; }
  .news__entry:first-child .act__meta, .news__entry:first-child .news__title, .news__entry:first-child .news__text { margin-right: 100px; }
  .news__entry:first-child .news__title { font-size: 16px; }
  .news__entry:first-child .news__text { font-size: 14px; }
  .news__foot .b { flex: 1 1 auto; justify-content: center; }
  .news__admin { width: 100%; margin-left: 0; }
  .news__admin .b { flex: 1 1 0; justify-content: center; }

  /* Agenda : réponse en rangée pleine largeur */
  .ag__answer .b { flex: 1 1 0; justify-content: center; }

  /* Message temporaire : en haut, pleine largeur */
  .toasts { top: 12px; left: 12px; right: 12px; }
  .toast { flex-wrap: wrap; max-width: none; }
  .toast__text { flex: 1 1 calc(100% - 80px); }

  /* Fenêtres : pleine largeur, boutons en bas */
  .modal { width: calc(100vw - 16px); max-width: none; max-height: calc(100vh - 16px); }
  .modal__foot { padding: 12px 16px; }
  .modal__foot .b { flex: 1 1 0; justify-content: center; }
  .choice__item { min-height: 44px; }
  .choice__dates { padding-left: 0; }
  .choice__dates label { flex: 1 1 140px; }
  .choice__dates input { flex: 1; min-width: 0; }
  .archives__item { flex-wrap: wrap; }
  .archives__item .b { width: 100%; justify-content: center; }

  /* Élément saisonnier */
  .season { align-items: flex-start; padding: 2px 0 2px 12px; }
  .season__ribbon { margin-top: 12px; }
  .season__text { padding-top: 10px; }
  .season__text a { display: flex; align-items: center; width: fit-content; min-height: 44px; }
  .season__close { width: 44px; height: 44px; }

  /* Barre de maquette */
  .proto-bar { bottom: 12px; }
  .proto-bar__hide, .proto-show { min-width: 44px; min-height: 44px; }
}

/* ==========================================================================
   Cockpit V2 — widgets mis en avant : colonne collante, liens utiles en pied de page
   ========================================================================== */
@media (min-width: 961px) {
  .aside { position: sticky; top: var(--aside-top, 16px); }
}

.useful-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px;
  margin-top: 28px; padding: 14px 0 0; border-top: 1px solid #dfe3e5;
  font-size: 14px;
}
.useful-links__label { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font-weight: var(--font-weight-medium); color: var(--color-text-heading); }
.useful-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text); }
.useful-links a:hover { color: var(--color-primary-text); }
.useful-links .feather { font-size: 15px; color: var(--color-text-nav); }
@media (max-width: 600px) {
  .useful-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .useful-links__label { grid-column: 1 / -1; min-height: 32px; }
  .useful-links a { min-height: 44px; }
}

/* ==========================================================================
   Structure 2 — Bento (js/structure.js, ?structure=bento)
   Gauche : « Bonjour » + « Ce qui vous attend » à plat, fixe, pleine hauteur.
   Droite : tuiles en relief (ombres douces, liseré bleu clair, coins de 12 px).
   ========================================================================== */
@media (min-width: 961px) {
  .bento-page { display: grid; grid-template-columns: var(--bento-left, 40%) minmax(0, 1fr); gap: 0; align-items: start; max-width: none; padding: 0; }
  .bento { grid-column: 2; }

  /* Colonne de gauche : à plat, collée en haut, la liste défile à l'intérieur */
  /* Colonne fixe : position et largeur ajustées par js/structure.js */
  .bento-left {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; width: 40%; min-width: 0;
    padding: 0 24px; background: #fff; border-right: 1px solid #e3e6e8;
  }
  .is-bento .page-title--tall { padding: 22px 0 14px; }
  .bento-left #todo-card { display: flex; flex: 1; flex-direction: column; min-height: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .bento-left #todo-card .card__head { padding: 6px 0 12px; border-top: 1px solid var(--color-line); padding-top: 16px; }
  .bento-left #todo-fold:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  /* Filtres compacts, sur une ou deux lignes selon le profil, filet dessous */
  .bento-left .chips--in-card { flex-wrap: wrap; gap: 6px; padding: 0 0 12px; }
  .bento-left #todo-fold > .chips--in-card { box-shadow: 0 1px 0 #dfe3e5; margin-bottom: 0; }
  .bento-left .chips--in-card .chip { height: 26px; padding: 0 9px; gap: 5px; font-size: 12.5px; }
  .bento-left .chips--in-card .chip .count { height: 16px; min-width: 16px; padding: 0 5px; font-size: 10.5px; }
  /* 5 actions, puis « Voir tout » : une fois déplié, la liste défile dans la colonne */
  /* L'espace sous la liste (place de la barre de maquette) défile avec elle : pas de bande blanche figée */
  .bento-left #todo-card .card__body { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 0 -24px; padding: 0 24px 88px; }
  /* « Voir tout » : lien texte centré, juste après la 5e action */
  .bento-left .todo-more {
    display: flex; width: auto; margin: 4px auto 0; padding: 10px 14px;
    border: 0; border-radius: 8px; background: none; font-weight: var(--font-weight-medium);
  }
  .bento-left .todo-more:hover { background: var(--color-primary-softer); }
  .bento-left .act { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .bento-left .act__icon { width: 32px; height: 32px; font-size: 15px; }
  /* Boutons à la taille de leur contenu, calés à droite */
  .bento-left .act__cta { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-end; }
  .bento-left .all-clear { padding: 4px 0 18px; }

  /* Tuiles */
  .bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 20px; padding: 24px 32px 100px; }
  .bento__tile { grid-column: span 2; min-width: 0; }
  .bento__tile--season { grid-column: 1 / -1; width: auto; max-width: none; margin: 0; }
  .bento__tile--news, .bento__tile--agenda { grid-column: span 3; }
  .bento__tile--eng { grid-column: span 4; }
  body[data-role="membre"] .bento__tile--me, body[data-role="referent"] .bento__tile--me { grid-column: span 4; }
}

/* Style « tuile » des widgets : tuiles Bento et widgets de la colonne de droite (structure Colonnes) */
.is-bento .bento > .card, #aside > .card {
  border: 1px solid #cfe2f0; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 60, 90, .05), 0 6px 20px rgba(20, 60, 90, .07);
  transition: box-shadow .2s ease, transform .2s ease;
}
.is-bento .bento > .card:hover, #aside > .card:hover { box-shadow: 0 2px 4px rgba(20, 60, 90, .06), 0 14px 34px rgba(20, 60, 90, .12); transform: translateY(-2px); }
#aside > .card { border-color: #a9cbe0; } /* Colonnes : liseré un peu plus soutenu (bleu des boutons contour) */
.is-bento .bento__tile--season { border-radius: 12px; }
/* Titres avec indication (« 2 nouvelles depuis… ») : l'indication passe sous le titre */
.bento .card__title:has(.card__hint) { flex-wrap: wrap; row-gap: 2px; }
.bento .card__title .card__hint { flex-basis: 100%; padding-left: 27px; }
.progress-hero { flex-wrap: wrap; }
.progress-hero b { white-space: nowrap; }

/* Tuiles étroites : l'anneau passe au-dessus de sa légende */
.bento__tile { container-type: inline-size; }
@container (max-width: 380px) {
  .kpi { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .kpi .ring { width: 120px; }
  .kpi__center { top: 60px; left: 50%; transform: translate(-50%, -50%); }
  .kpi .legend { justify-self: stretch; }
  .kpi--small { grid-template-columns: 80px minmax(0, 1fr); justify-items: stretch; }
  .kpi--small .ring { width: 80px; }
  .kpi--small .kpi__center { top: 50%; left: 0; transform: translateY(-50%); }
  .card__title:has(.card__hint) { flex-wrap: wrap; row-gap: 2px; }
  .card__head { flex-wrap: wrap; row-gap: 4px; }
}

/* Tuile « Liens utiles » */
.bento .useful-links { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; }
.bento .useful-links a { min-height: 38px; padding: 0 10px; border-radius: 8px; }
.bento .useful-links a:hover { background: var(--color-primary-softer); color: var(--color-primary-text); text-decoration: none; }
@media (max-width: 600px) { .bento .useful-links a { min-height: 44px; } }

/* Mobile et tablette : une colonne, dans l'ordre du lot 6 */
@media (max-width: 960px) {
  .bento-page { display: flex; flex-direction: column; gap: 16px; }
  .bento-left, .bento { display: contents; }
  .bento__tile { order: 6; }
  .is-bento .page-title { order: 1; }
  .bento__tile--season { order: 2; }
  .bento__tile--news { order: 3; }
  .bento-left #todo-card { order: 4; }
  .bento__tile--agenda { order: 5; }
}
@media (prefers-reduced-motion: reduce) { .is-bento .bento > .card:hover, #aside > .card:hover { transform: none; } }
