/* v/01 — Arthur au centre de chaque carte */

/* En-tête de section + légende de lecture */
.mh { align-items: flex-end; margin-bottom: 24px; }
.mh > div { flex: 1; min-width: 0; }
.mh__legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; font-size: 12.5px; color: var(--ag-muted);
}
.mh__legend svg { width: 14px; height: 14px; fill: none; stroke: #b5b5b5; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mh__chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px; background: #fff; border: 1px solid var(--ag-line);
  color: var(--ag-ink-2); font-weight: 500;
}
.mh__chip--arthur { padding-left: 3px; background: var(--ag-green-soft); border-color: transparent; color: var(--ag-green-ink); }
.mh .ag-search { width: 260px; flex: none; }

/* Grille 3 colonnes */
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.m {
  display: flex; flex-direction: column;
  padding: 10px 10px 16px;
  border: 1px solid var(--ag-line); border-radius: 24px;
  background: #fff;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.m:hover { box-shadow: var(--ag-shadow-lg); transform: translateY(-2px); border-color: #e2e2e2; }

/* Flux : déclencheur → Arthur → destination */
.m__flow {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr 56px 1fr 44px; align-items: center;
  height: 132px; padding: 0 18px 30px;
  border-radius: 18px;
  background:
    radial-gradient(70% 90% at 50% 40%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%),
    linear-gradient(110deg, var(--t1), var(--t2));
  overflow: hidden;
}
.m__node {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 4px 10px -4px rgba(0,0,0,.12);
}
.m__arthur { position: relative; width: 48px; height: 48px; justify-self: center; z-index: 1; }
.m__arthur .ag-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--ag-green), 0 8px 18px -6px rgba(15,122,72,.45); }
.m__arthur .ag-online { right: -3px; bottom: -3px; width: 12px; height: 12px; }

.m__wire {
  height: 2px; margin: 0 6px;
  background-image: linear-gradient(90deg, #b9c2bd 50%, transparent 0);
  background-size: 8px 2px;
  animation: m-flow 1.1s linear infinite;
  opacity: .9;
}
.m__wire--out { background-image: linear-gradient(90deg, var(--ag-green) 50%, transparent 0); opacity: .7; }
@keyframes m-flow { to { background-position: 8px 0; } }

.m__bubble {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 6px 14px -6px rgba(0,0,0,.16);
  font-size: 12px; font-weight: 500; color: var(--ag-ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m__bubble::before {
  content: ""; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px;
  background: #fff; transform: translateX(-50%) rotate(45deg);
  box-shadow: -1px -1px 0 0 rgba(0,0,0,.05);
}
.m__bubble b { color: var(--ag-green-ink); font-weight: 600; }

/* Texte */
.m__body { padding: 16px 8px 0; flex: 1; }
.m__body h3 { font-size: 15.5px; font-weight: 600; line-height: 21px; letter-spacing: -.01em; }
.m__body p { margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--ag-muted); }

.m__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 8px 0; }
.m__cta { height: 34px; padding: 0 12px 0 7px; font-size: 13px; }
.m__cta .ag-avatar { box-shadow: 0 0 0 1.5px rgba(255,255,255,.25); }
.m:hover .m__cta { background: var(--ag-green); }
.m__time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ag-faint); white-space: nowrap; }
.m__time svg { width: 13px; height: 13px; }

.mmore { display: flex; justify-content: center; margin-top: 28px; }
.mmore .ag-btn { height: 34px; }

/* 1280 : la légende passe sous le titre, la recherche reste à droite */
@media (max-width: 1340px) {
  .m__flow { padding: 0 12px 30px; grid-template-columns: 40px 1fr 52px 1fr 40px; }
  .m__node { width: 40px; height: 40px; }
}
