/**
 * Planet Sport tombola – mobile-first
 */
/* Landing wrapper: no theme “card” box around hero (custom section replaces defaults). */
/* Pleine largeur viewport : le thème met #content dans .container (col-12) */
section#content.page-content.planettombola-landing,
section#content.page-content.planettombola-participate {
  max-width: none !important;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  /* Colonne en grille : pas de flex sur les ancêtres de #pt-hero */
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  align-items: stretch;
  justify-items: stretch;
}

body#module-planettombola-landing #main,
body#module-planettombola-participate #main {
  display: block !important;
  width: 100%;
  max-width: 100%;
}

.planettombola-landing.page-content,
.planettombola-participate.page-content {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Hero concours sur page fabricant (hook displayWrapperTop) */
body#manufacturer .pt-mfg-hero-wrap {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  overflow: hidden;
}

body#manufacturer .pt-mfg-hero-wrap > #pt-hero.pt-hero {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.pt-tombola-page {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  align-items: stretch;
  justify-items: stretch;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.pt-tombola-page > #pt-hero.pt-hero {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* Logo sous le hero (landing), avant le texte principal */
.pt-landing-logo-wrap {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.pt-landing-logo {
  max-width: min(280px, 85vw);
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/*
 * Hero en GRID : image et contenu partagent la même cellule (superposition).
 * Avec flex row par défaut du thème, si .pt-hero__media perdait position:absolute,
 * on obtenait [ image | compteur ] — le grid l’empêche.
 */
#pt-hero.pt-hero {
  position: relative;
  width: 100%;
  min-height: clamp(220px, 42vw, 520px);
  max-height: 520px;
  display: grid !important;
  flex: none !important;
  flex-direction: unset !important;
  flex-wrap: unset !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  justify-items: stretch;
  text-align: center;
  padding: 0;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #ff6b35 0%, #f7c948 25%, #e91e8c 55%, #7c4dff 100%);
  background-size: 200% 200%;
  animation: pt-grad 18s ease infinite;
}

/* Calque image : grille interne pleine cellule (pas de flex sur .pt-hero) */
#pt-hero.pt-hero .pt-hero__media {
  display: inline-grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  position: relative !important;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0 !important;
}

#pt-hero.pt-hero .pt-hero__media picture {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}

#pt-hero.pt-hero .pt-hero__media .pt-hero__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
}

/* Même spécificité que #pt-hero.pt-hero : le shorthand background:gradient du bloc .pt-hero doit être retiré
   sinon background-color seul ne supprime pas background-image — bande rose/orange visible en bordure */
#pt-hero.pt-hero.pt-hero--custom-bg {
  animation: none;
  background: #000;
  background-image: none;
}

.pt-hero--custom-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

@keyframes pt-grad {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.pt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.18), transparent 40%);
  pointer-events: none;
}

.pt-hero.pt-hero--custom-bg::after {
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.07), transparent 40%);
}

#pt-hero.pt-hero .pt-hero__inner {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  width: 100%;
  max-width: 920px;
  margin: 0 auto !important;
  padding: 2.5rem 1rem 3rem;
  display: grid;
  justify-items: center;
  align-content: center;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  min-height: 100%;
  align-self: stretch;
  justify-self: stretch;
}

.pt-hero__title {
  font-size: clamp(1.35rem, 4vw, 2.75rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  margin: 0 0 1.5rem;
  width: 100%;
  text-align: center;
}

#pt-hero.pt-hero .pt-countdown {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  justify-items: center;
  align-items: center;
  width: min(100%, max-content);
  max-width: 100%;
  margin: 0 auto;
  gap: 0.75rem 1.25rem;
}

@media (max-width: 540px) {
  #pt-hero.pt-hero .pt-countdown {
    grid-template-columns: repeat(2, auto);
  }
}

.pt-countdown__unit {
  min-width: 4.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

.pt-countdown__val {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.pt-countdown__lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.pt-hero__cta {
  margin: 0;
}

.pt-hero__btn {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.pt-page {
  padding-bottom: 3rem;
}

.pt-landing-body {
  margin-top: 2rem;
}

.pt-landing-cta-wrap {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.planettombola-participate .pt-back-link {
  color: #333;
  font-weight: 600;
  text-decoration: none;
}

.planettombola-participate .pt-back-link:hover {
  text-decoration: underline;
}

.planettombola-participate .pt-form .pt-req-mark {
  color: #dc3545;
  font-weight: 700;
  margin-left: 0.2em;
  white-space: nowrap;
}

.planettombola-participate .pt-form .pt-opt-mark {
  color: #6c757d;
  font-weight: 600;
  margin-left: 0.35em;
  white-space: nowrap;
}

.pt-magasin-fields--blocked .form-control:disabled,
.pt-magasin-fields--blocked .form-control-file:disabled {
  cursor: not-allowed;
  background-color: #e9ecef;
}

.pt-magasin-fields.pt-magasin-fields--blocked .form-group label {
  color: #6c757d;
}

.pt-order-ref-fields--blocked .form-control:disabled,
.pt-order-ref-fields--blocked select:disabled {
  cursor: not-allowed;
  background-color: #e9ecef;
}

.pt-order-ref-fields.pt-order-ref-fields--blocked .form-group label,
.pt-order-ref-fields.pt-order-ref-fields--blocked > .small.font-weight-bold {
  color: #6c757d;
}

.pt-section {
  margin-top: 2.25rem;
}

.pt-section h1,
.pt-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.pt-prose {
  line-height: 1.6;
  color: #222;
}

.pt-form-section .pt-help {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.pt-form .form-group {
  margin-bottom: 1rem;
}

.pt-submit {
  margin-top: 0.5rem;
}

.pt-alert {
  margin-top: 1.5rem;
}

.pt-winners {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1.25rem;
  background: #fafafa;
}

.pt-thankyou {
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}

.pt-thankyou__text {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.pt-promo-banner {
  background: #111;
  color: #ff6b35;
  font-size: 0.85rem;
  text-align: center;
}

.pt-promo-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0.75rem;
}

.pt-promo-banner__link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.pt-promo-banner__link:hover {
  color: #ff6b35;
}

.pt-mfg-callout {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #fff8f3;
  border-left: 4px solid #ff6b35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pt-mfg-callout__text {
  margin: 0;
  font-weight: 600;
  flex: 1 1 220px;
}

@media (min-width: 768px) {
  .pt-hero {
    min-height: 280px;
  }
}


/* ===============================
   FORMULAIRE - AMÉLIORATION UX/UI
================================ */

/* Centrage du formulaire */
.planettombola-participate .pt-form-section {
  max-width: 940px;
  margin: 60px auto 0;
  background: #fff;
  padding: 30px 35px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* Titre */
.pt-form-section h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 10px;
}

/* Texte aide */
.pt-form-section .pt-help {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 25px;
  color: #666;
}

/* Espacement des lignes */
.pt-form .form-group.row {
  align-items: center;
  margin-bottom: 18px;
}

/* Labels */
.pt-form label {
  font-weight: 600;
  font-size: 14px;
  color: #222;
}

/* Inputs */
.pt-form .form-control,
.pt-form .form-control-file,
.pt-form select,
.pt-form textarea {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 12px 14px;
  font-size: 14px;
  transition: all 0.25s ease;
  box-shadow: none;
}

/* Focus effet premium */
.pt-form .form-control:focus,
.pt-form textarea:focus,
.pt-form select:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
  outline: none;
}

/* Placeholder */
.pt-form input::placeholder,
.pt-form textarea::placeholder {
  color: #aaa;
}

/* File input */
.pt-form .form-control-file {
  padding: 8px;
  background: #f9f9f9;
}

/* Bloc optionnel (commentaire) */
.pt-field-optional textarea {
  min-height: 120px;
}

/* Bouton */
.pt-submit {
  display: inline-block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  background: #000;
  border: none;
  transition: all 0.3s ease;
}

/* Hover bouton */
.pt-submit:hover {
  background: #222;
  transform: translateY(-1px);
}

/* Responsive mobile */
@media (max-width: 768px) {

  .planettombola-participate .pt-form-section {
    padding: 20px;
  }

  .pt-form .form-group.row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pt-form .form-group .col-md-3,
  .pt-form .form-group .col-md-9 {
    width: 100%;
    max-width: 100%;
  }

  .pt-form label {
    margin-bottom: 6px;
  }
}


/* ===============================
   FILE INPUT UX IMPROVEMENT
================================ */

/* Wrapper visuel */
#pt-receipt-file {
  position: relative;
  width: 100%;
  padding: 30px 20px;
  border: 2px dashed #ddd;
  border-radius: 10px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover effet */
#pt-receipt-file:hover {
  border-color: #000;
  background: #f5f5f5;
}

/* Texte custom via pseudo */
#pt-receipt-file::before {
  content: "Cliquez ou glissez votre ticket ici";
  display: block;
  font-size: 14px;
  color: #666;
}

/* Cache le vrai bouton */
#pt-receipt-file::-webkit-file-upload-button {
  visibility: hidden;
}

/* Firefox */
#pt-receipt-file::file-selector-button {
  visibility: hidden;
}

/* Quand un fichier est sélectionné */
#pt-receipt-file:valid::before {
  content: "Fichier sélectionné";
  color: #28a745;
}

/* Focus */
#pt-receipt-file:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}