/* ══════════════════════════════════════════════════════════════
   play.css — Page Quick Game (/play)
   Design cohérent avec le reste du projet (fond sombre, vert, or)
   ══════════════════════════════════════════════════════════════ */

/* ── Body / fond ── */
body.play-page {
  background: radial-gradient(ellipse at top, rgb(0, 45, 0) 0%, rgb(10, 10, 10) 70%);
  color: var(--color-white);
  font-family: "roboto-slab", "Times New Roman", Times, serif;
  min-height: 100dvh;
  overflow-y: auto;
}

/* ── Scroll autorisé ── */
body.play-page,
body.play-page html {
  overflow: auto;
}

/* ── Conteneur principal ── */
#qp-container {
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 1.5rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#qp-container h1 {
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2rem);
  text-align: center;
  color: var(--color-white);
  text-shadow:
    2px 3px 1px rgb(0, 0, 0),
    0 0 12px rgba(0, 130, 0, 0.5);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}

#qp-container p.subtitle {
  text-align: center;
  color: rgba(230, 230, 230, 0.7);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

/* ── Sections ── */
.qp-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow:
    inset 0 0 1.5rem rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.qp-section h2 {
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--color-gold);
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* ── Champs ── */
.qp-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.qp-field label {
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(230, 230, 230, 0.75);
  letter-spacing: 0.01em;
}

.qp-field input,
.qp-field select {
  padding: 0.5rem 0.65rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 40, 20, 0.8);
  color: var(--color-white);
  font-family: "roboto-slab", "Times New Roman", Times, serif;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.qp-field input:focus,
.qp-field select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.qp-field select option {
  background: rgb(15, 30, 15);
  color: var(--color-white);
}

.qp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

/* ── Bouton principal ── */
.qp-btn-primary {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.4rem;
  border: 0.05rem solid #222;
  background-color: var(--color-green);
  background-image: var(--gradient-green);
  color: var(--color-white);
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-shadow:
    1px 1px 0px black,
    -1px 1px 0px black,
    1px -1px 0px black,
    -1px -1px 0px black;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2),
    0 -1px 0 rgba(255, 255, 255, 0.4);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.qp-btn-primary:hover:not(:disabled) {
  background-image: var(--gradient-green-hover);
  transform: scaleX(0.995) scaleY(0.96) translateY(0px);
}

.qp-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Bouton secondaire ── */
.qp-btn-secondary {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

.qp-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scaleX(0.995) scaleY(0.97);
}

/* ── Divers ── */
.qp-divider {
  text-align: center;
  color: rgba(230, 230, 230, 0.45);
  font-size: 0.85rem;
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
}

.qp-error {
  color: #ff6b6b;
  font-size: 0.88rem;
  text-align: center;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* ── Slider rows (Max Players, Action Time) ── */
.qp-slider-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.15rem;
}

.qp-slider-row span {
  min-width: 2.5em;
  text-align: right;
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-gold);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0.3rem;
  padding: 0.1em 0.4em;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.qp-slider-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--color-green);
}

/* ── Input code d'invitation ── */
.qp-code-input {
  text-align: center;
  font-size: 1.6rem !important;
  letter-spacing: 0.4em;
  font-weight: bold;
  text-transform: uppercase;
  cursor: default;
  font-family: "cooper", Georgia, "Times New Roman", Times, serif !important;
  color: var(--color-gold) !important;
}

/* ── Boîte modale générique ── */
.modal-box {
  background: rgba(5, 20, 5, 0.97);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 0.55rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  width: min(90vw, 500px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-title {
  font-family: "cooper", Georgia, "Times New Roman", Times, serif;
  font-weight: 800;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--color-gold);
  letter-spacing: -0.03em;
  text-align: center;
  text-shadow:
    1px 1px 0px black,
    -1px 1px 0px black;
  margin: 0;
}

/* ── CGU modal ── */
#qp-cgu-modal .modal-body {
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 0.35rem;
  margin-bottom: 0.75rem;
  color: rgba(230, 230, 230, 0.9);
}

#qp-cgu-modal .modal-body ul {
  padding-left: 1.25rem;
  list-style-type: disc;
  margin-top: 0.5rem;
}

#qp-cgu-modal .modal-body li {
  list-style-type: disc;
  margin-bottom: 0.35rem;
}

#qp-cgu-modal .modal-box {
  max-width: 500px;
}

/* ── Actions CGU ── */
.qp-cgu-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

#qp-cgu-cancel {
  flex: 1;
}

#qp-cgu-accept {
  flex: 2;
}

/* ── Invite modal ── */
#qp-invite-modal .modal-box {
  max-width: 440px;
}

.qp-invite-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(230, 230, 230, 0.7);
  margin-bottom: 0.75rem;
}

.qp-field--mt {
  margin-top: 0.5rem;
}

#qp-invite-link {
  font-size: 0.8rem !important;
  word-break: break-all;
  cursor: default;
  color: rgba(230, 230, 230, 0.8) !important;
}

#qp-copy-link-btn {
  margin-top: 0.25rem;
}

#qp-goto-table-btn {
  margin-top: 0.75rem;
}
