/* ============================================================
   diffusion.css — Modèles de diffusion
   ============================================================ */

/* ── Canvas bruit ── */
.df-canvas-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.df-canvas-wrap-2 {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.df-canvas {
  width: 100%;
  max-width: 340px;
  height: 340px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.df-canvas-label {
  font-family: var(--ss-font-mono);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  min-height: 1.4em;
  transition: color 0.3s ease;
}

.df-slider-wrap {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.df-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.df-slider-row label {
  font-family: var(--ss-font-mono);
  font-size: 0.85rem;
  color: var(--ss-muted);
  flex: 0 0 80px;
}

.df-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--ss-accent);
  height: 4px;
  cursor: pointer;
}

.df-slider-row output {
  font-family: var(--ss-font-mono);
  font-size: 0.85rem;
  color: var(--ss-accent);
  flex: 0 0 40px;
  text-align: right;
}

/* ── Steps viz (entraînement) ── */
.df-steps-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.df-steps-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.df-step-canvas {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.df-step-arrow {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.df-step-info {
  flex: 1;
}

.df-step-label {
  font-family: var(--ss-font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ss-text);
  margin-bottom: 0.2rem;
}

.df-step-desc {
  font-size: 0.88rem;
  color: var(--ss-muted);
  line-height: 1.4;
}

/* ── Génération animée ── */
.df-gen-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.df-gen-frames {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.df-gen-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.df-gen-canvas {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.df-gen-frame-label {
  font-family: var(--ss-font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

.df-gen-arrow {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.df-gen-main {
  width: 100%;
  max-width: 340px;
  height: 340px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: block;
}

.df-gen-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.df-gen-step-label {
  font-family: var(--ss-font-mono);
  font-size: 0.9rem;
  color: var(--ss-muted);
}

.df-gen-step-label strong {
  color: var(--ss-accent);
}

/* ── CLIP / guidance ── */
.df-clip-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.df-prompt-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.df-prompt-box .material-icons-round {
  color: var(--ss-accent);
  font-size: 20px;
  flex-shrink: 0;
}

.df-prompt-text {
  font-family: var(--ss-font-mono);
  font-size: 1rem;
  color: var(--ss-text);
  font-style: italic;
}

.df-clip-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.df-clip-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  opacity: 0;
  transform: translateX(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.df-clip-step.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.df-clip-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ss-font-mono);
  font-size: 0.85rem;
  color: var(--ss-accent);
  flex-shrink: 0;
}

.df-clip-step-text {
  padding-top: 0.3rem;
}

.df-clip-step-title {
  font-family: var(--ss-font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ss-text);
  margin-bottom: 0.2rem;
}

.df-clip-step-desc {
  font-size: 0.88rem;
  color: var(--ss-muted);
  line-height: 1.4;
}

/* ── Espace latent ── */
.df-latent-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.df-latent-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.df-latent-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.df-latent-canvas {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.df-latent-label {
  font-family: var(--ss-font-mono);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.df-latent-arrow {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.df-latent-vector {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--ss-font-mono);
  font-size: 0.75rem;
  color: #c4b5fd;
  line-height: 1.6;
  max-width: 160px;
  text-align: center;
}

.df-latent-dim {
  font-family: var(--ss-font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

/* ── Modèles comparatif ── */
.df-models-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.df-model-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.df-model-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.df-model-name {
  font-family: var(--ss-font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ss-text);
  flex: 0 0 160px;
}

.df-model-desc {
  font-size: 0.88rem;
  color: var(--ss-muted);
  flex: 1;
  line-height: 1.4;
}

.df-model-tag {
  font-family: var(--ss-font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.df-model-tag--open {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.df-model-tag--closed {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ── Dérives ── */
.df-risks-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.df-risk-card {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.df-risk-card.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.df-risk-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.df-risk-title {
  font-family: var(--ss-font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 0.3rem;
}

.df-risk-desc {
  font-size: 0.88rem;
  color: var(--ss-muted);
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .df-gen-frames {
    gap: 0.3rem;
  }
  .df-canvas-wrap {
    display: none;
  }
  .df-gen-canvas {
    width: 52px;
    height: 52px;
  }
  .df-latent-row {
    flex-direction: column;
  }
}
