/* Centrage du wrapper */
.audit-share-btn-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}
.audit-share-btn-modal-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative; /* AJOUT: Pour le positionnement relatif */
}

/* Animation gradient lent sur le bouton fermé */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.audit-share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #7B7DFE 0%, #B16CFE 100%);
  background-size: 200% 200%;
  animation: gradientMove 8s linear infinite alternate;
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  padding: 10px 32px;
  box-shadow: 0 2px 12px 0 rgba(123, 125, 254, 0.10);
  cursor: pointer;
  transition: box-shadow 0.2s;
  margin-bottom: 0;
  z-index: 12;
  position: relative; /* AJOUT: Pour s'assurer qu'il est au-dessus */
}
.audit-share-btn-icon {
  width: 22px;
  height: 22px;
}
.audit-share-btn:active,
.audit-share-btn:focus {
  outline: none;
}

/* Masquer le bouton quand la modale est ouverte */
.audit-share-btn.hide { display: none; }

/* Modale intégrée */
.audit-share-modal {
  position: absolute; /* CHANGEMENT: De static à absolute */
  top: 100%; /* AJOUT: Positionner juste en dessous du bouton */
  left: 50%;
  transform: translateX(-50%); /* CHANGEMENT: Centrer horizontalement */
  min-width: 650px;
  background: #fff;
  border: 2px solid #B7A7FE;
  border-radius: 5px; /* CHANGEMENT: Arrondir seulement le bas */
  box-shadow: 0 4px 32px 0 rgba(123, 125, 254, 0.10);
  z-index: 10;
  padding: 0;
  padding-top: 42px;
  animation: fadeIn 0.2s;
  transition: margin-top 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
  margin-top: -2px; /* AJOUT: Remonte légèrement pour connexion parfaite */
}

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

.audit-share-modal.show {
  margin-top: -2px; /* CHANGEMENT: Garde la connexion */
  opacity: 1;
}
.audit-share-modal.hide {
  margin-top: -2px; /* CHANGEMENT: Garde la position */
  opacity: 0;
}

.audit-share-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  position: relative;
  height: 0;
}
.audit-share-modal-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #B7A7FE;
  border-bottom: 2px solid #fff; /* CHANGEMENT: Bordure blanche pour masquer la ligne */
  border-radius: 5px 5px 0 0;
  padding: 0 32px;
  height: 42px;
  min-width: 0;
  position: absolute;
  left: 50%;
  top: -42px;
  transform: translateX(-50%);
  z-index: 11;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #7B7DFE;
  box-shadow: none;
  line-height: 42px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.audit-share-modal-title-icon {
  width: 22px;
  height: 22px;
}
.audit-share-modal-close {
  position: absolute;
  right: 24px;
  top: 18px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #FF5C5C;
  cursor: pointer;
  line-height: 1;
  z-index: 12;
  transition: color 0.18s;
}
.audit-share-modal-close:hover {
  color: #d90000;
  background: none;
}
.audit-share-modal-content {
  padding: 38px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.audit-share-modal-copied {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.audit-share-modal-copy-icon {
  width: 32px;
  height: 32px;
}
.audit-share-modal-copied-title {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
}
.audit-share-modal-subtext {
  color: #B7A7FE;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.audit-share-modal-sep {
  border: none;
  border-top: 1.5px solid #E5E5F0;
  width: 100%;
  margin: 16px 0 18px 0;
}
.audit-share-modal-form {
  display: flex;
  gap: 12px;
  width: 100%;
}
.audit-share-modal-email {
  flex: 1;
  border: 2px solid #E5E5F0;
  border-radius: 5px;
  padding: 12px 18px;
  font-size: 1.1rem;
  font-family: 'Poppins', Arial, sans-serif;
  color: #888;
  background: #fafaff;
  outline: none;
  transition: border 0.2s;
}
.audit-share-modal-email:focus {
  border-color: #B7A7FE;
}
.audit-share-modal-send {
  background: linear-gradient(90deg, #7B7DFE 0%, #B16CFE 100%);
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  padding: 12px 32px;
  cursor: pointer;
  opacity: 0.7;
}