/* ═══════════════════════════════════════════
   DECODEUR.CSS
   ═══════════════════════════════════════════ */

/* ── Hero ── */
.dec-hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.dec-hero-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #f472b6, #fb923c);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.dec-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin: 0 0 0.8rem;
  line-height: 1.1;
}
.dec-hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

/* ── Example ticker ── */
.dec-example-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  max-width: 100%;
}
.dec-example-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}
.dec-ex-written {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
}
.dec-ex-arrow {
  font-size: 1.1rem;
  color: var(--pink);
  font-weight: 700;
}
.dec-ex-real {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}

/* ── Wrap ── */
.dec-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 6rem;
}

/* ── Input card ── */
.dec-input-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.dec-input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.dec-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.dec-textarea:focus { outline: none; border-color: var(--pink); }
.dec-textarea::placeholder { color: var(--muted); opacity: 0.5; }

.dec-context-input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 0.84rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, color 0.2s;
}
.dec-context-input:focus { outline: none; border-color: var(--pink); color: var(--text); }
.dec-context-input::placeholder { color: var(--muted); opacity: 0.45; }

.dec-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.char-count { font-size: 0.8rem; color: var(--muted); }

.btn-decodeur {
  padding: 0.75rem 1.8rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f472b6, #fb923c);
  color: #fff;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-decodeur:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-decodeur:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.dec-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Translation card ── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dec-translation-card {
  background: var(--card-bg);
  border: 2px solid rgba(244,114,182,0.3);
  border-radius: 20px;
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  animation: cardIn 0.4s ease forwards;
  transition: border-color 0.3s;
}
.dec-msg-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dec-msg-col { display: flex; flex-direction: column; gap: 0.5rem; }
.dec-msg-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.dec-msg-label.real { color: var(--pink); }
.dec-msg-written {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}
.dec-msg-real {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}
.dec-arrow-big {
  font-size: 1.8rem;
  color: var(--pink);
  font-weight: 900;
  text-align: center;
}

/* ── Hope meter ── */
.dec-hope-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.dec-hope-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.dec-hope-bar {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
}
@keyframes fillHope { from { width: 0%; } }
.dec-hope-fill {
  height: 100%;
  border-radius: 4px;
  animation: fillHope 0.7s ease forwards;
  transition: width 0.7s ease;
}
.dec-hope-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* ── Indices ── */
.dec-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  animation: cardIn 0.4s ease 0.1s both;
}
.dec-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.dec-indices {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dec-indices li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}
.dec-indices li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--pink);
  font-weight: 700;
}

/* ── Delusion card ── */
.dec-delusion-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(244,114,182,0.08));
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  animation: cardIn 0.4s ease 0.2s both;
}
.dec-delusion-icon { font-size: 1.6rem; flex-shrink: 0; }
.dec-delusion-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a78bfa;
  margin-bottom: 0.35rem;
}
.dec-delusion-text {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}

/* ── Verdict ── */
.dec-verdict {
  background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(251,146,60,0.08));
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  font-size: 0.97rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  animation: cardIn 0.4s ease 0.3s both;
}

/* ── Actions ── */
.dec-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 2rem;
}
.btn-reset {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--muted);
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-reset:hover { border-color: var(--pink); color: var(--text); }

.dec-crosslink-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.25);
  color: var(--purple);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.dec-crosslink-btn:hover { background: rgba(168,85,247,0.22); color: var(--text); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .dec-hero { padding: 2.5rem 1rem 1.5rem; }
  .dec-wrap { padding: 1rem 1rem 4rem; }
  .dec-msg-row { grid-template-columns: 1fr; text-align: center; }
  .dec-arrow-big { transform: rotate(90deg); }
  .dec-btn-row { flex-direction: column; align-items: stretch; }
  .btn-decodeur { justify-content: center; }
  .dec-actions { flex-direction: column; }
}
