/* ===== Accueil : mise en avant du bouton « Enrôlement établissement publique » ===== */
.ep-new-callout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 400px;
  width: 100%;
  margin: 10px 0 -4px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff8d6;
  border: 1px dashed var(--sm-accent);
  color: #1f272b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
.ep-new-callout strong { color: var(--sm-primary); }
.ep-new-callout .ep-spark { font-size: 18px; }
body.theme-dark .ep-new-callout { background: #33402f; color: #f1f3f4; }

.cta-buttons a.btn-public {
  position: relative;
  overflow: visible;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(135deg, var(--sm-primary) 0%, #e0301e 55%, #c00000 100%);
  border: 2px solid var(--sm-accent);
  font-weight: 700;
  animation: epGlow 1.8s ease-in-out infinite;
}
.cta-buttons a.btn-public::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%) no-repeat;
  background-size: 250% 100%;
  animation: epShine 2.6s ease-in-out infinite;
}
.cta-buttons a.btn-public:hover { color: #fff; transform: translateY(-2px); }

.ep-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sm-accent);
  color: #1f272b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  animation: epBadge 1.2s ease-in-out infinite alternate;
}

@keyframes epGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 0, 0, 0.45), 0 8px 20px rgba(192, 0, 0, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(192, 0, 0, 0), 0 8px 26px rgba(192, 0, 0, 0.4); }
}
@keyframes epShine {
  0% { background-position: 150% 0; }
  60%, 100% { background-position: -50% 0; }
}
@keyframes epBadge {
  from { transform: scale(1) rotate(-3deg); }
  to { transform: scale(1.1) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-buttons a.btn-public,
  .cta-buttons a.btn-public::after,
  .ep-badge { animation: none; }
}

/* ===== Page d'enrôlement ===== */
.ep-page {
  --ep-bg: #fff;
  --ep-text: #1f272b;
  --ep-muted: #5d6b72;
  --ep-border: #d9dee1;
  --ep-field: #f6f7f8;
  --ep-soft: #fff8d6;
  padding: 50px 0 80px;
  font-family: 'Poppins', sans-serif;
}
body.theme-dark .ep-page {
  --ep-bg: #22303a;
  --ep-text: #f1f3f4;
  --ep-muted: #aab6bc;
  --ep-border: #3e505a;
  --ep-field: #2b3a44;
  --ep-soft: #33402f;
}

#ep-app { max-width: 820px; margin: 0 auto; scroll-margin-top: 110px; }

.ep-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.ep-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ep-field);
  color: var(--ep-muted);
  font-size: 13px;
  font-weight: 600;
}
.ep-steps b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ep-border);
  color: var(--ep-text);
  font-size: 12px;
}
.ep-steps li.is-active { background: var(--sm-primary); color: #fff; }
.ep-steps li.is-active b { background: var(--sm-accent); color: #1f272b; }
.ep-steps li.is-done b { background: var(--sm-accent); color: #1f272b; }

.ep-card {
  background: var(--ep-bg);
  color: var(--ep-text);
  border-radius: 16px;
  border-top: 6px solid var(--sm-primary);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  padding: 28px;
}
.ep-card[hidden] { display: none; }

.ep-header { margin-bottom: 4px; }
.ep-header h3 { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: var(--ep-text); }
.ep-header p { margin: 0; font-size: 14px; color: var(--ep-muted); }

.ep-form fieldset {
  margin: 18px 0 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--ep-border);
  scroll-margin-top: 110px;
}
.ep-form legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--sm-primary);
}
.ep-form legend b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sm-accent);
  color: #1f272b;
  font-size: 13px;
}

.ep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ep-full { grid-column: 1 / -1; }

.ep-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ep-field > span { font-size: 13px; font-weight: 600; color: var(--ep-text); }
.ep-field input,
.ep-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  background: var(--ep-field);
  color: var(--ep-text);
  font-size: 14px;
}
.ep-field input[readonly] { color: var(--ep-muted); }
.ep-field input:focus,
.ep-field select:focus {
  outline: none;
  border-color: var(--sm-primary);
  box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.15);
}
.ep-field select:disabled { opacity: 0.6; }

.ep-invalid input,
.ep-invalid select,
.ep-invalid .ep-choice span { border-color: var(--sm-primary); }
.ep-invalid > span { color: var(--sm-primary); }

.ep-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.ep-choice { margin: 0; cursor: pointer; }
.ep-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ep-choice span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--ep-border);
  border-radius: 999px;
  background: var(--ep-field);
  font-size: 14px;
  font-weight: 500;
}
.ep-choice input:checked + span { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; }
.ep-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.25); }

.ep-student { padding: 16px; margin-bottom: 12px; border: 1px solid var(--ep-border); border-radius: 12px; }
.ep-student-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.ep-remove,
.ep-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--sm-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ep-link { text-decoration: underline; text-underline-offset: 3px; }

.ep-add {
  width: 100%;
  padding: 12px;
  border: 2px dashed var(--sm-accent);
  border-radius: 12px;
  background: var(--ep-soft);
  color: var(--ep-text);
  font-weight: 600;
  cursor: pointer;
}

.ep-error { margin: 16px 0 0; color: var(--sm-primary); font-size: 14px; font-weight: 600; }

.ep-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ep-footer-center { justify-content: center; }
.ep-btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}
.ep-btn-secondary { border: 2px solid var(--ep-border); background: transparent; color: var(--ep-text); }
.ep-btn-secondary:hover { color: var(--ep-text); border-color: var(--ep-muted); }
.ep-btn-primary { border: 2px solid var(--sm-primary); background: var(--sm-primary); color: #fff; }
.ep-btn-primary:hover { color: #fff; filter: brightness(1.08); }

/* Récapitulatif */
.ep-recap-section { margin-top: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ep-border); }
.ep-recap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.ep-recap-head h4 { margin: 0; font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--sm-primary); }
.ep-recap dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.ep-recap dl > div { padding: 8px 12px; border-radius: 8px; background: var(--ep-field); }
.ep-recap dt { font-size: 12px; font-weight: 500; color: var(--ep-muted); }
.ep-recap dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ep-text); overflow-wrap: anywhere; }
.ep-recap dd em { font-weight: 400; color: var(--ep-muted); }
.ep-recap-student { margin-bottom: 12px; }
.ep-recap-student > strong { display: block; margin-bottom: 8px; font-size: 14px; }

/* Code d'identification */
.ep-done { text-align: center; }
.ep-check {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #1f9d55;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.ep-done h3 { margin: 0 0 18px; font-size: 24px; font-weight: 700; color: var(--ep-text); }
.ep-code-label { margin: 0 0 10px; font-size: 15px; color: var(--ep-muted); }
.ep-code-box {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 16px 20px;
  border: 2px dashed var(--sm-accent);
  border-radius: 14px;
  background: var(--ep-soft);
}
.ep-code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--sm-primary);
  user-select: all;
}
.ep-copy {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--sm-accent);
  color: #1f272b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ep-copy.is-copied { background: #1f9d55; color: #fff; }
.ep-notice {
  max-width: 600px;
  margin: 22px auto 0;
  padding: 14px 18px;
  border-left: 4px solid var(--sm-primary);
  border-radius: 8px;
  background: var(--ep-field);
  color: var(--ep-text);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
.ep-notice strong { color: var(--sm-primary); }

@media (max-width: 600px) {
  .ep-page { padding: 24px 0 50px; }
  .ep-card { padding: 20px 16px; }
  .ep-header h3, .ep-done h3 { font-size: 20px; }
  .ep-steps span { display: none; }
  .ep-steps li.is-active span { display: inline; }
  .ep-grid, .ep-recap dl { grid-template-columns: 1fr; }
  .ep-student { padding: 12px; }
  .ep-footer { flex-direction: column-reverse; }
  .ep-btn { width: 100%; }
  .ep-code { font-size: 28px; }
}

#ep-code-app,
#ep-pay-app { max-width: 820px; margin: 0 auto; scroll-margin-top: 110px; }

.ep-whatsapp { margin: 18px 0 0; font-size: 14px; }
.ep-whatsapp a { color: #1f9d55; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Page de paiement */
.ep-pay-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 20px 0 4px;
  padding: 12px 16px;
  border: 2px dashed var(--sm-accent);
  border-radius: 12px;
  background: var(--ep-soft);
}
.ep-pay-ref span { flex: 1 1 220px; font-size: 13px; color: var(--ep-muted); }
.ep-pay-ref strong {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--sm-primary);
}

.ep-pay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.ep-pay-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px 16px;
  border: 2px solid var(--ep-border);
  border-radius: 14px;
  background: var(--ep-bg);
  color: var(--ep-text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ep-pay-option:hover { border-color: var(--sm-accent); transform: translateY(-2px); }
.ep-pay-option:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.25); }
.ep-pay-option[aria-checked="true"] {
  border-color: var(--sm-primary);
  box-shadow: 0 8px 22px rgba(192, 0, 0, 0.15);
}
.ep-pay-option[aria-checked="true"]::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sm-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.ep-pay-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 64px;
  padding: 6px 14px;
  border-radius: 10px;
  background: #fff;
}
.ep-pay-logos img { max-height: 52px; max-width: 130px; object-fit: contain; }
.ep-pay-name { font-size: 16px; font-weight: 700; }
.ep-pay-desc { font-size: 12px; color: var(--ep-muted); }

.ep-pay-soon {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--sm-accent);
  border-left: 5px solid var(--sm-accent);
  border-radius: 12px;
  background: var(--ep-soft);
  color: var(--ep-text);
  animation: epSoonIn 0.25s ease-out;
}
.ep-pay-soon[hidden] { display: none; }
.ep-pay-soon-icon { font-size: 26px; line-height: 1; }
.ep-pay-soon strong { display: block; margin-bottom: 4px; font-size: 15px; color: var(--sm-primary); }
.ep-pay-soon p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ep-text); }
.ep-pay-soon p b { white-space: nowrap; }
@keyframes epSoonIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .ep-pay-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ep-pay-option { padding: 16px 8px 12px; }
  .ep-pay-logos { height: 52px; padding: 4px 8px; }
  .ep-pay-logos img { max-height: 40px; max-width: 70px; }
  .ep-pay-name { font-size: 14px; }
}
