/* Cartes d'action de Soxna Yoon — communes au mode live (index.html) et au push-to-talk (ptt.html).
   Rendues par cards.js à partir des commandes { type: "action", action, payload }. */

.ycard {
  --accent: var(--peach, #A3B3FF);
  align-self: stretch;
  padding: 12px 14px;
  border-radius: 14px;
  border-left: 4px solid var(--accent);
  background: rgba(163,179,255,0.10);
  color: var(--ink, #e8e0d4);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  animation: ycard-in 0.35s ease-out both;
}
.ycard.warning { --accent: #E6B450; background: rgba(230,180,80,0.12); }
.ycard.danger  { --accent: #FF6B6B; background: rgba(255,107,107,0.14); }

.ycard-kind {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.ycard-title { display: block; font-weight: 600; }
.ycard-detail { display: block; margin-top: 2px; color: rgba(232,224,212,0.72); }

.ycard-call {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #14102A;
  font-weight: 700;
  text-decoration: none;
}

/* Indicateur de recherche, retiré dès que les articles arrivent */
.ycard.searching { display: flex; align-items: center; gap: 10px; color: rgba(232,224,212,0.75); }
.ycard.searching::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(163,179,255,0.25);
  border-top-color: var(--accent);
  animation: ycard-spin 0.8s linear infinite;
}

/* Fiches d'articles */
.yarticle {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232,224,212,0.14);
  background: rgba(15,11,10,0.35);
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.yarticle-ref { font-weight: 600; color: var(--accent); }
.yarticle-title { display: block; font-size: 12px; color: rgba(232,224,212,0.65); }
.yarticle-text {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(232,224,212,0.85);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.yarticle.open .yarticle-text { display: block; }
.ycard .yarticle-more {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
/* L'article que Soxna Yoon est en train de citer */
.yarticle.cited {
  border-color: var(--accent);
  background: rgba(163,179,255,0.14);
  box-shadow: 0 0 22px 2px rgba(163,179,255,0.30);
}
.yarticle-badge {
  float: right;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #14102A;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Étapes d'une démarche et pièces à fournir : les lignes arrivent l'une après l'autre */
.ysteps, .ychecks { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: etape; }
.ysteps li, .ychecks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  animation: ycard-in 0.4s ease-out both;
  animation-delay: calc(var(--i, 0) * 0.45s);
}
.ysteps li::before {
  counter-increment: etape;
  content: counter(etape);
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #14102A;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.ychecks label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ychecks input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #A3B3FF; }
.ychecks input:checked + span { text-decoration: line-through; color: rgba(232,224,212,0.5); }
.ycard-count { display: block; margin-top: 6px; font-size: 12px; color: rgba(232,224,212,0.6); }

/* Contacts : lieux de justice et professionnels */
.ycontact {
  position: relative;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232,224,212,0.14);
  background: rgba(15,11,10,0.35);
}
.ycontact-kind { display: block; font-size: 11px; color: var(--accent); }
.ycontact-name { display: block; font-weight: 600; }
.ycontact-line { display: block; font-size: 13px; color: rgba(232,224,212,0.72); }
.ycontact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ycontact-phone, .ycontact-map {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}
.ycontact-phone { background: var(--accent); color: #14102A; font-weight: 700; }
.ycontact-demo {
  float: right;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(232,224,212,0.45);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232,224,212,0.7);
}
.yemail-address { display: block; margin-top: 4px; font-family: ui-monospace, monospace; font-size: 15px; }

@keyframes ycard-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ycard-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .ycard, .ysteps li, .ychecks li { animation: none; }
  .ycard.searching::before { animation-duration: 2s; }
}
