/* ---------- Piliers v2 : tuiles + panneau de détail ---------- */
@layer components {
  .cards[hidden] { display: none !important; }
  .bento { display: flex; flex-wrap: wrap; gap: 12px; }
  .bento .tile { flex: 1 1 280px; }
  .tile {
    position: relative; display: flex; flex-direction: column; gap: 14px; text-align: left;
    min-height: 220px; padding: 22px; border-radius: 4px; cursor: pointer;
    font: inherit; color: var(--ink); background: var(--surface);
    border: 1.5px solid var(--line); border-top: 4px solid var(--pilier, var(--udem-bleu));
    user-select: none; -webkit-user-select: none; touch-action: manipulation;
    transition: transform 160ms var(--ease-out), border-color 200ms ease, box-shadow 250ms ease;
  }
  .tile:active { transform: scale(0.97); }
  .tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
  .panel.active .tile { animation: cardIn 500ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
  .tile .icon {
    width: 44px; height: 44px; display: grid; place-items: center; flex: none;
    background: var(--pilier, var(--udem-bleu)); color: var(--pilier-ink, #fff); border-radius: 0 14px 0 14px;
  }
  .tile .icon svg { width: 22px; height: 22px; stroke-width: 2.4; }
  .tile-title { font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
  .tile-kpi { display: flex; flex-direction: column; gap: 2px; }
  .tile-kpi b { font: 700 clamp(28px, 3vw, 38px)/1.05 var(--sans); text-wrap: balance; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
  .tile-kpi span { font-size: 13px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tile-desc { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tile-meta { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
  .tile-go {
    flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); color: var(--accent);
    transition: transform 250ms var(--ease-out), background-color 200ms ease, color 200ms ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .tile:hover { transform: translateY(-3px); border-color: var(--udem-bleu); box-shadow: 0 12px 28px -18px rgba(11, 17, 58, .45); }
    .tile:hover .tile-go { background: var(--udem-bleu); color: #fff; transform: translateX(2px); }
    .tile:active { transform: scale(0.97); }
  }
  @media (max-width: 600px) {
    .bento { gap: 10px; }
    .tile { min-height: 0; padding: 18px; gap: 10px; }
    .tile .icon { width: 38px; height: 38px; }
    .tile .icon svg { width: 19px; height: 19px; }
    .tile-kpi b { font-size: 30px; }
  }

  /* Écrans tactiles : flèche un peu plus grande (la tuile entière reste cliquable) */
  @media (pointer: coarse) { .tile-go { width: 38px; height: 38px; } }
}
