/* ============================================================
   Enrol Request – design aligné sur la page signup
   ============================================================ */

/* ── Badge cours ────────────────────────────────────────────────────────────*/
.sc-enrol-request__course-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(197, 48, 48, 0.08);
  color: #c53030;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(197, 48, 48, 0.2);
}

/* ── Logo dans la carte ─────────────────────────────────────────────────────*/
.sc-enrol-request__logo-link {
  display: inline-block;
  margin-bottom: 18px;
}

/* ── Boutons de choix (compte existant / nouveau) ───────────────────────────*/
.sc-enrol-request__choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 8px;
}

.sc-enrol-request__choice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sc-enrol-request__choice-btn--primary {
  background: #c53030;
  border-color: #9b2c2c;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(197, 48, 48, 0.25);
}

.sc-enrol-request__choice-btn--ghost {
  background: #ffffff;
  border-color: #cfd6df;
  color: #2f3b52 !important;
}

.sc-enrol-request__choice-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── Formulaire Moodle – aligné sur le design signup ───────────────────────*/
.sc-auth-card--enrol .mform {
  margin-top: 4px;
}

/* Champs du formulaire */
.sc-auth-card--enrol .mform .fitem {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.sc-auth-card--enrol .mform .fitemtitle,
.sc-auth-card--enrol .mform .fitemtitle label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 6px;
}

.sc-auth-card--enrol .mform .felement input[type="text"],
.sc-auth-card--enrol .mform .felement input[type="email"],
.sc-auth-card--enrol .mform .felement input[type="tel"],
.sc-auth-card--enrol .mform .felement input[type="password"],
.sc-auth-card--enrol .mform .felement select,
.sc-auth-card--enrol .mform .felement textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1a202c;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.sc-auth-card--enrol .mform .felement input:focus,
.sc-auth-card--enrol .mform .felement select:focus,
.sc-auth-card--enrol .mform .felement textarea:focus {
  border-color: #c53030;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.12);
}

/* Bouton submit */
.sc-auth-card--enrol .mform #id_submitbutton,
.sc-auth-card--enrol .mform #id_submitbutton2,
.sc-auth-card--enrol .mform button[type="submit"]:not([name="cancel"]),
.sc-auth-card--enrol .mform input[type="submit"]:not([name="cancel"]) {
  width: 100%;
  padding: 13px 24px;
  background: #c53030 !important;
  border-color: #9b2c2c !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 18px rgba(197, 48, 48, 0.25) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 8px;
  cursor: pointer;
}

.sc-auth-card--enrol .mform #id_submitbutton:hover,
.sc-auth-card--enrol .mform button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(197, 48, 48, 0.32) !important;
}

/* Cacher le groupe bouton standard Moodle et le remplacer */
.sc-auth-card--enrol .mform #fgroup_id_buttonar .felement fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Masquer les labels vides */
.sc-auth-card--enrol .mform .femptylabel .fitemtitle {
  display: none;
}

/* Messages d'erreur */
.sc-auth-card--enrol .mform .error {
  color: #c53030;
  font-size: 0.82rem;
  margin-top: 4px;
}

.sc-auth-card--enrol .mform .felement .error input,
.sc-auth-card--enrol .mform .felement .error select {
  border-color: #c53030;
}

/* Note champs obligatoires */
.sc-auth-card--enrol .mform .fdescription {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 3px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────*/
@media (max-width: 480px) {
  .sc-enrol-request__choice {
    flex-direction: column;
    align-items: stretch;
  }

  .sc-enrol-request__choice-btn {
    width: 100%;
    text-align: center;
  }
}
