.partage-ai {
  margin-bottom: 1rem;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}
.partage-ai__title { color: #0b1f3a; font-weight: 800; margin: 0 0 4px; }
.partage-ai__desc { color: #334155; margin: 0 0 12px; }
.partage-ai__label { font-weight: 700; color: #0b1f3a; display: block; margin-bottom: 4px; }
.partage-ai__hint { color: #475569; font-size: 0.92rem; }
.partage-ai__tone-row { display: flex; flex-wrap: wrap; gap: 6px; }
.partage-ai__intent-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.partage-ai__intent-card {
  text-align: left;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}
.partage-ai__intent-card.is-selected,
.partage-ai__proposal.is-selected {
  border-color: #c8102e;
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.15);
}
.partage-ai__intent-card small { display: block; color: #64748b; margin-top: 4px; }
.partage-ai__proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.partage-ai__proposal {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
}
.partage-ai__version-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.partage-ai__version-tabs .btn { text-align: left; max-width: 180px; white-space: normal; }
.partage-ai__field-error {
  color: #991b1b;
  font-size: 0.88rem;
  margin-top: 4px;
}
.partage-ai__ready { font-weight: 700; }
.partage-ai__proposal-box {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.partage-ai.is-ai-disabled .pai-compose { display: none !important; }
.partage-ai__divider { margin-top: 16px; }
.btn-outline-secondary.pai-tone.active {
  background: #0b1f3a;
  border-color: #0b1f3a;
  color: #fff;
}

.pai-help-write-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pai-help-write-row label {
  margin-bottom: 0;
}
.pai-help-write {
  background: #fff;
  border: 1px solid #c8102e;
  border-radius: 999px;
  color: #c8102e;
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  padding: 4px 12px;
}
.pai-help-write:hover,
.pai-help-write:focus {
  background: #c8102e;
  color: #fff;
}
.pai-help-write:disabled {
  opacity: .6;
}

/* Flèche visible sur les dropdowns PartageAI */
.partage-ai select.pai-reason,
.partage-ai select.form-control.pai-reason {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230b1f3a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 40px !important;
  cursor: pointer;
}
.partage-ai select.pai-reason::-ms-expand {
  display: none;
}

/* Modale partage courriel — défilement + mobile */
#emailShare {
  padding-right: 0 !important;
}
#emailShare .modal-dialog {
  max-width: min(1100px, calc(100vw - 1rem));
  margin: 0.5rem auto;
  max-height: calc(100dvh - 1rem);
}
#emailShare .email-share-modal__content,
#emailShare .modal-content {
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#emailShare .email-share-modal__header {
  flex: 0 0 auto;
  padding: 0.35rem 0.75rem 0;
}
#emailShare .email-share-modal__body,
#emailShare .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: none;
  padding-bottom: 1.5rem;
}
#emailShare .email-share-modal__container {
  padding-bottom: 4.5rem !important;
}
#emailShare .email-share-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin-top: 1rem;
  padding: 0.85rem 0.5rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%, #fff 100%);
}
#emailShare .email-share-submit-bar .btn-coupon {
  min-height: 48px;
  min-width: min(100%, 280px);
  font-size: 1.05rem;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  #emailShare .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
  }
  #emailShare .email-share-modal__content,
  #emailShare .modal-content {
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  #emailShare .email-share-modal__preview {
    display: none;
  }
  #emailShare #share-popup {
    background-image: none !important;
  }
  #emailShare .email-share-recipients {
    min-height: 4.5rem;
  }
  #emailShare .tox.tox-tinymce {
    max-width: 100% !important;
  }
  #emailShare .tox-toolbar__primary {
    flex-wrap: wrap !important;
  }
  #emailShare .partage-ai {
    padding: 10px 12px;
  }
  #emailShare .partage-ai__title {
    font-size: 1.1rem;
  }
  #emailShare .form-control {
    font-size: 16px; /* évite le zoom iOS */
  }
}

