/**
 * EXPERDOSE — Tableau de bord de l'Admin.
 * Palette du logo : bleu nuit #002C51, bleu #007DEC, bleu vif #009DFF, ciel #BFEFFF, orange #FF9600.
 * Les classes « xd- » ne servent qu'aux widgets du tableau de bord (app/Filament/Widgets).
 */

.xd-dashboard {
  --xd-navy: #002C51;
  --xd-navy-deep: #00172E;
  --xd-navy-abyss: #000E1D;
  --xd-blue: #007DEC;
  --xd-sky: #009DFF;
  --xd-ice: #BFEFFF;
  --xd-orange: #FF9600;
  --xd-orange-soft: #FFC266;
  --xd-ink: #0F2133;
  --xd-muted: #5B6B7D;
  --xd-faint: #8A99AA;
  --xd-line: rgba(0, 44, 81, 0.08);
  --xd-card: #FFFFFF;
  --xd-radius: 22px;
  --xd-shadow: 0 1px 2px rgba(0, 23, 46, 0.04), 0 8px 24px -8px rgba(0, 23, 46, 0.10);
  --xd-shadow-lift: 0 2px 4px rgba(0, 23, 46, 0.05), 0 22px 44px -14px rgba(0, 44, 81, 0.22);
  --xd-ease: cubic-bezier(.2, .8, .2, 1);
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.xd-dashboard .fi-page-content { row-gap: 1.5rem; }
.xd-dashboard .fi-wi-widget { min-width: 0; }

/* Apparition en douceur, décalée carte par carte. */
@keyframes xd-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes xd-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes xd-ping {
  0% { transform: scale(1); opacity: .7; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes xd-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes xd-ring { from { stroke-dasharray: 0 100; } }
@keyframes xd-glow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 4%, 0) scale(1.08); }
}

.xd-hero, .xd-kpi, .xd-card, .xd-pole {
  animation: xd-rise .7s var(--xd-ease) both;
  animation-delay: var(--xd-delay, 0ms);
}

/* ── Éléments communs ─────────────────────────────────────────────────── */

.xd-card {
  position: relative;
  height: 100%;
  background: var(--xd-card);
  border: 1px solid var(--xd-line);
  border-radius: var(--xd-radius);
  box-shadow: var(--xd-shadow);
  padding: 1.5rem 1.6rem 1.6rem;
  color: var(--xd-ink);
}

.xd-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.xd-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--xd-navy);
}

.xd-card__sub {
  margin: .2rem 0 0;
  font-size: .8125rem;
  color: var(--xd-muted);
}

.xd-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--xd-blue);
  background: rgba(0, 125, 236, .08);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.xd-link:hover { background: var(--xd-blue); color: #fff; }
.xd-link__icon { width: 14px; height: 14px; transition: transform .2s var(--xd-ease); }
.xd-link:hover .xd-link__icon { transform: translateX(2px); }

.xd-text-orange { color: var(--xd-orange) !important; }

.xd-delta {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.xd-delta--up { color: #34D399; background: rgba(52, 211, 153, .14); }
.xd-delta--down { color: #FCA5A5; background: rgba(248, 113, 113, .16); }
.xd-delta--soft.xd-delta--up { color: #047857; background: #E7F8F0; }
.xd-delta--soft.xd-delta--down { color: #B42318; background: #FDECEC; }

.xd-empty {
  display: grid;
  place-items: center;
  gap: .6rem;
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--xd-muted);
  font-size: .875rem;
  border: 1px dashed rgba(0, 44, 81, .14);
  border-radius: 16px;
  background: linear-gradient(180deg, #F8FAFD, #fff);
}
.xd-empty p { margin: 0; max-width: 30ch; }
.xd-empty__icon { width: 30px; height: 30px; color: var(--xd-sky); }

/* ── 1. Bandeau d'accueil ─────────────────────────────────────────────── */

.xd-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(0, 125, 236, .35) 0%, transparent 46%),
    linear-gradient(135deg, var(--xd-navy) 0%, var(--xd-navy-deep) 52%, var(--xd-navy-abyss) 100%);
  box-shadow: 0 30px 60px -28px rgba(0, 23, 46, .65), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.xd-hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: xd-glow 14s ease-in-out infinite;
}
.xd-hero__glow--cyan { width: 520px; height: 520px; top: -260px; right: 8%; background: rgba(0, 157, 255, .42); }
.xd-hero__glow--orange { width: 360px; height: 360px; bottom: -220px; left: 18%; background: rgba(255, 150, 0, .30); animation-delay: -6s; }

.xd-hero__dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(191, 239, 255, .16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 75%);
  mask-image: linear-gradient(105deg, transparent 30%, #000 75%);
}

.xd-hero__mark {
  position: absolute;
  z-index: -1;
  width: 560px;
  height: 560px;
  right: -170px;
  top: -150px;
  color: rgba(255, 255, 255, .045);
}
.xd-hero__mark polyline { opacity: .18; }

.xd-hero__body {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1180px) {
  .xd-hero__body { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 2.5rem; }
}

.xd-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin-bottom: 1.1rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(191, 239, 255, .78);
}

.xd-live {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem .35rem .6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .65rem;
  font-weight: 800;
}
.xd-live i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
}
.xd-live i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34D399;
  animation: xd-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}

.xd-hero__title {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fff;
}
.xd-hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--xd-orange) 10%, var(--xd-orange-soft) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.xd-hero__lead {
  margin: .9rem 0 0;
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(226, 240, 255, .82);
}

.xd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.6rem;
}

.xd-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.15rem;
  border-radius: 14px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s var(--xd-ease), box-shadow .2s, background .2s, border-color .2s;
}
.xd-btn__icon { width: 17px; height: 17px; }
.xd-btn:hover { transform: translateY(-2px); }
.xd-btn--orange {
  color: var(--xd-navy-deep);
  background: linear-gradient(180deg, #FFAA2E, var(--xd-orange));
  box-shadow: 0 10px 24px -8px rgba(255, 150, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.xd-btn--orange:hover { box-shadow: 0 16px 30px -10px rgba(255, 150, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .35); }
.xd-btn--glass {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.xd-btn--glass:hover { background: rgba(255, 255, 255, .13); border-color: rgba(191, 239, 255, .35); }

.xd-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.4rem;
}
.xd-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(226, 240, 255, .85);
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
}
.xd-chip__icon { width: 14px; height: 14px; color: var(--xd-ice); }
.xd-chip--ok .xd-chip__icon { color: #34D399; }

/* Pouls de la plateforme */
.xd-pulse {
  position: relative;
  padding: 1.3rem 1.4rem 1rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 20px 40px -24px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.xd-pulse__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: .6rem;
}
.xd-pulse__label {
  margin: 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(191, 239, 255, .7);
}
.xd-pulse__value {
  margin: .25rem 0 0;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.xd-pulse__side { text-align: right; }
.xd-pulse__month {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin: .35rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.xd-pulse__chart { display: block; width: 100%; height: auto; overflow: visible; }
.xd-pulse__rule { stroke: rgba(191, 239, 255, .10); stroke-dasharray: 3 6; }
.xd-pulse__line {
  stroke-dasharray: 1;
  animation: xd-draw 1.8s var(--xd-ease) .25s both;
  filter: drop-shadow(0 6px 10px rgba(0, 157, 255, .45));
}
.xd-pulse__dot { fill: #fff; opacity: 0; transition: opacity .2s; }
.xd-pulse__point { cursor: default; }
.xd-pulse__point:hover .xd-pulse__dot { opacity: 1; }
.xd-pulse__halo {
  fill: rgba(255, 150, 0, .35);
  transform-box: fill-box;
  transform-origin: center;
  animation: xd-ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}

.xd-pulse__months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-top: .45rem;
  font-size: .64rem;
  font-weight: 600;
  text-align: center;
  color: rgba(191, 239, 255, .55);
}
.xd-pulse__months span:last-child { color: var(--xd-orange); font-weight: 800; }

/* ── 2. Chiffres clés ─────────────────────────────────────────────────── */

.xd-kpis {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 560px) { .xd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .xd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1680px) { .xd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.xd-kpi {
  --xd-tone: var(--xd-blue);
  --xd-tone-soft: rgba(0, 125, 236, .10);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.15rem 1.2rem 0;
  border-radius: 20px;
  background: var(--xd-card);
  border: 1px solid var(--xd-line);
  box-shadow: var(--xd-shadow);
  color: var(--xd-ink);
  text-decoration: none;
  transition: transform .35s var(--xd-ease), box-shadow .35s var(--xd-ease), border-color .35s;
}
.xd-kpi--orange { --xd-tone: var(--xd-orange); --xd-tone-soft: rgba(255, 150, 0, .12); }
.xd-kpi--cyan { --xd-tone: var(--xd-blue); --xd-tone-soft: rgba(0, 125, 236, .10); }
.xd-kpi--navy { --xd-tone: var(--xd-navy); --xd-tone-soft: rgba(0, 44, 81, .08); }

a.xd-kpi:hover {
  transform: translateY(-4px);
  box-shadow: var(--xd-shadow-lift);
  border-color: color-mix(in srgb, var(--xd-tone) 35%, transparent);
}

.xd-kpi--waiting::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--xd-tone), color-mix(in srgb, var(--xd-tone) 20%, transparent));
}

.xd-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .95rem;
}

.xd-kpi__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--xd-tone);
  background: var(--xd-tone-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--xd-tone) 14%, transparent);
}
.xd-kpi__icon svg { width: 21px; height: 21px; }

.xd-kpi__flag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: color-mix(in srgb, var(--xd-tone) 80%, #000);
  background: var(--xd-tone-soft);
  white-space: nowrap;
}
.xd-kpi__flag i {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xd-tone);
}
.xd-kpi__flag i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--xd-tone);
  animation: xd-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

.xd-kpi__value {
  margin: 0;
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--xd-navy);
}
.xd-kpi__label {
  margin: .45rem 0 0;
  font-size: .86rem;
  font-weight: 700;
  color: var(--xd-ink);
}
.xd-kpi__hint {
  margin: .2rem 0 0;
  font-size: .74rem;
  line-height: 1.45;
  color: var(--xd-faint);
}

.xd-kpi__spark {
  display: block;
  width: calc(100% + 2.4rem);
  height: 56px;
  margin: .7rem -1.2rem 0;
  color: var(--xd-tone);
}
.xd-kpi__spark path:last-child {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: xd-dash 1.4s var(--xd-ease) forwards;
  animation-delay: calc(var(--xd-delay, 0ms) + 250ms);
}
@keyframes xd-dash { to { stroke-dashoffset: 0; } }

.xd-kpi__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -1.2rem;
  padding: .6rem 1.2rem .7rem;
  border-top: 1px solid var(--xd-line);
  background: linear-gradient(180deg, #FAFCFE, #F5F8FC);
  font-size: .7rem;
  font-weight: 600;
  color: var(--xd-faint);
}
.xd-kpi__go {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--xd-tone);
  font-weight: 700;
  opacity: .75;
  transition: opacity .2s, gap .2s;
}
.xd-kpi__go-icon { width: 13px; height: 13px; }
a.xd-kpi:hover .xd-kpi__go { opacity: 1; gap: .45rem; }

/* ── 3. Activité des demandes ─────────────────────────────────────────── */

.xd-activity__stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.xd-activity__stats div { display: grid; text-align: right; }
.xd-activity__stats strong {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--xd-navy);
}
.xd-activity__stats span { font-size: .7rem; font-weight: 600; color: var(--xd-faint); }

.xd-activity__chart { display: block; width: 100%; height: auto; overflow: visible; }

.xd-axis { stroke: rgba(0, 44, 81, .07); stroke-dasharray: 2 5; }
.xd-axis--base { stroke: rgba(0, 44, 81, .16); stroke-dasharray: none; }
.xd-axis__label { font-size: 10px; font-weight: 600; fill: var(--xd-faint); }

.xd-bar__stack {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: xd-grow .9s var(--xd-ease) both;
  animation-delay: calc(var(--xd-delay, 0ms) + 200ms);
}
.xd-bar__hit { fill: transparent; }
.xd-bar:hover .xd-bar__hit { fill: rgba(0, 125, 236, .05); }
.xd-bar__value {
  font-size: 10.5px;
  font-weight: 800;
  fill: var(--xd-navy);
  opacity: 0;
  transition: opacity .2s;
}
.xd-bar:hover .xd-bar__value, .xd-bar--current .xd-bar__value { opacity: 1; }
.xd-bar__month { font-size: 10.5px; font-weight: 600; fill: var(--xd-faint); }
.xd-bar--current .xd-bar__month { fill: var(--xd-orange); font-weight: 800; }
.xd-bar--current .xd-bar__value { fill: var(--xd-orange); }

.xd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.xd-legend li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .65rem .3rem .5rem;
  border-radius: 999px;
  background: #F4F7FB;
  font-size: .72rem;
  font-weight: 600;
  color: var(--xd-muted);
}
.xd-legend i { width: 9px; height: 9px; border-radius: 3px; }
.xd-legend b { color: var(--xd-navy); font-weight: 800; }

/* ── 4. Répartition et suivi ──────────────────────────────────────────── */

.xd-mix { display: flex; flex-direction: column; container-type: inline-size; }

.xd-mix__body {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 1.2rem;
}
.xd-mix__body .xd-mix__list { width: 100%; }
@container (min-width: 420px) {
  .xd-mix__body { grid-template-columns: 132px minmax(0, 1fr); justify-items: stretch; }
}

.xd-ring { position: relative; width: 132px; height: 132px; }
.xd-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.xd-ring__track { fill: none; stroke: #EEF3F8; stroke-width: 5.2; }
.xd-ring__segment {
  fill: none;
  stroke-width: 5.2;
  stroke-linecap: butt;
  animation: xd-rise .8s var(--xd-ease) both;
  animation-delay: var(--xd-delay, 0ms);
  transition: stroke-width .2s;
}
.xd-ring__segment:hover { stroke-width: 6.6; }
.xd-ring__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.xd-ring__center strong { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--xd-navy); letter-spacing: -0.03em; }
.xd-ring__center span { margin-top: .2rem; font-size: .64rem; font-weight: 600; color: var(--xd-faint); }

.xd-mix__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.xd-mix__list li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  font-size: .76rem;
  color: var(--xd-muted);
}
.xd-mix__list i { width: 9px; height: 9px; border-radius: 3px; }
.xd-mix__list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-mix__list b { font-weight: 800; color: var(--xd-navy); }

.xd-pipeline {
  margin-top: auto;
  padding-top: 1.3rem;
  border-top: 1px solid var(--xd-line);
  display: grid;
  gap: .6rem;
}
.xd-mix__body + .xd-pipeline, .xd-empty + .xd-pipeline { margin-top: 1.4rem; }
.xd-pipeline__title {
  margin: 0 0 .15rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--xd-faint);
}
.xd-pipeline__row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 34px;
  align-items: center;
  gap: .7rem;
  font-size: .76rem;
}
.xd-pipeline__label { font-weight: 600; color: var(--xd-muted); }
.xd-pipeline__track { height: 8px; border-radius: 999px; background: #EEF3F8; overflow: hidden; }
.xd-pipeline__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left;
  animation: xd-bar-in 1s var(--xd-ease) .3s both;
}
@keyframes xd-bar-in { from { transform: scaleX(0); } }
.xd-pipeline__fill--new { background: linear-gradient(90deg, #FFB547, var(--xd-orange)); }
.xd-pipeline__fill--in_progress { background: linear-gradient(90deg, var(--xd-sky), var(--xd-blue)); }
.xd-pipeline__fill--converted { background: linear-gradient(90deg, #34D399, #059669); }
.xd-pipeline__fill--closed { background: linear-gradient(90deg, #CBD5E1, #94A3B8); }
.xd-pipeline__value { text-align: right; font-weight: 800; color: var(--xd-navy); }

/* ── 5. Flux des demandes ─────────────────────────────────────────────── */

.xd-feed__row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.6fr) minmax(0, 1fr) auto auto 16px;
  align-items: center;
  gap: .9rem;
  margin: 0 -.75rem;
  padding: .7rem .75rem;
  border-radius: 14px;
  color: var(--xd-ink);
  text-decoration: none;
  animation: xd-rise .6s var(--xd-ease) both;
  animation-delay: calc(var(--xd-delay, 0ms) + 150ms);
  transition: background .2s;
}
.xd-feed__row + .xd-feed__row { box-shadow: 0 -1px 0 var(--xd-line); }
a.xd-feed__row:hover { background: #F5F8FC; box-shadow: none; }
a.xd-feed__row:hover + .xd-feed__row { box-shadow: none; }

.xd-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--xd-tone) 85%, #fff), color-mix(in srgb, var(--xd-tone) 85%, #001124));
  box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--xd-tone) 80%, transparent);
}

.xd-feed__who { display: grid; min-width: 0; }
.xd-feed__who strong, .xd-feed__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-feed__who strong { font-size: .875rem; font-weight: 700; color: var(--xd-navy); }
.xd-feed__who small { margin-top: .1rem; font-size: .74rem; color: var(--xd-faint); }

.xd-feed__type {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  font-size: .76rem;
  font-weight: 600;
  color: var(--xd-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xd-feed__type i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--xd-tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--xd-tone) 18%, transparent); }

.xd-feed__when { font-size: .74rem; color: var(--xd-faint); white-space: nowrap; }
.xd-feed__chevron { width: 16px; height: 16px; color: #C3CEDA; transition: transform .2s, color .2s; }
a.xd-feed__row:hover .xd-feed__chevron { color: var(--xd-blue); transform: translateX(2px); }

.xd-status {
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}
.xd-status--new { color: #9A5700; background: #FFF3E0; }
.xd-status--in_progress { color: #005BB0; background: #E6F2FD; }
.xd-status--converted { color: #047857; background: #E7F8F0; }
.xd-status--closed { color: #5B6B7D; background: #EEF2F6; }

@media (max-width: 760px) {
  .xd-feed__row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .xd-feed__type, .xd-feed__when, .xd-feed__chevron { display: none; }
}

/* ── 6. Agenda ────────────────────────────────────────────────────────── */

.xd-agenda__row {
  --xd-tone: var(--xd-orange);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .7rem 0;
  color: var(--xd-ink);
  text-decoration: none;
}
.xd-agenda__row--training { --xd-tone: var(--xd-blue); }
.xd-agenda__row + .xd-agenda__row { border-top: 1px solid var(--xd-line); }

.xd-agenda__date {
  display: grid;
  place-items: center;
  height: 54px;
  border-radius: 15px;
  line-height: 1;
  color: var(--xd-navy);
  background: linear-gradient(180deg, #fff, #F3F7FB);
  border: 1px solid var(--xd-line);
  box-shadow: inset 0 3px 0 var(--xd-tone);
  transition: transform .25s var(--xd-ease);
}
.xd-agenda__date b { font-size: 1.25rem; font-weight: 800; padding-top: .3rem; }
.xd-agenda__date small { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--xd-tone); margin-top: -.6rem; }
a.xd-agenda__row:hover .xd-agenda__date { transform: scale(1.06); }

.xd-agenda__what { display: grid; min-width: 0; }
.xd-agenda__kind { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--xd-tone); }
.xd-agenda__what strong { margin-top: .15rem; font-size: .84rem; font-weight: 700; color: var(--xd-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.xd-agenda__row:hover .xd-agenda__what strong { color: var(--xd-blue); }
.xd-agenda__what small { font-size: .72rem; color: var(--xd-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xd-agenda__count { display: grid; text-align: right; line-height: 1.15; }
.xd-agenda__count b { font-size: 1.05rem; font-weight: 800; color: var(--xd-navy); }
.xd-agenda__count small { font-size: .64rem; color: var(--xd-faint); }

/* ── 7. Pôles ─────────────────────────────────────────────────────────── */

.xd-poles__head { margin: .5rem 0 1rem; }

.xd-poles__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 720px) { .xd-poles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .xd-poles__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.xd-pole {
  --xd-tone: var(--xd-blue);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem;
  border-radius: var(--xd-radius);
  background: var(--xd-card);
  border: 1px solid var(--xd-line);
  box-shadow: var(--xd-shadow);
  transition: transform .35s var(--xd-ease), box-shadow .35s var(--xd-ease);
}
.xd-pole::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -120px;
  right: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--xd-tone) 22%, transparent), transparent 70%);
  pointer-events: none;
  transition: transform .5s var(--xd-ease);
}
.xd-pole:hover { transform: translateY(-4px); box-shadow: var(--xd-shadow-lift); }
.xd-pole:hover::after { transform: scale(1.25); }
.xd-pole--orange { --xd-tone: var(--xd-orange); }
.xd-pole--cyan { --xd-tone: var(--xd-blue); }
.xd-pole--navy { --xd-tone: var(--xd-navy); }
.xd-pole--sky { --xd-tone: var(--xd-sky); }

.xd-pole__head { display: flex; align-items: center; gap: .85rem; position: relative; z-index: 1; }
.xd-pole__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--xd-tone) 80%, #fff), var(--xd-tone));
  box-shadow: 0 10px 20px -10px var(--xd-tone);
}
.xd-pole__icon svg { width: 22px; height: 22px; }
.xd-pole__name { margin: 0; font-size: .98rem; font-weight: 800; letter-spacing: -0.01em; color: var(--xd-navy); }
.xd-pole__tagline { margin: .15rem 0 0; font-size: .74rem; color: var(--xd-faint); }

.xd-pole__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
}
.xd-pole__metric {
  padding: .7rem .6rem;
  border-radius: 14px;
  background: #F6F9FC;
  text-align: center;
}
.xd-pole__metric dt { font-size: .6rem; font-weight: 700; letter-spacing: .05em; line-height: 1.35; text-transform: uppercase; color: var(--xd-faint); hyphens: auto; }
.xd-pole__metric dd { margin: 0 0 .2rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--xd-navy); }
.xd-pole__metric { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.xd-pole__metric--wide dd { font-size: .92rem; line-height: 1.45rem; white-space: nowrap; }

.xd-pole__links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.xd-pole__links a {
  padding: .35rem .7rem;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--xd-navy);
  background: #fff;
  border: 1px solid rgba(0, 44, 81, .12);
  text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
}
.xd-pole__links a:hover {
  color: #fff;
  background: var(--xd-tone);
  border-color: var(--xd-tone);
}
.xd-pole--sky .xd-pole__links a:hover, .xd-pole--orange .xd-pole__links a:hover { color: var(--xd-navy-deep); }

/* ── Accessibilité : mouvements réduits ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .xd-dashboard *, .xd-dashboard *::before, .xd-dashboard *::after {
    animation: none !important;
    transition: none !important;
  }
  .xd-kpi__spark path:last-child { stroke-dashoffset: 0; }
}

/* ── Téléphone ────────────────────────────────────────────────────────── */
@media (max-width: 559px) {
  .xd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .xd-kpi { padding: .95rem .9rem 0; border-radius: 18px; }
  .xd-kpi__icon { width: 36px; height: 36px; border-radius: 11px; }
  .xd-kpi__icon svg { width: 18px; height: 18px; }
  .xd-kpi__flag { font-size: 0; gap: 0; padding: .35rem; }
  .xd-kpi .xd-delta { font-size: .64rem; }
  .xd-kpi__value { font-size: 1.85rem; }
  .xd-kpi__label { font-size: .78rem; }
  .xd-kpi__hint { display: none; }
  .xd-kpi__spark { width: calc(100% + 1.8rem); margin: .5rem -.9rem 0; height: 44px; }
  .xd-kpi__foot { margin: 0 -.9rem; padding: .55rem .9rem .6rem; }
  .xd-kpi__foot > span:first-child { display: none; }
  .xd-pulse__months span:nth-child(even) { visibility: hidden; }
  .xd-hero__title { font-size: 1.9rem; }
  .xd-card { padding: 1.2rem 1.1rem 1.3rem; }
  .xd-card__head { flex-wrap: wrap; }
}
@media (max-width: 559px) {
  .xd-pole__metric { padding: .6rem .35rem; }
  .xd-pole__metric dt { font-size: .54rem; letter-spacing: .02em; }
  .xd-pole__metric--wide dd { font-size: .78rem; white-space: normal; line-height: 1.15rem; }
}
