/* ============================================================
   AiChronosCorp — micro-interactions (Noir & Or)
   CSS pur, zéro JS, ~1KB. Respecte prefers-reduced-motion.
   ============================================================ */

html { scroll-behavior: smooth; }

/* --- Boutons or : reflet animé au survol --- */
.btn-gold {
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  will-change: transform;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(212,175,55,.45);
}
.btn-gold::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.btn-gold:hover::before { left: 130%; }

/* --- Cartes : lift + bord or au survol --- */
.card {
  transition: transform .3s cubic-bezier(.4,0,.2,1), border-color .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,175,55,.4);
  box-shadow: 0 14px 40px -18px rgba(0,0,0,.8);
}

/* --- FAQ <details> : marqueur + / − animé --- */
details > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: "+";
  color: #D4AF37;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform .3s ease;
  flex-shrink: 0;
}
details[open] > summary::after { transform: rotate(45deg); }
details > summary { transition: color .2s ease; }
details > summary:hover { color: #D4AF37; }

/* --- Liens de navigation : soulignement or animé --- */
nav a[href]:not(.btn-gold) { position: relative; }
nav a[href]:not(.btn-gold)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: #D4AF37;
  transition: width .3s ease;
}
nav a[href]:not(.btn-gold):hover::after { width: 100%; }

/* --- Accessibilité : focus visible doré --- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(212,175,55,.7);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   Démonstrateur workflow n8n (structure front-end)
   ============================================================ */
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.flow-node {
  flex: 1 1 180px;
  min-width: 160px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.flow-node:hover {
  border-color: rgba(212,175,55,.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px -20px rgba(212,175,55,.4);
}
.flow-node .flow-ico {
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
  border-radius: 9999px;
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.25);
  color: #D4AF37;
  font-size: 1.1rem;
}
.flow-arrow {
  align-self: center;
  flex: 0 0 44px;
  height: 2px;
  margin: 0 .25rem;
  background: linear-gradient(90deg, rgba(212,175,55,.15), rgba(212,175,55,.6), rgba(212,175,55,.15));
  background-size: 200% 100%;
  animation: flow-run 2.2s linear infinite;
  position: relative;
}
.flow-arrow::after {
  content: "›";
  position: absolute; right: -6px; top: -13px;
  color: #D4AF37; font-size: 1.4rem; line-height: 1;
}
@keyframes flow-run { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.flow-live {
  display: inline-flex; align-items: center; gap: .5rem;
}
.flow-live .dot {
  width: .55rem; height: .55rem; border-radius: 9999px; background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,.6);
  animation: flow-ping 1.6s ease-out infinite;
}
@keyframes flow-ping {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70% { box-shadow: 0 0 0 .6rem rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
@media (max-width: 640px) { .flow-arrow { display: none; } }

/* --- Respect des préférences de mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
