/**
 * duo-engine.css - Styles partages des jeux duo (2 joueurs, 1 appareil)
 * ─────────────────────────────────────────────────────────────────
 * Charge dans chaque page quiz/duo-*.html (apres common.css).
 */

#duo-root {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* Bouton principal (fallback local car quiz-ui.js n'est pas charge en mode duo) */
.btn-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #e84393, #c2185b);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(232,67,147,.35);
  transition: transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease, filter .2s ease;
  letter-spacing: .2px;
  min-width: 160px;
}
.btn-go:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(232,67,147,.45); }
.btn-go:active { transform: translateY(0); filter: brightness(.95); }
.btn-go:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.duo-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: duoFade .35s cubic-bezier(.4,0,.2,1);
}

@keyframes duoFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.duo-card {
  background: white;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  width: 100%;
  border: 1px solid rgba(0,0,0,.04);
  text-align: center;
}

.duo-intro {
  background: linear-gradient(135deg, #fde8f0, #fce4ec);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: .85rem;
  font-weight: 600;
  color: #555;
  line-height: 1.55;
  text-align: left;
}

.duo-h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.2;
}

.duo-sub {
  font-size: .9rem;
  font-weight: 700;
  color: #888;
  margin-bottom: 22px;
  line-height: 1.5;
}

.duo-turn-badge {
  display: inline-block;
  margin: 6px auto 14px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #fff3cd, #ffe9b3);
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  color: #6b4c1a;
  letter-spacing: .2px;
  box-shadow: 0 2px 8px rgba(249, 202, 36, .25);
}
.duo-turn-badge strong { color: #2d2046; font-weight: 900; }

.duo-progress {
  display: inline-block;
  font-size: .7rem;
  font-weight: 900;
  color: #aaa;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 5px 12px;
  background: #f5f5f7;
  border-radius: 50px;
}

.duo-actor {
  font-size: .92rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 18px;
  padding: 10px 16px;
  background: #fff5f9;
  border-radius: 12px;
  display: inline-block;
}
.duo-actor strong { color: #c2185b; }

.duo-question {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.25;
  margin-bottom: 22px;
}

/* ─── Setup screen (prenoms) ──────────────────────────────────── */
.duo-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  justify-content: center;
  flex-wrap: wrap;
}
.duo-name-row input {
  flex: 1;
  min-width: 130px;
  max-width: 200px;
  padding: 14px 18px;
  border: 2px solid #e84393;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
  text-align: center;
  background: white;
  outline: none;
  transition: all .2s;
}
.duo-name-row input:focus {
  background: #fff5f9;
  box-shadow: 0 0 0 4px rgba(232,67,147,.15);
}
.duo-vs {
  font-weight: 900;
  color: #e84393;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.duo-start-btn { margin-top: 8px; }

/* ─── Pattern A : devine ──────────────────────────────────────── */
.duo-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.duo-choice {
  padding: 16px 18px;
  background: white;
  border: 2px solid #e8e8ee;
  border-radius: 14px;
  font-size: .98rem;
  font-weight: 700;
  color: #1a1a2e;
  cursor: pointer;
  text-align: left;
  transition: all .18s;
}
.duo-choice:hover {
  border-color: #e84393;
  background: #fff5f9;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232,67,147,.15);
}

.duo-pass { background: linear-gradient(135deg, #fff, #fff5f9); }
.duo-pass-emoji {
  font-size: 4rem;
  margin-bottom: 12px;
  animation: duoBounce 1.4s ease-in-out infinite;
}
@keyframes duoBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.duo-pass-btn { margin-top: 8px; }

.duo-reveal { animation: duoPop .4s cubic-bezier(.34,1.56,.64,1); }
.duo-reveal.ok { background: linear-gradient(135deg, #fff, #f0fff4); border: 2px solid #4ade80; }
.duo-reveal.ko { background: linear-gradient(135deg, #fff, #fef0f0); border: 2px solid #fb7185; }
@keyframes duoPop {
  0% { transform: scale(.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.duo-reveal-emoji {
  font-size: 4.5rem;
  margin-bottom: 10px;
  line-height: 1;
}
.duo-reveal-detail {
  margin: 22px 0;
  text-align: left;
}
.duo-reveal-row {
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: .92rem;
  font-weight: 700;
  color: #555;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.duo-reveal-row strong { color: #1a1a2e; }

/* ─── Pattern B : pointe simultane ────────────────────────────── */
.duo-countdown {
  background: linear-gradient(135deg, #1a1a2e, #4a1d5e);
  color: white;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.duo-countdown-num {
  font-size: 6rem;
  font-weight: 900;
  color: white;
  animation: duoCount .8s ease-out;
}
@keyframes duoCount {
  0% { transform: scale(.3); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Verdict "d'accord / pas d'accord" apres countdown */
.duo-verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 4px;
}
.duo-verdict-btn {
  padding: 28px 14px;
  background: white;
  border: 2px solid #e8e8ee;
  border-radius: 18px;
  cursor: pointer;
  transition: all .2s cubic-bezier(.34,1.4,.64,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.duo-verdict-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.1);
}
.duo-verdict-btn.ok:hover {
  border-color: #4ade80;
  background: #f0fff4;
  box-shadow: 0 10px 24px rgba(74,222,128,.25);
}
.duo-verdict-btn.ko:hover {
  border-color: #fb7185;
  background: #fef0f0;
  box-shadow: 0 10px 24px rgba(251,113,133,.25);
}
.duo-verdict-emoji { font-size: 2.4rem; line-height: 1; }
.duo-verdict-label {
  font-size: 1rem;
  font-weight: 900;
  color: #1a1a2e;
}

/* ─── Pattern C : cartes ──────────────────────────────────────── */
.duo-carte {
  background: linear-gradient(135deg, #fff, #fff5f9);
  border: 2px solid #e84393;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.duo-carte.action {
  background: linear-gradient(135deg, #fff, #fef0f0);
  border-color: #fb7185;
}
.duo-carte-type {
  display: inline-block;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c2185b;
  background: rgba(232,67,147,.1);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
}
.duo-carte.action .duo-carte-type {
  color: #b91c1c;
  background: rgba(251,113,133,.12);
}
.duo-carte-level { margin-left: 4px; }
.duo-carte-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.3;
  margin: 12px 0 28px;
}
.duo-carte-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.duo-carte-skip {
  background: white !important;
  color: #999 !important;
  border: 2px solid #e8e8ee !important;
  box-shadow: none !important;
}
.duo-carte-skip:hover { background: #fafafa !important; color: #555 !important; }

/* ─── Resultat ─────────────────────────────────────────────────── */
.duo-result {
  background: linear-gradient(135deg, #fff, #fff5f9);
  text-align: center;
}
.duo-result-emoji {
  font-size: 5rem;
  margin-bottom: 10px;
  line-height: 1;
  animation: duoPop .5s cubic-bezier(.34,1.56,.64,1);
}
.duo-score-big {
  font-size: 4.5rem;
  font-weight: 900;
  color: #e84393;
  line-height: 1;
  margin: 14px 0 6px;
  background: linear-gradient(135deg, #e84393, #c2185b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.duo-verdict {
  font-size: 1rem;
  font-weight: 700;
  color: #555;
  line-height: 1.5;
  margin-bottom: 22px;
}
.duo-score-detail {
  background: #fff5f9;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.duo-score-line {
  display: flex;
  justify-content: space-between;
  font-size: .92rem;
  font-weight: 700;
  color: #555;
  padding: 6px 0;
}
.duo-score-line strong { color: #c2185b; font-weight: 900; }
.duo-result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.duo-back-link {
  font-size: .85rem;
  font-weight: 800;
  color: #999;
  text-decoration: none;
  transition: color .15s;
}
.duo-back-link:hover { color: #e84393; }

@media (max-width: 640px) {
  #duo-root { padding: 16px 12px 40px; }
  .duo-card { padding: 24px 18px; border-radius: 18px; }
  .duo-question { font-size: 1.3rem; }
  .duo-h2 { font-size: 1.25rem; }
  .duo-score-big { font-size: 3.6rem; }
  .duo-countdown-num { font-size: 4.5rem; }
  .duo-pointe-btn { padding: 16px 8px; }
  .duo-pointe-emoji { font-size: 1.7rem; }
}
