/* ============================================================================
   Komni Project Tracker — styles complémentaires à Tailwind (CDN)
   Ce que la config Tailwind inline ne peut pas exprimer facilement :
   glassmorphism, transitions fines, focus-visible, impression, etc.
   ============================================================================ */

::selection { background: rgba(123, 92, 255, .35); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #5b8cff;
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: #5b8cff; color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Cartes glassy ─────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.card:hover { border-color: rgba(123, 140, 255, 0.35); }

/* ── Texte dégradé ─────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(120deg, #5b8cff 0%, #7b5cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Barre de progression ─────────────────────────────────────── */
.progress-fill {
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}

/* ── Champs de formulaire ─────────────────────────────────────── */
.field {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #eef0f8;
  padding: 10px 14px;
  font-size: .92rem;
  transition: border-color .2s ease, background .2s ease;
}
.field::placeholder { color: #6f7390; }
.field:focus {
  outline: none;
  border-color: rgba(123, 140, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Boutons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: .9rem;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn-primary {
  background: linear-gradient(120deg, #5b8cff 0%, #7b5cff 100%);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(123, 92, 255, .7);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #eef0f8;
  border-color: rgba(255, 255, 255, 0.09);
}
.btn-ghost:hover { border-color: rgba(123, 140, 255, 0.5); background: rgba(255, 255, 255, 0.06); }
.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.4); }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Messages flash (auto-dismiss via main.js) ───────────────────── */
.flash { transition: opacity .4s ease, transform .4s ease; }
.flash.flash-out { opacity: 0; transform: translateY(-6px); }

/* ── Timeline (journal des mises à jour) ─────────────────────────── */
.timeline-item { position: relative; padding-left: 26px; }
.timeline-item::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: linear-gradient(120deg, #5b8cff 0%, #7b5cff 100%);
}
.timeline-item::after {
  content: ""; position: absolute; left: 8px; top: 18px; bottom: -24px; width: 1px;
  background: rgba(255, 255, 255, 0.09);
}
.timeline-item:last-child::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
