/* Webiome Forms Styles */
#webiome-forms-container {
  max-width: 400px;
  margin: 0 auto;
  font-family: "Jost", sans-serif;
}

.webiome-form-wrapper {
  display: none;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

.webiome-form-wrapper.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

.webiome-form-title {
  color: #1e1b35;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
}

.webiome-field-group {
  padding: 0.75rem;
}

.webiome-field-group > label {
  display: flex;
  color: #1e1b35;
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 14px;
}

.webiome-field-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: "Jost", sans-serif;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background-color: #fff;
}

.webiome-field-group input:focus {
  outline: none;
  border-color: #78b41e;
  box-shadow: 0 0 0 2px rgba(120, 180, 30, 0.1);
}

.webiome-field-group input.has_error {
  border-color: #c22722;
}

.webiome-field-group small {
  display: block;
  color: #666;
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.4;
}

.webiome-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: "Jost", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.webiome-btn-primary {
  background-color: #78b41e;
  color: white;
}

.webiome-btn-primary:hover:not(:disabled) {
  background-color: #6ba01a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(120, 180, 30, 0.3);
}

.webiome-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.webiome-form-footer {
  margin-top: 25px;
  text-align: center;
}

.webiome-link {
  color: #78b41e !important;
  text-decoration: none;
  font-size: 14px;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.webiome-link:hover {
  color: #6ba01a;
  text-decoration: underline;
}

.webiome-message {
  padding: 15px 20px;
  border-radius: 4px;
  margin: 15px 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.webiome-success {
  color: #78b41e;
}

.webiome-error {
  background-color: #f8d7da;
  color: #c22722;
  border: 1px solid #c22722;
}

.webiome-loading {
  opacity: 0.7;
  pointer-events: none;
}

.webiome-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading spinner */
.webiome-btn:disabled::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Indicateur de force du mot de passe */
.password-strength {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.password-strength.weak {
  background-color: rgba(194, 39, 34, 0.1);
  color: #c22722;
  border: 1px solid rgba(194, 39, 34, 0.3);
}

.password-strength.medium {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ff8c00;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.password-strength.strong {
  background-color: rgba(120, 180, 30, 0.1);
  color: #78b41e;
  border: 1px solid rgba(120, 180, 30, 0.3);
}

/* États de validation des champs */
.webiome-field-group.webiome-error input {
  border-color: #c22722;
  box-shadow: 0 0 0 2px rgba(194, 39, 34, 0.1);
}

.webiome-field-group.webiome-success input {
  border-color: #78b41e;
  box-shadow: 0 0 0 2px rgba(120, 180, 30, 0.1);
}

.webiome-field-error {
  color: #c22722;
  font-size: 12px;
  margin-top: 5px;
  display: flex;
  align-items: center;
}

.webiome-field-error:before {
  content: "⚠";
  margin-right: 5px;
  font-size: 14px;
}

/* Animation de focus */
.webiome-field-group.focused label {
  color: #78b41e;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.webiome-field-group.focused input {
  border-color: #78b41e;
  box-shadow: 0 0 0 2px rgba(120, 180, 30, 0.1);
}

/* Animation des messages */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#webiome-messages {
  animation: slideInDown 0.3s ease-out;
  padding: 0.25rem;
  text-align: center;
}

/* Loading state pour les boutons */
.webiome-btn:disabled {
  position: relative;
  color: transparent !important;
}

.webiome-btn:disabled:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

/* Message de succès après inscription */
.webiome-success-container {
  animation: fadeIn 0.5s ease-in;
}

.webiome-success-container h3 {
  font-family: "Jost", sans-serif;
  font-weight: 600;
  margin: 0 0 15px 0;
}

.webiome-success-container p {
  font-family: "Jost", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* Protection contre la double soumission */
.webiome-form.submitting {
  pointer-events: none;
  opacity: 0.7;
}

.webiome-form.submitting .webiome-btn {
  cursor: not-allowed;
}

/* Amélioration de l'état de chargement */
.webiome-loading .webiome-btn {
  position: relative;
  color: transparent !important;
}

.webiome-loading .webiome-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
  #webiome-forms-container {
    max-width: 100%;
    padding: 0 15px;
  }

  .webiome-form-wrapper {
    padding: 20px;
    margin: 10px 0;
  }

  .webiome-form-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .webiome-field-group input {
    padding: 10px 12px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Accessibility improvements */
.webiome-field-group input:focus-visible {
  outline: 2px solid #78b41e;
  outline-offset: 2px;
}

.webiome-btn:focus-visible {
  outline: 2px solid #1e1b35;
  outline-offset: 2px;
}

/* Form validation styles */
.webiome-field-group.error input {
  border-color: #c22722;
  background-color: #fff5f5;
}

.webiome-field-group.success input {
  border-color: #78b41e;
  background-color: #f0fff4;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .webiome-form {
    border: 2px solid #1e1b35;
  }

  .webiome-btn-primary {
    border: 2px solid #1e1b35;
  }

  .webiome-field-group input {
    border: 2px solid #1e1b35;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .webiome-form-wrapper,
  .webiome-field-group input,
  .webiome-btn,
  #webiome-messages,
  .password-strength {
    transition: none !important;
    animation: none !important;
  }
}

/* Custom learndash*/

.learndash-wrapper {
  a {
    color: #495255 !important;
  }
}
.learndash-wrapper .ld-table-list .ld-table-list-header {
  font-weight: bold;
}
.learndash-wrapper
  .ld-button:hover:not([disabled]):not(.ld-button-transparent):not(
    .ld--ignore-inline-css
  ),
#learndash-tooltips .ld-tooltip:after,
#learndash-tooltips .ld-tooltip,
.ld-tooltip:not(.ld-tooltip--modern) [role="tooltip"],
.learndash-wrapper .ld-primary-background,
.learndash-wrapper .btn-join:not(.ld--ignore-inline-css),
.learndash-wrapper #btn-join:not(.ld--ignore-inline-css),
.learndash-wrapper
  .ld-button:not([disabled]):not(.ld-button-reverse):not(
    .ld-button-transparent
  ):not(.ld--ignore-inline-css),
.learndash-wrapper .ld-expand-button:not([disabled]),
.learndash-wrapper
  .wpProQuiz_content
  .wpProQuiz_button:not([disabled]):not(.wpProQuiz_button_reShowQuestion):not(
    .wpProQuiz_button_restartQuiz
  ),
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button2:not([disabled]),
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading,
.learndash-wrapper .ld-focus-comments .form-submit #submit,
.learndash-wrapper .ld-login-modal input[type="submit"]:not([disabled]),
.learndash-wrapper .ld-login-modal .ld-login-modal-register:not([disabled]),
.learndash-wrapper
  .wpProQuiz_content
  .wpProQuiz_certificate
  a.btn-blue:not([disabled]),
.learndash-wrapper
  .ld-focus
  .ld-focus-header
  .ld-user-menu
  .ld-user-menu-items
  a:not([disabled]),
#wpProQuiz_user_content table.wp-list-table thead th,
#wpProQuiz_overlay_close:not([disabled]),
.learndash-wrapper
  .ld-expand-button.ld-button-alternate:not([disabled])
  .ld-icon {
  color: #fff !important;
  font-weight: bold !important;
}
.learndash-wrapper
  .ld-table-list
  .ld-table-list-item-preview
  .ld-table-list-columns
  .ld-table-list-column {
  font-size: 0.8rem !important;
}
.learndash-wrapper .ld-table-list .ld-table-list-items {
  font-size: 0.8rem !important;
}

main.sfwd-courses {
  margin-bottom: 12rem;
}
.ld-accordion__item-attribute-icon--progress,
.ld-accordion__item-icon--progress {
  color: #6ba01a !important;
}
--ld-color-brand-primary: #78b41e;
.learndash-wrapper
  .wpProQuiz_content
  .wpProQuiz_questionListItem:not(.ld-sortable__item)
  label.is-selected,
.learndash-wrapper
  .wpProQuiz_content
  .wpProQuiz_questionListItem:not(.ld-sortable__item)
  label:focus-within {
  background-color: #78b41e !important;
}
.learndash-wrapper .wpProQuiz_content a#quiz_continue_link {
  color: #fff !important;
}
.ld-profile-stats {
  display: none !important;
}

* {
  accent-color: #78b41e;
}
