/* ============================================================
   WD — Dashboard membre (chantier WOW)
   Classes préfixées wd- (wow-dashboard). Fichier autonome :
   n'écrase ni style.css ni premium.css, seulement de l'additif.
   Toutes les animations sont neutralisées par le bloc
   prefers-reduced-motion global de style.css.
   ============================================================ */

/* ---------- Bandeau de bienvenue : résumé du jour ---------- */
.wd-welcome {
  display: flex; flex-direction: column; gap: 1.15rem;
}
@media (min-width: 720px) {
  .wd-welcome {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 2rem;
  }
}
.wd-greet h1 { margin-bottom: .35rem; }
.wd-today {
  display: flex; gap: 1.1rem 1.25rem; flex-wrap: wrap; flex-shrink: 0;
}
.wd-today-item {
  display: flex; flex-direction: column; gap: .2rem; min-width: 0;
}
@media (min-width: 720px) {
  .wd-today-item + .wd-today-item {
    border-left: 1px solid var(--border-soft); padding-left: 1.25rem;
  }
}
.wd-today-lbl {
  text-transform: uppercase; font-size: .68rem; letter-spacing: .12em;
  color: var(--muted-dim); font-weight: 700;
}
.wd-today-val {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  color: var(--text); display: inline-flex; align-items: center;
  font-variant-numeric: tabular-nums;
}
.wd-today-val .regime-dot { margin-right: .4rem; flex-shrink: 0; }
.wd-today-val--recap {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: inline-block;
}

/* ---------- Jauge : régime de marché ---------- */
.wd-gauge {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: .5rem 0 1rem;
}
.wd-gauge-track {
  display: flex; flex: 1 1 260px; min-width: 220px; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px;
}
.wd-gauge-half {
  flex: 1; text-align: center; padding: .5rem .75rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  color: var(--muted-dim); transition: background .25s ease, color .25s ease, box-shadow .25s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
}
.wd-gauge-half.wd-on.wd-bull {
  background: linear-gradient(120deg, #00D084, #00A86B);
  color: #04120B; box-shadow: 0 4px 18px rgba(0, 208, 132, .35);
}
.wd-gauge-half.wd-on.wd-bear {
  background: linear-gradient(120deg, #F6465D, #D92B44);
  color: #fff; box-shadow: 0 4px 18px rgba(246, 70, 93, .35);
}
.wd-etat {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  font-size: .85rem; font-weight: 700; padding: .45rem .95rem;
  border-radius: 999px; border: 1px solid var(--border);
}
.wd-etat .regime-dot { margin: 0; }
.wd-etat-vert {
  color: var(--green); border-color: rgba(0, 208, 132, .45);
  background: var(--green-dim);
}
.wd-etat-orange {
  color: var(--amber); border-color: rgba(232, 180, 74, .45);
  background: var(--amber-dim);
}
.wd-etat-rouge {
  color: var(--red); border-color: rgba(246, 70, 93, .45);
  background: var(--red-dim);
}

/* ---------- Cartes de navigation : micro-interactions ---------- */
a.wd-nav:hover { text-decoration: none; }
a.wd-nav .card {
  position: relative;
  transition: transform .25s cubic-bezier(.22, .8, .3, 1),
              box-shadow .25s ease, border-color .25s ease;
}
a.wd-nav:hover .card, a.wd-nav:focus-visible .card {
  transform: translateY(-5px);
  border-color: rgba(0, 208, 132, .45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 0 28px rgba(0, 208, 132, .10);
}
.wd-nav .icon-chip {
  transition: transform .25s cubic-bezier(.22, .8, .3, 1), box-shadow .25s ease;
}
a.wd-nav:hover .icon-chip {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 208, 132, .25);
}
a.wd-nav:hover .icon-chip.blue {
  box-shadow: 0 0 20px rgba(41, 98, 255, .30);
}
.wd-nav .dash-card .go { transition: color .2s ease; }
a.wd-nav:hover .dash-card .go { color: #00E68F; }
a.wd-nav:hover .dash-card .go::after { transform: translateX(6px); }

/* ---------- Discipline : graphique ---------- */
.wd-chart .wd-grid { stroke: rgba(255, 255, 255, .055); stroke-width: 1; }
.wd-chart .wd-grid-base { stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.wd-bar {
  fill: url(#wd-bar-grad);
  transform-box: fill-box; transform-origin: 50% 100%;
  transition: transform .7s cubic-bezier(.22, .8, .3, 1);
}
.wd-bar.wd-warn { fill: url(#wd-bar-grad-warn); }
.wd-bar.empty { fill: var(--surface-3); }
/* Barres masquées seulement quand le JS est actif (no-JS = barres visibles) */
.wd-chart-init .wd-bar { transform: scaleY(0); }
.wd-chart-live .wd-bar { transform: scaleY(1); }
.wd-legend {
  display: flex; gap: 1.1rem; flex-wrap: wrap;
  margin-top: .55rem; font-size: .8rem; color: var(--muted);
}
.wd-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.wd-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.wd-dot.ok { background: var(--green); box-shadow: 0 0 8px rgba(0, 208, 132, .7); }
.wd-dot.warn { background: var(--amber); box-shadow: 0 0 8px rgba(232, 180, 74, .7); }
.wd-dot.empty { background: var(--surface-3); }

/* ---------- Discipline : alerte tilt (visible, pas alarmiste) ---------- */
.wd-tilt { display: flex; gap: .95rem; align-items: flex-start; }
.wd-tilt-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(232, 180, 74, .14); border: 1px solid rgba(232, 180, 74, .4);
  animation: wd-tilt-glow 3.2s ease-in-out infinite;
}
.wd-tilt-icon svg {
  width: 20px; height: 20px; stroke: var(--amber);
  fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes wd-tilt-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(232, 180, 74, 0); }
  50% { box-shadow: 0 0 18px rgba(232, 180, 74, .35); }
}
