/* mpwp-frontend.css */

.mpwp-profile-container {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 20px !important;
  padding: 20px !important;
  /* background: #f9f9f9; */
}

.mpwp-profile-left {
  width: 40% !important;
  height: 300px !important;
  border-radius: 10px !important;
}

.mpwp-profile-right {
  width: 60% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;

  .mpwp-profile-top {
    width: 100% !important;
    background: none !important;
    border: none !important;
    /* height: 60px; */
    border-radius: 10px !important;
  }

  .mpwp-profile-bottom {
    width: 100% !important;
    /* height: 180px; */
    border-radius: 10px !important;

    h2 {
      font-family: "Poppins", Sans-serif !important;
      font-size: 24px !important;
      font-weight: 400 !important;
      color: #000000 !important;
    }

    hr {
      border: none !important;
      border-top: 1px solid #333 !important;
      height: 5px !important;
    }
  }
}

/* ==========================================================================
   MPWP - Styles de l'accordéon
   ========================================================================== */

/* Conteneur principal de l'accordéon */
.mpwp-measurement-accordion {
  margin: 25px 0 !important;
  border-bottom: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important; */
  overflow: hidden !important;
}

/* En-tête de l'accordéon */
.mpwp-accordion-header {
  padding: 20px !important;
  /*background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0; */
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.mpwp-accordion-header:hover {
  /* background: #f1f3f4; */
}

.mpwp-accordion-title {
  font-family: "Poppins", Sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin: 0 !important;
  color: #7a7a7a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.mpwp-accordion-icon {
  margin-right: 10px !important;
  font-size: 18px !important;
}

.mpwp-accordion-toggle {
  font-size: 20px !important;
  font-weight: 300 !important;
  color: #666 !important;
  transition: transform 0.3s ease !important;
}

/* État ouvert de l'accordéon */
.mpwp-measurement-accordion.active .mpwp-accordion-toggle {
  transform: rotate(45deg) !important;
  color: #986c4a !important;
}

.mpwp-measurement-accordion.active .mpwp-accordion-header {
  background: none !important;
  border-bottom-color: var(--mpwp-primary-color, #2271b1) !important;
}

.mpwp-measurement-accordion.active .mpwp-accordion-title {
  color: #986c4a !important;
}

.mpwp-measurement-accordion.active .mpwp-accordion-icon {
  color: #ffffff !important;
}

/* Contenu de l'accordéon */
.mpwp-accordion-content {
  padding: 0px !important;
  max-height: 180px !important;
  overflow: hidden !important;
  transition: all 0.4s ease !important;
  background: #ffffff !important;
}

.mpwp-measurement-accordion.active .mpwp-accordion-content {
  padding: 0px 20px 20px !important;
  /* max-height: 300px; */
}

/* Description à l'intérieur de l'accordéon */
.mpwp-accordion-content .mpwp-measurement-description {
  margin-bottom: 20px !important;
  /* text-align: center; */
}

.mpwp-accordion-content .mpwp-measurement-description p {
  /* margin: 0; */
  font-family: "Poppins", Sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #986c4a !important;
}

/* Bouton à l'intérieur de l'accordéon */
.mpwp-accordion-content .mpwp-open-popup {
  font-family: "Poppins", Sans-serif !important;
  display: block !important;
  /* width: 100%; */
  /* background: none; */
  color: #986c4a !important;
  border: solid 1px #986c4a !important;
  padding: 14px 24px !important;
  /* border-radius: 6px !important; */
  /* font-size: 15px !important; */
  /* font-weight: 600 !important; */
  /* text-transform: uppercase; */
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  /* box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3); */
  background-color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  fill: #986c4a !important;
  color: #986c4a !important;
  border-style: solid !important;
  border-width: 1px 1px 1px 1px !important;
  border-color: #986c4a !important;
}

/* .mpwp-accordion-content .mpwp-open-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.4);
    background: linear-gradient(135deg, var(--mpwp-primary-dark, #135e96) 0%, var(--mpwp-primary-darker, #0d4b7a) 100%);
} */

/* Effet de brillance au survol */
/* .mpwp-accordion-content .mpwp-open-popup::before {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
} */

.mpwp-accordion-content .mpwp-open-popup:hover::before {
  left: 100% !important;
}

/* ==========================================================================
   Animation d'ouverture/fermeture
   ========================================================================== */

@keyframes mpwp-accordionSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mpwp-measurement-accordion.active .mpwp-accordion-content {
  animation: mpwp-accordionSlideDown 0.3s ease-out;
}

/* ==========================================================================
   États de l'accordéon
   ========================================================================== */

/* Accordéon fermé par défaut */
.mpwp-measurement-accordion:not(.active) .mpwp-accordion-content {
  display: none;
}

/* Alternative avec hauteur max pour animation fluide */
.mpwp-measurement-accordion .mpwp-accordion-content {
  transition: max-height 0.4s ease, padding 0.4s ease;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .mpwp-measurement-accordion {
    margin: 20px 0;
  }

  .mpwp-accordion-header {
    padding: 15px;
  }

  .mpwp-accordion-title {
    font-size: 14px;
  }

  .mpwp-accordion-icon {
    font-size: 16px;
    margin-right: 8px;
  }

  .mpwp-measurement-accordion.active .mpwp-accordion-content {
    padding: 20px;
  }

  .mpwp-accordion-content .mpwp-open-popup {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .mpwp-accordion-header {
    padding: 12px;
  }

  .mpwp-accordion-title {
    font-size: 13px;
    letter-spacing: 0.3px;
  }

  .mpwp-measurement-accordion.active .mpwp-accordion-content {
    padding: 15px;
  }

  .mpwp-accordion-content .mpwp-measurement-description p {
    font-size: 13px;
  }
}

/* Container du bouton mensurations */
.mpwp-measurement-button-container {
  font-family: "Poppins", Sans-serif;
  font-size: medium;
  margin: 20px 0;
  padding: 15px;
  /* background: #f8f8f8; */
  /* border-radius: 8px; */
  border-top: 1px rgb(220, 160, 64) solid;
  border-bottom: 1px rgb(220, 160, 64) solid;
  /* border-left: 4px solid #2271b1; */

  .mpwp-measurement-description {
    color: rgb(220, 160, 64);
  }
}

.mpwp-measurement-button-container .mpwp-open-popup {
  background-color: white;
  color: rgb(220, 160, 64);
  border: rgb(220, 160, 64) solid 1px;
  padding: 12px 24px;
  /* border-radius: 4px; */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.5s ease;
  width: 40%;
  text-align: center;
}

.mpwp-measurement-button-container .mpwp-open-popup:hover {
  background-color: rgb(220, 160, 64);
  color: white;
}

/* Overlay et Popup Modal */
/* ==========================================================================
   MPWP - Modal Overlay et Positionnement
   ========================================================================== */

/* Overlay du modal */
.mpwp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(5px);
  animation: mpwp-fadeIn 0.3s ease-out;
}

/* Contenu du modal */
.mpwp-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: mpwp-slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

/* Animation d'entrée */
@keyframes mpwp-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mpwp-slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation de sortie */
.mpwp-modal-overlay.closing {
  animation: mpwp-fadeOut 0.2s ease-in forwards;
}

.mpwp-modal-overlay.closing .mpwp-modal {
  animation: mpwp-slideOut 0.2s ease-in forwards;
}

@keyframes mpwp-fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes mpwp-slideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
}

/* En-tête du modal */
.mpwp-modal-header {
  padding: 24px 30px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.mpwp-modal-title {
  margin: 0;
  color: #2c3338;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

/* Bouton de fermeture */
.mpwp-modal-close {
  background: none !important;
  border: none !important;
  font-size: 28px !important;
  cursor: pointer !important;
  color: #666 !important;
  padding: 5px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
  margin: -5px -5px -5px 0 !important;
}

.mpwp-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
  transform: rotate(90deg);
}

.mpwp-modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

/* Corps du modal */
.mpwp-modal-body {
  font-family: poppins, sans-serif !important;
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  background: #fff;
}

/* Pied du modal (pour les futurs boutons) */
.mpwp-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive Design du Modal
   ========================================================================== */

@media (max-width: 768px) {
  .mpwp-modal {
    width: 95%;
    max-width: none;
    margin: 20px;
    max-height: 85vh;
  }

  .mpwp-modal-header {
    padding: 20px 20px 15px;
  }

  .mpwp-modal-title {
    font-size: 20px;
  }

  .mpwp-modal-body {
    padding: 20px;
  }

  .mpwp-modal-footer {
    padding: 15px 20px;
  }

  .mpwp-modal-close {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .mpwp-modal {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .mpwp-modal-header {
    padding: 15px 15px 12px;
  }

  .mpwp-modal-title {
    font-size: 18px;
  }

  .mpwp-modal-body {
    padding: 15px;
  }

  .mpwp-modal-footer {
    padding: 12px 15px;
  }
}

/* ==========================================================================
   États et Interactions
   ========================================================================== */

/* Modal ouvert - empêcher le scroll du body */
body.mpwp-modal-open {
  overflow: hidden;
}

/* Focus pour l'accessibilité */
.mpwp-modal-close:focus {
  outline: 2px solid var(--mpwp-primary-color, #2271b1);
  outline-offset: 2px;
}

/* Loading state */
.mpwp-modal.loading .mpwp-modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.mpwp-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid var(--mpwp-primary-color, #2271b1);
  border-radius: 50%;
  animation: mpwp-spin 1s linear infinite;
}

@keyframes mpwp-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Variations de Style
   ========================================================================== */

/* Modal large */
.mpwp-modal-large {
  max-width: 800px;
}

/* Modal petit */
.mpwp-modal-small {
  max-width: 400px;
}

/* Modal plein écran */
.mpwp-modal-fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
}

/* Overlay avec flou différent */
.mpwp-modal-overlay.blur-heavy {
  backdrop-filter: blur(10px);
}

.mpwp-modal-overlay.blur-light {
  backdrop-filter: blur(2px);
}

/* ==========================================================================
   Compatibilité Thèmes
   ========================================================================== */

/* Reset des styles de thème */
.mpwp-modal * {
  box-sizing: border-box;
}

/* S'assurer que le modal est au-dessus de tout */
.mpwp-modal-overlay {
  z-index: 999999;
}

/* Correction pour certains thèmes */
.admin-bar .mpwp-modal-overlay {
  top: 32px;
  height: calc(100% - 32px);
}

@media (max-width: 782px) {
  .admin-bar .mpwp-modal-overlay {
    top: 46px;
    height: calc(100% - 46px);
  }
}

@media (max-width: 600px) {
  .admin-bar .mpwp-modal-overlay {
    top: 0;
    height: 100%;
  }
}

/* ==========================================================================
   MPWP - Styles des étapes 3 et 4
   ========================================================================== */

/* Étape 3 - Général */
.mpwp-checkbox-field {
  margin-top: 15px;
}

.mpwp-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.mpwp-checkbox-field input[type="checkbox"] {
  margin: 0;
}

/* Étape 4 - Confirmation */
.mpwp-confirmation-content {
  max-height: 400px;
  overflow-y: auto;
}

.mpwp-summary-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.mpwp-summary-card h5 {
  margin: 0 0 15px 0;
  color: #2c3338;
  font-size: 16px;
  font-weight: 600;
}

.mpwp-summary-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mpwp-summary-section h6 {
  margin: 0 0 10px 0;
  color: #2271b1;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mpwp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.mpwp-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 4px;
  border-left: 3px solid #2271b1;
}

.mpwp-summary-label {
  font-weight: 500;
  color: #555;
  font-size: 13px;
}

.mpwp-summary-value {
  font-weight: 600;
  color: #2c3338;
  font-size: 13px;
}

/* Notice de confirmation */
.mpwp-confirmation-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 6px;
  margin-top: 20px;
}

.mpwp-notice-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.mpwp-notice-content strong {
  display: block;
  margin-bottom: 5px;
  color: #0066cc;
}

.mpwp-notice-content p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.4;
}

/* ==========================================================================
   MPWP - Boutons de navigation
   ========================================================================== */

.mpwp-navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.mpwp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-height: 44px;
}

.mpwp-btn-prev {
  background: #6c757d;
  color: white;
}

.mpwp-btn-prev:hover {
  background: #5a6268;
  transform: translateX(-2px);
}

.mpwp-btn-next,
.mpwp-btn-confirm {
  background: var(--mpwp-primary-color, #2271b1);
  color: white;
}

.mpwp-btn-next:hover,
.mpwp-btn-confirm:hover {
  background: var(--mpwp-primary-dark, #135e96);
  transform: translateX(2px);
}

.mpwp-btn-confirm {
  background: #28a745;
}

.mpwp-btn-confirm:hover {
  background: #218838;
}

.mpwp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.mpwp-btn-icon {
  font-size: 16px;
  font-weight: bold;
}

/* Indicateur de chargement */
.mpwp-loading-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
}

.mpwp-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2271b1;
  border-radius: 50%;
  animation: mpwp-spin 1s linear infinite;
}

@keyframes mpwp-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   MPWP - Progress Bar (adaptée du CSP)
   ========================================================================== */

/* Conteneur principal */
.mpwp-progress-bar {
  padding: 30px 40px;
  position: relative;
  /* background: #fafafa; */
  border-bottom: 1px solid #e0e0e0;
}

/* Barre de fond */
.mpwp-progress-track {
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #e0e0e0;
  transform: translateY(-50%);
  border-radius: 3px;
}

/* Barre de remplissage */
.mpwp-progress-fill {
  height: 100%;
  background: var(--mpwp-primary-color, #2271b1);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* Conteneur des étapes */
.mpwp-progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Étape individuelle */
.mpwp-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Cercle de l'étape */
.mpwp-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #999;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

/* États des étapes */
.mpwp-step-item.active .mpwp-step-number {
  background: var(--mpwp-primary-color, #2271b1);
  border-color: var(--mpwp-primary-color, #2271b1);
  color: white;
  transform: scale(1.1);
}

.mpwp-step-item.completed .mpwp-step-number {
  background: var(--mpwp-primary-color, #2271b1);
  border-color: var(--mpwp-primary-color, #2271b1);
  color: white;
}

/* Icône de validation pour les étapes complétées */
.mpwp-step-item.completed .mpwp-step-number::after {
  content: "✓";
  font-size: 18px;
  font-weight: bold;
}

/* Label de l'étape */
.mpwp-step-label {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-align: center;
  max-width: 100px;
  line-height: 1.3;
}

.mpwp-step-item.active .mpwp-step-label {
  color: var(--mpwp-primary-color, #2271b1);
  font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .mpwp-progress-bar {
    padding: 20px;
  }

  .mpwp-progress-track {
    left: 20px;
    right: 20px;
  }

  .mpwp-step-number {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .mpwp-step-label {
    font-size: 12px;
    max-width: 80px;
  }
}

@media (max-width: 480px) {
  .mpwp-progress-bar {
    padding: 15px;
  }

  .mpwp-progress-track {
    left: 15px;
    right: 15px;
  }

  .mpwp-step-number {
    width: 30px;
    height: 30px;
    font-size: 12px;
    border-width: 2px;
  }

  .mpwp-step-label {
    font-size: 11px;
    max-width: 70px;
  }
}

/* FIN DE LA PROGRESS BAR */

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .mpwp-summary-grid {
    grid-template-columns: 1fr;
  }

  .mpwp-navigation-buttons {
    flex-direction: column;
  }

  .mpwp-btn {
    width: 100%;
    justify-content: center;
  }

  .mpwp-confirmation-content {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .mpwp-summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mpwp-confirmation-notice {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   MPWP - Styles du formulaire multi-étapes
   ========================================================================== */
.mpwp-static-section {
  /* position: sticky; */
  top: 0;
  background: #f8f9fa;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 20px;
  z-index: 10;
}

.mpwp-profile-title {
  margin: 0 0 15px 0;
  font-family: "Poppins", Sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: #333;
}

.mpwp-profile-option {
  margin-bottom: 10px;
}

.mpwp-profile-option input[type="radio"] {
  margin-right: 8px;
}

.mpwp-gender-selection label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.mpwp-gender-selection select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f8f9fa;
}

/* FIN PARTIE STATIQUE */

/* ==========================================================================
   MPWP - Styles des erreurs de validation
   ========================================================================== */

/* Champ avec erreur */
.mpwp-form-field .mpwp-field-error {
  border: 2px solid #dc3232 !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 1px #dc3232 !important;
}

.mpwp-form-label {
  display: block;
  color: #000000;
  font-family: "Poppins", Sans-serif;
  font-size: 18px;
  font-weight: 500;
}

/* Message d'erreur */
.mpwp-field-error-message {
  display: block;
  color: #dc3232;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding: 4px 8px;
  background: #fff5f5;
  border: 1px solid #ffb8b8;
  border-radius: 4px;
  position: relative;
  animation: mpwp-errorSlideIn 0.3s ease-out;
}

/* Icône d'erreur */
.mpwp-field-error-message::before {
  content: "⚠";
  margin-right: 6px;
  font-size: 14px;
}

/* Animation d'apparition */
@keyframes mpwp-errorSlideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus sur un champ avec erreur */
.mpwp-field-error:focus {
  border-color: #dc3232 !important;
  box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1) !important;
  outline: none;
}

/* Label pour champ avec erreur */
.mpwp-form-field:has(.mpwp-field-error) label {
  color: #dc3232;
  font-weight: 600;
}

/* Groupe de champs avec erreur */
.mpwp-field-group:has(.mpwp-field-error) {
  border-left: 3px solid #dc3232;
  /* background: #fffafa; */
}

/* ==========================================================================
   États de validation en temps réel
   ========================================================================== */

/* Champ valide */
.mpwp-form-field .mpwp-field-valid {
  border: 2px solid #46b450 !important;
  background-color: #f8fff8 !important;
}

/* Message de succès (optionnel) */
.mpwp-field-valid-message {
  display: block;
  color: #46b450;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding: 4px 8px;
  background: #f8fff8;
  border: 1px solid #a3e9a4;
  border-radius: 4px;
}

.mpwp-field-valid-message::before {
  content: "✓";
  margin-right: 6px;
  font-size: 14px;
  font-weight: bold;
}

/* ==========================================================================
   Amélioration de la méthode showFieldError
   ========================================================================== */

/* Pour les champs required */
.mpwp-form-field.required label::after {
  content: " *";
  color: #dc3232;
  font-weight: bold;
}

.wpmp-form-row {
  padding: 10px !important;
  .mpwp-form-field label {
    display: block;
    color: #000000;
    font-family: "Poppins", Sans-serif;
    font-size: 18px;
    font-weight: 500;
  }
}

/* Style spécifique pour les types de champs */
.mpwp-form-field input[type="number"].mpwp-field-error {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23dc3232" width="18" height="18"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/*
    FIN GESTION DES ERREURS
*/

/* ==========================================================================
   Animations pour les erreurs
   ========================================================================== */

/* Animation de secousse */
.mpwp-error-shake {
  animation: mpwp-shake 0.5s ease-in-out;
}

@keyframes mpwp-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Transition douce pour les changements d'état */
.mpwp-measurement-field {
  transition: all 0.3s ease;
}

/* Effet de pulse pour les champs requis vides */
.mpwp-form-field.required:has(.mpwp-measurement-field:invalid:not(:focus)) {
  animation: mpwp-requiredPulse 2s infinite;
}

@keyframes mpwp-requiredPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ==========================================================================
   Styles pour le résumé des erreurs
   ========================================================================== */

/* Bannière d'erreur générale */
.mpwp-form-errors {
  background: #fff5f5;
  border: 2px solid #dc3232;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.mpwp-form-errors h5 {
  color: #dc3232;
  margin: 0 0 10px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mpwp-form-errors h5::before {
  content: "⚠";
  font-size: 16px;
}

.mpwp-form-errors ul {
  margin: 0;
  padding-left: 20px;
  color: #a00;
}

.mpwp-form-errors li {
  margin-bottom: 5px;
  font-size: 13px;
}

/* ==========================================================================
   Responsive pour les erreurs
   ========================================================================== */

@media (max-width: 768px) {
  .mpwp-field-error-message {
    font-size: 11px;
    padding: 3px 6px;
  }

  .mpwp-form-field input[type="number"].mpwp-field-error {
    background-position: right 8px center;
    padding-right: 35px;
  }
}

/* FIN GESTION DES ERREURS */

/* Étapes du formulaire */
.mpwp-step {
  display: none;
}

.mpwp-step.active {
  display: block;
}

.mpwp-step-title {
  color: #2271b1;
  margin-bottom: 20px;
  font-size: 1.2em;
  font-weight: 600;
}

/* Groupes de champs */
.mpwp-field-group {
  /* margin-bottom: 20px;
  padding: 15px; */
  /* background: #f8f9fa; */
  /* border-radius: 6px; */
  /* border-left: 3px solid #2271b1; */
}

.mpwp-field-group h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1em;
}

.mpwp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.mpwp-form-field {
  display: flex;
  flex-direction: column;
}

.mpwp-form-field label {
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.mpwp-form-field input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.mpwp-form-field input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

/* Navigation des étapes */
.mpwp-step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.mpwp-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mpwp-btn-prev {
  background: #6c757d;
  color: white;
}

.mpwp-btn-prev:hover {
  background: #5a6268;
}

.mpwp-btn-next {
  background: #2271b1;
  color: white;
}

.mpwp-btn-next:hover {
  background: #135e96;
}

.mpwp-btn-submit {
  background: #28a745;
  color: white;
}

.mpwp-btn-submit:hover {
  background: #218838;
}

/* Indicateur de progression */
.mpwp-step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}

.mpwp-step-indicator li {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.mpwp-step-indicator li::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  z-index: 2;
}

.mpwp-step-indicator li.active::before {
  background: #2271b1;
  color: white;
  content: "✓";
}

.mpwp-step-indicator li::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: #e0e0e0;
  z-index: 1;
}

.mpwp-step-indicator li:last-child::after {
  display: none;
}

.mpwp-step-indicator li.active::after {
  background: #2271b1;
}

.mpwp-step-indicator span {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.mpwp-step-indicator li.active span {
  color: #2271b1;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .mpwp-form-row {
    grid-template-columns: 1fr;
  }

  .mpwp-modal {
    width: 95%;
    margin: 20px;
  }

  .mpwp-step-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .mpwp-btn {
    width: 100%;
  }
}
/* Styles pour l'action manuelle */
.mpwp-manual-action {
  animation: slideInUp 0.3s ease-out;
}

.mpwp-btn-manual-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Animation d'apparition */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Indicateur de chargement amélioré */
.mpwp-spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: mpwp-spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes mpwp-spin {
  to {
    transform: rotate(360deg);
  }
}
/* Style pour le bouton désactivé */
.mpwp-open-popup.mpwp-btn-disabled {
  background: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
  cursor: not-allowed !important;
  opacity: 0.9;
}

.mpwp-open-popup.mpwp-btn-disabled:hover {
  background: #10b981 !important;
  transform: none !important;
  box-shadow: none !important;
}
