/* ═══════════════════════════════════════════════════════════
   Yalla Nett3awno – Formulaire Bénévoles
   Palette : rouge #e63535 | bleu foncé #1a2e5a | blanc/gris clair
   ═══════════════════════════════════════════════════════════ */

:root {
  --yn-red:     #e63535;
  --yn-red-dk:  #c0392b;
  --yn-blue:    #1a2e5a;
  --yn-blue-lt: #2c4a8a;
  --yn-white:   #ffffff;
  --yn-bg:      #f7f8fc;
  --yn-border:  #dde2ef;
  --yn-text:    #2d3748;
  --yn-muted:   #718096;
  --yn-radius:  10px;
  --yn-shadow:  0 4px 24px rgba(26,46,90,.10);
}

/* ── Wrapper ─────────────────────────────────────────────── */
.yalla-form-wrapper {
  max-width: 780px;
  margin: 32px auto;
  background: var(--yn-white);
  border-radius: 16px;
  box-shadow: var(--yn-shadow);
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--yn-text);
}

/* ── En-tête ─────────────────────────────────────────────── */
.yalla-form-header {
  background: linear-gradient(135deg, var(--yn-blue) 0%, var(--yn-blue-lt) 100%);
  padding: 36px 40px 28px;
  text-align: center;
  color: var(--yn-white);
}

.yalla-logo {
  max-height: 80px;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

.yalla-logo-text {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: .5px;
}

.yalla-form-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--yn-white);
}

.yalla-form-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,.75);
  margin: 0 0 20px;
}

.yalla-form-intro {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: var(--yn-radius);
  padding: 18px 22px;
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
}

.yalla-form-intro p { margin: 0 0 8px; }
.yalla-form-intro p:last-child { margin-bottom: 0; }

.yalla-confidential {
  color: #ffd580;
  font-style: italic;
}

.yalla-time { color: rgba(255,255,255,.90); }

.yalla-contact-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.yalla-contact-info a {
  color: #ffd580;
  text-decoration: none;
}

.yalla-contact-info a:hover { text-decoration: underline; }

/* ── Corps du formulaire ─────────────────────────────────── */
#yalla-ben-form {
  padding: 32px 40px 40px;
  background: var(--yn-bg);
}

/* ── Section labels ──────────────────────────────────────── */
.yalla-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--yn-blue);
  border-left: 4px solid var(--yn-red);
  padding: 6px 0 6px 12px;
  margin: 28px 0 16px;
  background: rgba(26,46,90,.04);
  border-radius: 0 6px 6px 0;
}

.yalla-section-label:first-of-type { margin-top: 0; }

.yalla-section-icon { font-size: 18px; }

/* ── Champs ──────────────────────────────────────────────── */
.yalla-field {
  margin-bottom: 18px;
}

.yalla-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 600px) {
  .yalla-row { grid-template-columns: 1fr; }
  #yalla-ben-form { padding: 20px 18px 30px; }
  .yalla-form-header { padding: 24px 18px 20px; }
}

.yalla-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--yn-blue);
  margin-bottom: 6px;
}

.yalla-field label small {
  font-weight: 400;
  color: var(--yn-muted);
}

.yalla-field input[type="text"],
.yalla-field input[type="email"],
.yalla-field input[type="tel"],
.yalla-field input[type="date"],
.yalla-field select,
.yalla-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--yn-border);
  border-radius: var(--yn-radius);
  font-size: 14px;
  color: var(--yn-text);
  background: var(--yn-white);
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.yalla-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a2e5a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.yalla-field input:focus,
.yalla-field select:focus,
.yalla-field textarea:focus {
  border-color: var(--yn-red);
  box-shadow: 0 0 0 3px rgba(230,53,53,.12);
}

.yalla-field textarea { resize: vertical; min-height: 70px; }

.req { color: var(--yn-red); margin-left: 2px; }

/* ── Radio boutons ───────────────────────────────────────── */
.yalla-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.yalla-radio-wrap { gap: 8px; }

.yalla-radio { display: inline-flex; cursor: pointer; }

.yalla-radio input[type="radio"] { display: none; }

.yalla-radio-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--yn-border);
  border-radius: 50px;
  font-size: 13.5px;
  color: var(--yn-muted);
  background: var(--yn-white);
  transition: all .2s;
  white-space: nowrap;
  user-select: none;
}

.yalla-radio input[type="radio"]:checked + .yalla-radio-btn {
  background: var(--yn-red);
  border-color: var(--yn-red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(230,53,53,.25);
}

.yalla-radio:hover .yalla-radio-btn {
  border-color: var(--yn-red);
  color: var(--yn-red);
}

/* ── Zone photo ──────────────────────────────────────────── */
.yalla-photo-area {
  border: 2px dashed var(--yn-border);
  border-radius: var(--yn-radius);
  background: var(--yn-white);
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.yalla-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  gap: 6px;
}

.yalla-photo-icon { font-size: 32px; }

.yalla-photo-placeholder p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--yn-blue);
}

.yalla-photo-placeholder small {
  color: var(--yn-muted);
  font-size: 12px;
}

.yalla-photo-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.yb-btn-upload, .yb-btn-camera {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.yb-btn-upload {
  background: var(--yn-blue);
  color: #fff;
}

.yb-btn-camera {
  background: var(--yn-red);
  color: #fff;
}

.yb-btn-upload:hover { background: var(--yn-blue-lt); }
.yb-btn-camera:hover { background: var(--yn-red-dk); }

.yalla-photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  position: relative;
}

.yalla-photo-preview img {
  max-height: 130px;
  max-width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.yalla-photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--yn-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Caméra ──────────────────────────────────────────────── */
.yalla-camera-modal {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #000;
}

#yalla-camera-video {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
}

.yalla-camera-controls {
  display: flex;
  gap: 12px;
}

.yalla-camera-controls button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#yb-snap-btn { background: var(--yn-red); color: #fff; }
#yb-cancel-camera { background: #444; color: #fff; }

/* ── Messages ────────────────────────────────────────────── */
.yalla-msg {
  margin: 0 40px 16px;
  padding: 12px 18px;
  border-radius: var(--yn-radius);
  font-size: 14px;
  font-weight: 500;
}

.yalla-msg--error {
  background: #fff1f0;
  border: 1.5px solid #ffccc7;
  color: #c0392b;
}

.yalla-msg--success {
  background: #f0fff4;
  border: 1.5px solid #b7eb8f;
  color: #276749;
}

/* ── Mention obligatoire ─────────────────────────────────── */
.yalla-required-note {
  font-size: 12.5px;
  color: var(--yn-muted);
  margin: 0 0 20px;
}

/* ── Bouton submit ───────────────────────────────────────── */
.yalla-submit-wrap { text-align: center; }

.yalla-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 48px;
  background: linear-gradient(135deg, var(--yn-red) 0%, var(--yn-red-dk) 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(230,53,53,.35);
  letter-spacing: .3px;
}

.yalla-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230,53,53,.45);
}

.yalla-submit-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* ── Succès ──────────────────────────────────────────────── */
.yalla-success {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 40px;
  background: var(--yn-bg);
}

.yalla-success-icon { font-size: 64px; margin-bottom: 28px; }

.yalla-success h3 {
  font-size: 24px;
  color: var(--yn-blue);
  margin: 0 0 12px;
}

.yalla-success p { margin: 0 0 8px; font-size: 15px; }

.yalla-success-sub { color: var(--yn-muted); font-size: 13.5px; }
