/* Form widget */
.rdf-form { max-width: 480px; }
.rdf-form-title { margin: 0 0 6px 0; font-size: 1.4em; }
.rdf-form-subtitle { margin: 0 0 16px 0; opacity: 0.85; }
.rdf-form-form { display: flex; flex-wrap: wrap; gap: 12px; }
.rdf-field { display: flex; flex-direction: column; gap: 4px; flex: 0 0 100%; }
.rdf-field--half { flex: 0 0 calc(50% - 6px); }
.rdf-field--third { flex: 0 0 calc(33.333% - 8px); }
.rdf-label { font-size: 0.85em; font-weight: 500; }

.rdf-form input[type=email],
.rdf-form input[type=text],
.rdf-form input[type=tel],
.rdf-form input[type=number],
.rdf-form input[type=date],
.rdf-form input[type=url],
.rdf-form textarea,
.rdf-form select {
  padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
  font-family: inherit; width: 100%; box-sizing: border-box;
}
.rdf-form textarea { resize: vertical; min-height: 80px; }
.rdf-form input:focus,
.rdf-form textarea:focus,
.rdf-form select:focus { outline: 2px solid #E8315B; outline-offset: 1px; }

.rdf-radio-group { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.rdf-radio { display: flex; gap: 8px; align-items: center; font-size: 0.95em; }
.rdf-radio input { margin: 0; }

.rdf-checkbox {
  display: flex; gap: 8px; align-items: flex-start; font-size: 0.85em;
  line-height: 1.4; flex: 0 0 100%;
}
.rdf-checkbox input { margin-top: 3px; }
.rdf-checkbox--custom { font-size: 0.95em; }

.rdf-honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.rdf-turnstile { margin: 8px 0; flex: 0 0 100%; }

.rdf-form-submit {
  background: #E8315B; color: #fff; border: 0; padding: 12px 20px;
  font-size: 14px; font-weight: 700; border-radius: 6px; cursor: pointer;
  letter-spacing: 0.5px; flex: 0 0 100%;
}
.rdf-form-submit:disabled { opacity: 0.6; cursor: wait; }
.rdf-form-submit--disabled { opacity: 0.45; cursor: not-allowed; }
.rdf-form-submit--disabled:hover { opacity: 0.45; }

.rdf-form-feedback { margin-top: 8px; font-size: 0.9em; flex: 0 0 100%; }
.rdf-form-feedback.error { color: #c92248; }
.rdf-form-feedback.success { color: #146c2e; }

/* Popin "vérifie ta boîte mail" */
.rdf-form-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease-out;
}
.rdf-form-modal.is-open { opacity: 1; pointer-events: auto; }
.rdf-form-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.rdf-form-modal-content {
  position: relative;
  background: #fff; color: #222;
  border-radius: 12px;
  max-width: 440px; width: calc(100vw - 32px);
  padding: 32px 32px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rdf-form-modal.is-open .rdf-form-modal-content { transform: scale(1) translateY(0); }
.rdf-form-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #888;
}
.rdf-form-modal-close:hover { color: #222; }
.rdf-form-modal-icon { font-size: 56px; margin-bottom: 8px; animation: rdf-bounce 0.6s ease-out 0.1s both; }
@keyframes rdf-bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.rdf-form-modal-title { margin: 0 0 8px; font-size: 22px; }
.rdf-form-modal-message { margin: 0; line-height: 1.5; color: #555; }

/* Countdown */
.rdf-countdown { font-size: 1em; }
.rdf-countdown-prefix { margin-right: 8px; }

/* Participants counter */
.rdf-counter { font-size: 1em; }
.rdf-counter-number { font-size: 1.5em; margin: 0 6px; }

/* Winners wall */
.rdf-winners-title { margin: 0 0 12px 0; }
.rdf-winners-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rdf-winner-item { padding: 8px 12px; background: #f6f7f7; border-radius: 4px; }
.rdf-winners-empty { font-style: italic; opacity: 0.7; }

/* Gallery widget */
.rdf-gallery-title { margin: 0 0 12px 0; }
.rdf-gallery-grid { display: grid; gap: 16px; }
.rdf-prize-card { border: 1px solid #eee; border-radius: 6px; padding: 12px; text-align: center; }
.rdf-prize-image { max-width: 100%; height: auto; max-height: 120px; object-fit: contain; }
.rdf-prize-name { display: block; margin-top: 6px; }
.rdf-prize-desc { margin: 4px 0; font-size: 0.9em; opacity: 0.85; }
.rdf-prize-value { margin: 4px 0 0 0; font-weight: 700; color: #E8315B; }

@media (max-width: 600px) {
  .rdf-field--half,
  .rdf-field--third { flex: 0 0 100%; }
  .rdf-gallery-grid { grid-template-columns: 1fr 1fr !important; }
}
