.form-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.form-message {
  font-size: 0.95rem;
  font-weight: 600;
}

.form-message.success {
  color: #15803d;
}

.form-message.error {
  color: #dc2626;
}

:root {
  --font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --color-text: #101828;
  --color-muted: #667085;
  --color-blue: #2f66f6;
  --color-blue-strong: #1d53f0;
  --color-border: #d2d7e5;
  --color-border-strong: rgba(47, 102, 246, 0.35);
  --color-soft: #f5f7ff;
  --shadow-card: 0 24px 60px rgba(16, 24, 40, 0.12);
  --radius-card: 24px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: #f5f7ff;
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: #0f172a;
}

.logo-accent {
  color: var(--color-blue);
  position: relative;
  padding-bottom: 0.2rem;
}

.logo-accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #ef233c;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(210, 215, 229, 0.6);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.6rem 0;
  flex-wrap: wrap;
}

.header-text {
  flex: 1;
  min-width: 220px;
}

.header-text h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
}

.header-text p {
  margin: 0.35rem 0 0;
  color: var(--color-muted);
  max-width: 520px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, border-color 0.2s ease;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.button.primary {
  background: var(--color-blue);
  color: #ffffff;
  border-color: var(--color-blue);
  box-shadow: 0 18px 35px rgba(47, 102, 246, 0.28);
}

.button.primary:hover {
  transform: translateY(-1px);
  background: var(--color-blue-strong);
  border-color: var(--color-blue-strong);
}

.panel.form .button.primary {
  background: linear-gradient(135deg, #5a7bff 0%, #3a5bff 100%);
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(58, 91, 255, 0.35);
}

.panel.form .button.primary:hover {
  background: linear-gradient(135deg, #3a5bff 0%, #2747f4 100%);
  transform: translateY(-2px);
}

.button.ghost {
  background: transparent;
  color: var(--color-blue);
  border-color: var(--color-border-strong);
}

.button.ghost:hover {
  background: rgba(47, 102, 246, 0.08);
}

.content {
  flex: 1;
  padding: clamp(2.5rem, 6vw, 4rem) 0 4rem;
}

/* Layout supprimé pour navigation à étapes */

.panel {
  background: #ffffff;
  border: 1.5px solid rgba(210, 215, 229, 0.55);
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 3vw, 2.4rem);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
}

.panel.form {
  background: radial-gradient(
      circle at -10% -10%,
      rgba(99, 102, 241, 0.08),
      rgba(255, 255, 255, 0) 55%
    ),
    #ffffff;
  border: 1.5px solid rgba(47, 102, 246, 0.12);
  box-shadow: 0 32px 70px rgba(47, 102, 246, 0.1);
  padding: clamp(2rem, 4vw, 2.8rem);
  gap: 1.9rem;
}

/* ===========================
   PRÉ-SÉLECTION (Vue initiale)
   =========================== */

.panel.preselection {
  background: radial-gradient(
      circle at -10% -10%,
      rgba(47, 102, 246, 0.06),
      rgba(255, 255, 255, 0) 55%
    ),
    #ffffff;
}

.preselection-header {
  text-align: left;
}

.preselection-header h2 {
  font-size: 1.65rem;
  margin: 0.5rem 0;
}

.preselection-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preselection-step {
  padding: 1.5rem;
  background: var(--color-soft);
  border-radius: 12px;
  height: fit-content;
}

.preselection-step-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text);
}

/* Type client selector */
.client-type-selector {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 500px) {
  .client-type-selector {
    flex-direction: column;
  }
}

.client-type-option {
  flex: 1;
  cursor: pointer;
}

.client-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-type-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.client-type-option input:checked + .client-type-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.04);
  color: var(--color-blue);
}

.client-type-label svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.client-type-option input:checked + .client-type-label svg {
  opacity: 1;
  color: var(--color-blue);
}

/* Mode de paiement */
.payment-mode-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payment-mode-option {
  cursor: pointer;
}

.payment-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-mode-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.payment-mode-option input:checked + .payment-mode-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.04);
}

.payment-mode-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.payment-mode-text strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.payment-mode-text small {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Sélecteur de mode de financement (CPF / Direct) */
.funding-mode-selector {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 500px) {
  .funding-mode-selector {
    flex-direction: column;
  }
}

.funding-mode-option {
  flex: 1;
  cursor: pointer;
}

.funding-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.funding-mode-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.funding-mode-option:hover .funding-mode-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.funding-mode-option input:checked + .funding-mode-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(47, 102, 246, 0.1);
}

.funding-mode-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.funding-mode-text strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.funding-mode-text small {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Sélecteur de formation */
.formation-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.formation-option {
  cursor: pointer;
}

.formation-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.formation-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.formation-option:hover .formation-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.formation-option input:checked + .formation-label {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(47, 102, 246, 0.1);
}

.formation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.formation-header strong {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
}

.formation-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-blue);
  white-space: nowrap;
}

.formation-label small {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.formation-label small strong {
  color: #1f2937;
  font-weight: 600;
}

/* Récapitulatif et bouton */
.preselection-footer-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.preselection-summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.preselection-summary .price-label {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.preselection-summary .price-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-blue);
}

.preselection-summary .price-details {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-left: 0.25rem;
}

.preselection-footer {
  margin-top: 1.5rem;
}

.preselection-footer .button.primary {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* Sessions header avec bouton retour */
.sessions-header {
  margin-bottom: 0.5rem;
}

/* Rappel formation sélectionnée */
.formation-reminder {
  background: linear-gradient(135deg, rgba(47, 102, 246, 0.08) 0%, rgba(47, 102, 246, 0.04) 100%);
  border: 1px solid rgba(47, 102, 246, 0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.formation-reminder-label {
  color: #667085;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formation-reminder-name {
  color: var(--color-blue);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ===========================
   FIN PRÉ-SÉLECTION
   =========================== */

.panel h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.panel-lead {
  margin: -0.4rem 0 0.85rem;
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 28rem;
}

/* Sessions view: le texte d'info doit prendre toute la largeur */
#sessionsFilterInfo {
  max-width: none;
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.form-header #backToSessions {
  flex-shrink: 0;
}

.form-header-title {
  margin-bottom: 1rem;
}

.form-header-title h2 {
  margin: 0;
}

.form-header-title .panel-lead {
  margin: 0.5rem 0 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #1f2937;
  width: 100%;
}

.field label,
.field span {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field input,
.field textarea,
.field select {
  border-radius: 14px;
  border: 1px solid rgba(210, 215, 229, 0.8);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #101828;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a1aec6;
  opacity: 1;
}

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

/* Multiselect Dropdown (liste déroulante multi-sélection) */
.multiselect-dropdown {
  position: relative;
  width: 100%;
}

.multiselect-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid rgba(47, 102, 246, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.multiselect-dropdown-trigger:hover {
  border-color: rgba(47, 102, 246, 0.4);
}

.multiselect-dropdown-trigger:focus {
  outline: none;
  border-color: rgba(47, 102, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(47, 102, 246, 0.14);
}

.multiselect-dropdown.open .multiselect-dropdown-trigger {
  border-color: rgba(47, 102, 246, 0.6);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.multiselect-dropdown-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiselect-dropdown-text.placeholder {
  color: #9ca3af;
}

.multiselect-dropdown-arrow {
  flex-shrink: 0;
  margin-left: 0.5rem;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.multiselect-dropdown.open .multiselect-dropdown-arrow {
  transform: rotate(180deg);
}

.multiselect-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(47, 102, 246, 0.3);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 8px 24px rgba(47, 102, 246, 0.12);
  z-index: 100;
}

.multiselect-dropdown.open .multiselect-dropdown-panel {
  display: block;
}

.multiselect-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
  margin: 0;
  font-weight: 400;
}

.multiselect-dropdown-item:hover {
  background-color: rgba(47, 102, 246, 0.06);
}

.multiselect-dropdown-item:has(input:checked) {
  background-color: rgba(47, 102, 246, 0.1);
}

.multiselect-dropdown-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2f66f6;
  cursor: pointer;
  flex-shrink: 0;
}

.multiselect-dropdown-item span {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text);
}

.multiselect-dropdown-item:has(input:checked) span {
  color: #1d53f0;
  font-weight: 500;
}

.multiselect-dropdown-item-autre {
  border-top: 1px dashed rgba(47, 102, 246, 0.2);
}

/* Champ "Autre" en pleine largeur sous le dropdown */
.autre-field {
  margin-top: 1rem;
  width: 100% !important;
  max-width: 100% !important;
  flex-basis: 100% !important;
}

/* S'assurer que autre-field prend toute la largeur dans tous les contextes */
.cpf-fields-content .autre-field,
.learner-card-fields .autre-field,
.conditional-form .autre-field {
  grid-column: 1 / -1;
  width: 100%;
}

.autre-field textarea {
  min-height: 100px;
  width: 100%;
}

.field label small {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.85em;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(47, 102, 246, 0.6);
  box-shadow: 0 8px 20px rgba(47, 102, 246, 0.12),
    0 0 0 3px rgba(47, 102, 246, 0.14);
  background: #ffffff;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1rem;
}

.sessions-list.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--color-muted);
  text-align: center;
}

.sessions-list.empty p {
  margin: 0;
}

/* Loading spinner pour les sessions */
.loading-sessions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.loading-sessions p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.session-card {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
}

.session-card:hover {
  border-color: rgba(47, 102, 246, 0.6);
  box-shadow: 0 18px 36px rgba(47, 102, 246, 0.12);
  transform: translateY(-2px);
}

.session-card.selected {
  border-color: var(--color-blue);
  box-shadow: 0 18px 38px rgba(47, 102, 246, 0.18);
  background: rgba(47, 102, 246, 0.02);
}

.session-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.session-card-footer {
  display: flex;
  align-items: center;
}

.session-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  flex: 1;
}

/* Date comme titre principal de la carte session */
.session-date-title {
  font-size: 1.15rem;
  color: var(--color-blue);
}

/* Dates complètes de la formation (e-learning + présentiel) */
.session-full-dates {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
}

/* Label discret "(Présentiel)" après la date */
.session-dates-label {
  font-size: 0.85em;
  color: #9ca3af;
  font-weight: normal;
}

.session-date-badge {
  background: rgba(47, 102, 246, 0.12);
  color: #1f2937;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.session-price {
  color: #667085;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.session-capacity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  width: fit-content;
  align-self: flex-start;
}

.session-capacity-badge.danger {
  color: #b91c1c;
  background: rgba(248, 113, 113, 0.18);
}


/* Badge d'urgence pour les inscriptions */
.session-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.session-urgency-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.session-urgency-badge.critical {
  color: #fff;
  background: #dc2626;
  animation: pulse-urgency 1.5s ease-in-out infinite;
}

.session-urgency-badge.warning {
  color: #92400e;
  background: rgba(251, 191, 36, 0.25);
}

.session-urgency-badge.info {
  color: #1e40af;
  background: rgba(59, 130, 246, 0.15);
}

@keyframes pulse-urgency {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.session-card.registration-closed {
  opacity: 0.7;
  cursor: default;
}

.session-card.registration-closed:hover {
  border-color: rgba(16, 24, 40, 0.08);
  box-shadow: none;
  transform: none;
}

.session-link-icon.disabled {
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.session-summary .session-description {
  margin: 1rem 0 0;
  color: var(--color-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.session-price-summary {
  margin: 0.5rem 0 0;
  color: #0f172a;
  font-weight: 700;
  font-size: 1.1rem;
}

.session-capacity-summary {
  margin-top: 0.75rem;
  display: inline-flex;
}
}

.session-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem;
  opacity: 0.5;
}

.session-link-icon:hover {
  color: #667085;
  opacity: 1;
  transform: translateX(2px);
}

/* Formulaire multi-étapes */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.client-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.client-type-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-type-option:hover {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.client-type-option input[type="radio"] {
  margin-right: 0.75rem;
}

.client-type-option input[type="radio"]:checked + .client-type-label {
  color: var(--color-blue);
  font-weight: 600;
}

.client-type-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.conditional-form {
  display: none;
}

.conditional-form.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-auto-flow: dense;
  gap: 1rem 1.25rem;
}

.conditional-form .field.full-width {
  grid-column: 1 / -1;
}

/* Sélecteur de mode de paiement (pour particuliers) */
.payment-mode-selector {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid rgba(47, 102, 246, 0.2);
  border-radius: 18px;
  background: rgba(47, 102, 246, 0.03);
  margin-bottom: 0.5rem;
}

.payment-mode-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.payment-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.payment-mode-option {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.payment-mode-option:hover {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.payment-mode-option input[type="radio"] {
  margin-right: 0.6rem;
  accent-color: var(--color-blue);
}

.payment-mode-option input[type="radio"]:checked + .payment-mode-label {
  color: var(--color-blue);
  font-weight: 600;
}

.payment-mode-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.payment-mode-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.payment-mode-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
}

.payment-mode-text small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  opacity: 0.9;
}

.payment-mode-option input[type="radio"]:checked + .payment-mode-label .payment-mode-text small {
  color: var(--color-blue);
  opacity: 0.8;
}

/* Bloc champs CPF unifié (bleu) */
.cpf-fields-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px dashed var(--color-blue);
  border-radius: 18px;
  background: rgba(47, 102, 246, 0.04);
  width: 100%;
  box-sizing: border-box;
}

/* Sous-sections CPF */
.cpf-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(47, 102, 246, 0.15);
  margin-bottom: 0.5rem;
}

.cpf-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cpf-section h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-blue);
}

.cpf-section-hint {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Prénom / Nom côte à côte */
.cpf-identity-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.cpf-identity-row .field {
  flex: 1;
}

/* Champs téléphone */
.phone-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.phone-country-field {
  flex: 0 0 130px;
}

.phone-number-field {
  flex: 1;
}

.phone-input-group select {
  padding: 0.75rem 0.5rem;
}

.cpf-fields-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cpf-fields-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-blue);
}

.cpf-fields-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.cpf-fields-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.field-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.25rem;
  font-weight: 500;
}

.cpf-cv-section,
.cpf-diploma-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.06);
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

.cpf-cv-section h4,
.cpf-diploma-section h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #047857;
}

.section-hint {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Champs dans les sections CPF - pleine largeur */
.cpf-cv-section .field,
.cpf-cv-section .checkbox,
.cpf-diploma-section .field,
.cpf-diploma-section .checkbox {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Input LinkedIn et autres inputs dans sections CPF */
.cpf-cv-section input[type="text"],
.cpf-cv-section input[type="file"],
.cpf-diploma-section input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cpf-linkedin-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fff8e6;
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}

.field-notice {
  margin: 0;
  font-size: 0.9rem;
  color: #92400e;
  font-weight: 500;
}

@media (max-width: 540px) {
  .payment-mode-options {
    grid-template-columns: 1fr;
  }
}

.individual-participants {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px dashed rgba(47, 102, 246, 0.35);
  border-radius: 18px;
  background: rgba(47, 102, 246, 0.04);
}

.individual-participants-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.individual-participants-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #1f2937;
}

.individual-participants-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.individual-participants-actions {
  display: flex;
  justify-content: flex-start;
}

.individual-participants-actions .button {
  min-width: max-content;
}

.individual-participants #individualParticipantsContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.company-learners {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px dashed rgba(47, 102, 246, 0.35);
  border-radius: 18px;
  background: rgba(47, 102, 246, 0.04);
}

.company-learners-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.company-learners-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #1f2937;
}

.company-learners-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.company-learners #learnersContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.learner-card {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: #ffffff;
}

.learner-card-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-flow: dense;
  gap: 1rem 1.25rem;
}

.learner-card-fields .field.full-width {
  grid-column: 1 / -1;
}

.learner-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.learner-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text);
}

.learner-card-header button {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.learner-card-header button:hover {
  opacity: 0.7;
}

.form-footer-inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.form-footer-inline .button {
  min-width: max-content;
}

.form-footer-inline .button.primary {
  margin-left: auto;
}

form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
}

form fieldset:first-of-type {
  border-top: none;
  padding-top: 0;
}

form fieldset + fieldset {
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(210, 215, 229, 0.6);
}

form legend {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  grid-column: 1 / -1;
}

.session-summary {
  grid-column: 1 / -1;
  border-radius: 18px;
  border: 1px dashed rgba(47, 102, 246, 0.35);
  background: rgba(47, 102, 246, 0.07);
  padding: 1.75rem;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.session-summary strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--color-blue);
}

.session-summary p {
  margin: 0.25rem 0;
}

/* === MODE CPF RÉTROACTIF === */
.cpf-retroactif-summary {
  text-align: center;
}

.cpf-retroactif-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  border: 1px solid #f59e0b;
}

.cpf-retroactif-summary strong {
  display: block;
  color: var(--color-blue);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cpf-retroactif-info {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.muted {
  color: var(--color-muted);
}

.checkbox {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--color-muted);
  padding: 0.4rem 0 0;
}

.checkbox input {
  margin-top: 0.25rem;
  accent-color: var(--color-blue);
  width: 18px;
  height: 18px;
}

.legend-subtitle {
  margin: -0.4rem 0 0.85rem;
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.55;
  max-width: 26rem;
}

.checkbox span {
  line-height: 1.45;
}

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.form-message {
  font-size: 0.95rem;
  font-weight: 600;
}

.form-message.success {
  color: #15803d;
}

.form-message.error {
  color: #dc2626;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .content {
    padding: 2.5rem 0 3rem;
  }

  form fieldset {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .container {
    width: calc(100% - 2rem);
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .button {
    width: 100%;
  }

}

/* Tutoriel Mon Compte Formation */
.mcf-tutorial {
  padding: 1rem;
}

.mcf-tutorial-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.mcf-tutorial-logo img {
  max-width: 180px;
  height: auto;
}

.mcf-tutorial-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.mcf-success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.mcf-tutorial-header h2 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  color: #047857;
}

.mcf-lead {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin: 0;
}

.mcf-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.mcf-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.mcf-step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mcf-step-content {
  flex: 1;
}

.mcf-step-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #1f2937;
}

.mcf-step-content p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.mcf-button {
  margin-top: 0.75rem;
}

.mcf-footer {
  text-align: center;
  padding: 1.5rem;
  background: rgba(16, 185, 129, 0.06);
  border-radius: 16px;
  border: 1px dashed rgba(16, 185, 129, 0.3);
}

.mcf-footer p {
  margin: 0 0 0.5rem;
  color: #1f2937;
}

.mcf-footer p:last-child {
  margin-bottom: 0;
}

.mcf-contact {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.mcf-contact a {
  color: var(--color-blue);
  text-decoration: underline;
}

.mcf-tuto-link {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: underline;
}

.mcf-tuto-link:hover {
  text-decoration: none;
}

/* Nouveaux styles MCF - FranceConnect+ */
.mcf-email-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e40af;
}

.mcf-email-icon {
  font-size: 1.1rem;
}

.mcf-important-notice {
  padding: 0.875rem 1rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.5;
}

.mcf-options-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.mcf-options-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #374151;
}

.mcf-help-box {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-align: center;
}

.mcf-help-box p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #475569;
}

.mcf-help-button {
  font-size: 0.9rem !important;
}

.mcf-substeps {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}

.mcf-substeps li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
}

.mcf-presentiel-hint {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
}

.mcf-validation-notice {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #047857;
}

.mcf-footer-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

/* Modal FranceConnect+ */
.fc-modal {
  z-index: 1001;
}

.fc-modal-content {
  max-width: 1000px !important;
  width: 95% !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.fc-modal-header {
  padding: 1.5rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.fc-modal-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #1f2937;
}

.fc-modal-header p {
  margin: 0 0 0.75rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.fc-intro-options {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.fc-intro-options li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.fc-intro-options li:last-child {
  border-bottom: none;
}

.fc-intro-options strong {
  color: #1f2937;
}

.fc-tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
}

.fc-tab-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.fc-tab-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.fc-tab-desc {
  font-size: 0.8rem;
  font-weight: 400;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.fc-tab-button.active .fc-tab-desc {
  color: #6b7280;
}

.fc-tab-button:hover {
  color: #374151;
  background: rgba(0, 0, 0, 0.02);
}

.fc-tab-button.active {
  color: var(--color-blue);
  border-bottom-color: var(--color-blue);
  background: white;
}

.fc-tab-icon {
  font-size: 1.25rem;
}

.fc-tab-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #10b981;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fc-tab-contents {
  padding: 1.5rem 2rem;
}

.fc-tab-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fc-prereq {
  padding: 1rem;
  background: #eff6ff;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.fc-prereq h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #1e40af;
}

.fc-prereq ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.fc-prereq li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #374151;
}

.fc-video-placeholder {
  margin-bottom: 1.5rem;
}

.fc-video-label {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fc-video-embed {
  aspect-ratio: 16 / 9;
  background: #1f2937;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fc-video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.fc-video-coming-soon {
  color: #9ca3af;
  font-size: 0.95rem;
}

.fc-video-credit {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
  text-align: right;
}

.fc-steps-detail {
  margin-bottom: 1.25rem;
}

.fc-steps-detail h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #1f2937;
}

.fc-step-detail {
  display: flex;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.fc-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-step-text {
  flex: 1;
}

.fc-step-text strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: #1f2937;
}

.fc-step-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

.fc-alternative,
.fc-cni-check {
  padding: 0.875rem 1rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.5;
}

.fc-alternative strong,
.fc-cni-check strong {
  color: #78350f;
}

.fc-cni-check p {
  margin: 0.5rem 0 0;
}

.fc-modal-footer {
  padding: 1rem 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Responsive pour le modal FranceConnect+ */
@media (max-width: 600px) {
  .fc-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .fc-tab-button {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .fc-tab-icon {
    font-size: 1.5rem;
  }

  .fc-tab-contents {
    padding: 1.25rem 1rem;
  }

  .fc-modal-header {
    padding: 1.25rem 1rem 1rem;
  }

  .fc-modal-header h2 {
    font-size: 1.25rem;
  }
}

/* Messages UX - Paiement B2B/Stripe */
.payment-urgency-notice {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  text-align: center;
}

.urgency-message {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #92400e;
  line-height: 1.5;
}

.assistance-link {
  margin-top: 1.25rem;
  text-align: center;
}

.assistance-link p {
  margin: 0;
  font-size: 0.85rem;
}

.assistance-link a {
  color: var(--color-blue);
  text-decoration: underline;
}

/* Question Oui/Non pour diplôme CPF */
.diploma-question {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.question-label {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.yes-no-options {
  display: flex;
  gap: 1rem;
}

.yes-no-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  font-weight: 500;
}

.yes-no-option:hover {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.yes-no-option input[type="radio"] {
  accent-color: var(--color-blue);
  width: 18px;
  height: 18px;
}

.yes-no-option input[type="radio"]:checked + span {
  color: var(--color-blue);
  font-weight: 600;
}

.yes-no-option:has(input[type="radio"]:checked) {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.06);
}

/* Boutons Oui/Non compacts (conformité) */
.yes-no-compact {
  gap: 0.5rem;
}

.yes-no-compact .yes-no-option {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  min-width: 0;
}

/* Radio list (niveau IA) */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  font-size: 0.95rem;
  line-height: 1.4;
}

.radio-list-item:hover {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.03);
}

.radio-list-item input[type="radio"] {
  accent-color: var(--color-blue);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.radio-list-item:has(input[type="radio"]:checked) {
  border-color: var(--color-blue);
  background: rgba(47, 102, 246, 0.06);
}

.radio-list-item input[type="radio"]:checked + span {
  color: var(--color-blue);
  font-weight: 600;
}

.yes-no-compact .yes-no-option input[type="radio"] {
  width: 15px;
  height: 15px;
}

/* Textarea adaptation handicap - non redimensionnable */
#cpfHandicapAdaptation,
#individualHandicapAdaptation,
[id^="learnerHandicapAdaptation"] {
  width: 100%;
  resize: none;
}

/* Auto-fill checkbox pour apprenant 1 (B2B) */
.autofill-option {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  border-radius: 10px;
}

.autofill-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #047857;
  font-weight: 500;
}

.autofill-checkbox input[type="checkbox"] {
  accent-color: #10b981;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.autofill-checkbox span {
  line-height: 1.4;
}

/* ============================================
   MODAL - Choix mode paiement Alma
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: var(--color-text);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2f66f6 0%, #1d53f0 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.modal-subtitle {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0;
}

.modal-body {
  padding: 0 2rem 1.5rem;
}

.payment-total {
  text-align: center;
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.payment-total strong {
  color: var(--color-text);
  font-size: 1.25rem;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payment-options.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.payment-option {
  display: block;
  cursor: pointer;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-option-content {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.payment-option:hover .payment-option-content {
  border-color: var(--color-border-strong);
  background: #fafbff;
}

.payment-option input[type="radio"]:checked + .payment-option-content {
  border-color: var(--color-blue);
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgba(47, 102, 246, 0.15);
}

.payment-option-title {
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
}

.payment-option-detail {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.payment-option-fees {
  display: block;
  font-size: 0.8rem;
  color: #b45309;
  background: #fef3c7;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.payment-option-fees strong {
  color: #92400e;
}

.payment-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 1.5rem 0 0;
}

.payment-secure-note svg {
  color: #10b981;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-footer .button {
  flex: 1;
}

@media (max-width: 500px) {
  .modal-content {
    border-radius: 12px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }
}

/* ============================================
   MODAL - Paiement SEPA (B2C Particuliers)
   ============================================ */

.sepa-modal {
  max-width: 520px;
}

.sepa-icon {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.sepa-info-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.sepa-info-box h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #166534;
  margin: 0 0 0.5rem;
}

.sepa-info-text {
  font-size: 0.9rem;
  color: #15803d;
  margin: 0;
}

.sepa-echeancier {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.sepa-echeancier td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.sepa-echeancier tr:last-child td {
  border-bottom: none;
}

.echeancier-label {
  color: var(--color-text);
  font-weight: 500;
}

.echeancier-montant {
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.echeancier-date {
  color: var(--color-muted);
  text-align: right;
  font-size: 0.9rem;
}

.echeancier-total {
  background: #f8fafc;
}

.echeancier-total td {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 2px solid var(--color-border);
  border-bottom: none;
}

.sepa-consent {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.sepa-consent.shake {
  animation: shake 0.5s ease-in-out;
  border-color: #f59e0b;
  background: #fef3c7;
}

.sepa-consent-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
}

.sepa-consent-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--color-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.sepa-consent-label span {
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .sepa-echeancier td {
    padding: 0.5rem 0.25rem;
    font-size: 0.9rem;
  }

  .echeancier-date {
    font-size: 0.8rem;
  }

  .sepa-consent-label span {
    font-size: 0.85rem;
  }
}

/* ============================================
   RGPD - Checkbox Consentement
   ============================================ */

.rgpd-consent {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 1rem;
  grid-column: 1 / -1;
}

.rgpd-consent-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
}

.rgpd-consent-label input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--color-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.rgpd-consent-label span {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}

.rgpd-consent-label .privacy-link {
  color: var(--color-blue);
  text-decoration: underline;
  font-weight: 500;
}

.rgpd-consent-label .privacy-link:hover {
  color: #1d53f0;
}

.rgpd-consent.error {
  border-color: #ef4444;
  background: #fef2f2;
  animation: shake 0.5s ease-in-out;
}

.rgpd-consent.error .rgpd-consent-label span {
  color: #991b1b;
}

@media (max-width: 500px) {
  .rgpd-consent-label span {
    font-size: 0.85rem;
  }
}

