/* PlayQR Roue — roue.css (page joueur, mobile-first) */

.pqr-roue {
  --pqr-primary: #8b5cf6;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 14px 48px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
}
.pqr-roue *, .pqr-roue *::before, .pqr-roue *::after { box-sizing: border-box; }

.pqr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

/* Messages (chargement / fermé) */
.pqr-message { text-align: center; }
.pqr-message h2 { margin: 8px 0 6px; font-size: 1.25rem; }
.pqr-message p { margin: 6px 0; color: #4b5563; }
.pqr-closed-icon { font-size: 2.6rem; }

.pqr-spinner {
  width: 38px; height: 38px;
  margin: 6px auto 12px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--pqr-primary);
  border-radius: 50%;
  animation: pqr-spin 0.8s linear infinite;
}
@keyframes pqr-spin { to { transform: rotate(360deg); } }

/* En-tête */
.pqr-header { text-align: center; padding: 6px 0 2px; }
.pqr-logo { max-height: 64px; max-width: 120px; margin: 0; display: block; flex: 0 0 auto; }
.pqr-header-top { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pqr-header-titles { text-align: center; }
.pqr-header-titles h1 { margin: 0 0 2px; }
.pqr-borne .pqr-logo { max-height: 86px; max-width: 160px; }
.pqr-header h1 { margin: 6px 0 2px; font-size: 1.5rem; line-height: 1.2; }
.pqr-client { margin: 0; color: var(--pqr-primary); font-weight: 700; font-size: .95rem; }
.pqr-desc { margin: 8px 0 0; color: #4b5563; font-size: .95rem; }

/* Roue */
.pqr-wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 18px auto 6px;
}
.pqr-wheel { width: 100%; }
.pqr-wheel svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .18)); }
.pqr-pointer {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 28px solid var(--pqr-primary);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
  z-index: 3;
}

/* Formulaire */
.pqr-field { margin-bottom: 12px; }
.pqr-field label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #374151;
}
.pqr-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
}
.pqr-field input:focus {
  outline: none;
  border-color: var(--pqr-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}
.pqr-field-row { display: flex; gap: 8px; margin: 8px 0; }
.pqr-field-row input { width: 100%; }
.pqr-req { color: #dc2626; }

.pqr-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .85rem;
  color: #4b5563;
  margin: 10px 0 4px;
}
.pqr-consent input { margin-top: 2px; flex: 0 0 auto; }

.pqr-rules-line { margin: 8px 0 0; font-size: .82rem; }
.pqr-rules-line a { color: var(--pqr-primary); }
.pqr-rules {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 10px;
  font-size: .82rem;
  color: #4b5563;
  white-space: pre-wrap;
}

.pqr-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  font-size: .87rem;
}

/* Bouton */
.pqr-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}
.pqr-btn-primary {
  background: var(--pqr-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(139, 92, 246, .35);
}
.pqr-btn-primary:disabled { opacity: .65; cursor: default; }

/* Résultat */
.pqr-result { text-align: center; }
.pqr-result-icon { font-size: 3rem; line-height: 1; }
.pqr-result h2 { margin: 6px 0 4px; font-size: 1.5rem; }
.pqr-result-text, .pqr-result p { color: #4b5563; }
.pqr-result-photo {
  max-width: 70%;
  max-height: 180px;
  margin: 10px auto;
  display: block;
  border-radius: 12px;
}
.pqr-code-box {
  margin: 14px auto 4px;
  padding: 12px;
  background: #f5f3ff;
  border: 2px dashed var(--pqr-primary);
  border-radius: 12px;
}
.pqr-code-label { display: block; font-size: .78rem; color: #6b7280; text-transform: uppercase; letter-spacing: 1px; }
.pqr-code {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--pqr-primary);
  margin-top: 4px;
}
.pqr-expiry { font-size: .85rem; color: #6b7280; margin-top: 8px; }

/* Confettis */
.pqr-confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
.pqr-confetti.active { display: block; }

/* ─────────── Écran de gain plein écran (orientation paysage) ─────────── */
.pqr-win-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--pqr-primary), #1f2937);
}
.pqr-win-overlay[hidden] { display: none; }

.pqr-win-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 880px;
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
  animation: pqr-win-pop .42s cubic-bezier(.18, .89, .32, 1.28) both;
}
@keyframes pqr-win-pop {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.pqr-win-nophoto .pqr-win-inner { max-width: 520px; }

.pqr-win-photo-wrap {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pqr-win-photo-wrap[hidden] { display: none; }
.pqr-win-photo {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 16px;
}

.pqr-win-body { flex: 1 1 auto; text-align: center; }
.pqr-win-icon { font-size: 3.4rem; line-height: 1; }
.pqr-win-kicker {
  margin: 6px 0 2px;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pqr-primary);
}
.pqr-win-label {
  margin: 4px 0 10px;
  font-size: 1.9rem;
  line-height: 1.15;
  color: #1f2937;
}
.pqr-win-code-box {
  display: inline-block;
  margin: 12px auto 6px;
  padding: 12px 20px;
  background: #f5f3ff;
  border: 2px dashed var(--pqr-primary);
  border-radius: 14px;
}
.pqr-win-code-box[hidden] { display: none; }
.pqr-win-code-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6b7280;
}
.pqr-win-code {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--pqr-primary);
  margin-top: 3px;
}
.pqr-win-instr { margin: 10px 0 2px; color: #4b5563; font-size: .95rem; }
.pqr-win-expiry { margin: 4px 0 0; color: #6b7280; font-size: .85rem; }
.pqr-win-expiry[hidden] { display: none; }
.pqr-win-close { max-width: 280px; margin-left: auto; margin-right: auto; }

/* Téléphone en portrait : empilement vertical. */
@media (max-width: 600px) {
  .pqr-win-inner { flex-direction: column; gap: 14px; padding: 22px 18px; }
  .pqr-win-photo-wrap { flex: 0 0 auto; }
  .pqr-win-photo { max-height: 190px; }
  .pqr-win-label { font-size: 1.5rem; }
  .pqr-win-code { font-size: 1.8rem; }
}
/* ─────────────────────── Mode borne tactile ──────────────────────────── */
.pqr-roue.pqr-borne { max-width: 680px; }
.pqr-borne .pqr-header h1 { font-size: 1.9rem; }
.pqr-borne .pqr-wheel-wrap { max-width: 460px; }
.pqr-borne .pqr-btn { font-size: 1.25rem; padding: 18px; }
.pqr-borne .pqr-field input { font-size: 1.05rem; padding: 13px 14px; }

/* Écran d'accueil de la borne */
.pqr-attract {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--pqr-primary), #1f2937);
  color: #fff;
}
.pqr-attract[hidden] { display: none; }
.pqr-attract-logo {
  max-height: 130px;
  max-width: 62%;
  background: #fff;
  padding: 12px;
  border-radius: 16px;
}
.pqr-attract-title { font-size: 2.4rem; line-height: 1.15; margin: 10px 0 0; color: #fff !important; }
.pqr-attract-sub { font-size: 1.2rem; opacity: .92; margin: 0; color: #fff !important; }
.pqr-attract-btn {
  width: auto;
  margin-top: 20px;
  font-size: 1.4rem;
  padding: 20px 44px;
  animation: pqr-attract-pulse 1.8s ease-in-out infinite;
}
@keyframes pqr-attract-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@media (max-width: 600px) {
  .pqr-attract-title { font-size: 1.8rem; }
  .pqr-attract-sub { font-size: 1.05rem; }
  .pqr-attract-btn { font-size: 1.2rem; padding: 18px 32px; }
}

/* ───────────── Page joueur autonome (sans le thème du site) ──────────── */
body.pqr-standalone { background: #f3f4f6; }
body.pqr-standalone .pqr-roue { padding-top: 22px; }

/* ───────────────────────── Sponsors autour de la roue ─────────────────── */
.pqr-wheel-stage { width: 100%; }
.pqr-sponsor-rail,
.pqr-sponsor-banner { display: none; }

.pqr-sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.pqr-sponsor-logo {
  display: block;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.pqr-sponsor-name {
  display: block;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  color: #4b5563;
  text-align: center;
}
a.pqr-sponsor { transition: transform .15s ease; }
a.pqr-sponsor:hover { transform: translateY(-2px); }

/* Bandeau sous la roue — téléphone / écran étroit (réglage par défaut) */
.pqr-sponsors-on .pqr-sponsor-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px auto 10px;
}
.pqr-sponsor-banner .pqr-sponsor-logo {
  max-height: 44px;
  max-width: 96px;
  padding: 6px;
}
.pqr-sponsor-banner .pqr-sponsor-name { font-size: .72rem; padding: 6px 10px; }

/* Colonnes de chaque côté de la roue — tablette, borne, ordinateur */
@media (min-width: 820px) {
  .pqr-roue.pqr-sponsors-on { max-width: 1080px; }
  .pqr-sponsors-on .pqr-header,
  .pqr-sponsors-on #pqr-form,
  .pqr-sponsors-on #pqr-result {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .pqr-sponsors-on .pqr-sponsor-banner { display: none; }

  .pqr-sponsors-on .pqr-wheel-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
  }
  .pqr-sponsors-on .pqr-wheel-stage .pqr-wheel-wrap {
    margin: 0;
    flex: 0 1 420px;
    max-width: 420px;
  }
  .pqr-sponsors-on .pqr-sponsor-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 0 0 auto;
  }
  .pqr-sponsor-rail .pqr-sponsor-logo {
    max-height: 66px;
    max-width: 140px;
    padding: 9px;
  }
}

/* Une colonne de sponsors vide ne réserve pas d'espace. */
.pqr-sponsor-rail:empty { display: none !important; }

