/* ====================== */
/* COCKPIT RESUME CLIENT  */
/* ====================== */

.erpcf-client-summary {
    padding: 12px 15px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    margin-bottom: 0;
}

.erpcf-panel--quotes-invoices {
  display: none;
}


#erpcf-save-client-btn.is-loading {
  opacity: 0.7;
  cursor: wait;
}

#erpcf-save-client-btn[disabled] {
  pointer-events: none;
}



/* Ligne d'entête du tableau Analyse */
.sstaf-analyses-table thead th {
  background: #f3f4f6;   /* gris clair WP */
  color: #555d66;
  font-weight: 600;
  padding: 8px 10px;
}

/* Alignement général des cellules */
.sstaf-analyses-table td {
  padding: 6px 10px;
  vertical-align: middle;
}


/* Entête "Analyse du besoin client" avec boutons à droite */
.sstaf-analyse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sstaf-analyse-header label {
  margin-bottom: 0; /* éviter les gros espacements */
}

.sstaf-analyse-header__buttons {
  display: flex;
  gap: 8px;
}

.sstaf-analyse-header__buttons .button {
  min-width: 100px;
  text-align:center ;
}

/* Ne cacher que les panneaux d'onglets, pas le bloc principal */
.erpcf-panel--quotes-invoices,
.erpcf-panel--sessions,
.erpcf-panel--inscriptions,
.erpcf-panel--analyse,
.erpcf-panel--proofs,
.erpcf-panel--archives {
  display: none;
}

.erpcf-panel--quotes-invoices.is-active,
.erpcf-panel--sessions.is-active,
.erpcf-panel--inscriptions.is-active,
.erpcf-panel--analyse.is-active,
.erpcf-panel--proofs.is-active,
.erpcf-panel--archives.is-active {
  display: block;
}


/* Tableau GED client */
.erpcf-ged-table {
  width: 100%;
  border-collapse: collapse;
}

/* Entête gris clair, centré */
.erpcf-ged-table thead th {
  background-color: #f3f4f6;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
}

/* Corps du tableau : zébrage gris très clair, centré */
.erpcf-ged-table tbody td {
  padding: 6px 10px;
  text-align: center;
  vertical-align: middle;
}

.erpcf-ged-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.erpcf-ged-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Liens Télécharger / Supprimer */
.erpcf-ged-table a {
  color: #2271b1;
  text-decoration: none;
}

.erpcf-ged-table a:hover {
  text-decoration: underline;
}



/* 1ère ligne : 3 colonnes alignées */
.erpcf-client-summary__header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.erpcf-client-summary__field label {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.erpcf-client-summary__value {
    font-size: 14px;
}

/* 2ème ligne : cartes KPI */
.erpcf-client-summary__kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.erpcf-client-kpi {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #d6d6d6;
    background: #fff;
    border-radius: 4px;
    min-height: 80px;
}

.erpcf-client-kpi__icon {
    font-size: 20px;
    margin-right: 10px;
}

.erpcf-client-kpi__title {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.erpcf-client-kpi__value {
    font-size: 16px;
    font-weight: 600;
}

/* 3ème ligne : boutons – 5 colonnes par défaut */
.erpcf-client-summary__actions {
    display: grid;
    gap: 12px;
    margin-top: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.erpcf-client-summary__actions .erpcf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    text-align: center;
    white-space: normal;
}



.erpcf-client-acf-wrapper .acf-form-submit {
    display: none;
}



.erpcf-header--clients {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
}

.erpcf-header__right {
    display: flex;
    justify-content: flex-end; /* pousse les boutons à droite */
    gap: 8px;
}


.erpcf-header__center {
    display: flex;
    justify-content: center;
}

.erpcf-client-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erpcf-client-search__input {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 6px 10px;
    font-size: 0.875rem;
    min-width: 260px;
}


.erpcf-client-acf-wrapper input.acf-button[type="submit"] {
    display: none;
}


/* Modale ANALYSE : plus large et un peu moins haute */
#erpcf-analyse-modal .erpcf-modal__content {
  width: 90vw;        /* prend 90% de la largeur de l'écran */
  max-width: 900px;   /* mais ne dépasse pas 900px */
  max-height: 70vh;   /* un peu moins haute que la fenêtre */
  margin: 8vh auto;   /* espace en haut ET en bas */
  overflow-y: auto;   /* scroll interne si contenu long */
  background: #fff;   /* on remet du blanc ici */
}


/* Boutons "pill" compacts */
.erpcf-btn,
.button {
  padding: 6px 14px;
  border-radius: 999px;        /* forme pill */
  font-size: 14px;
  line-height: 1.2;
  min-width: auto;             /* pas de largeur forcée */
}

/* Si tu ne veux pas qu'ils fassent toute la largeur */
.erpcf-client-summary__actions .erpcf-btn {
  width: auto;
}


/* Cellules du tableau Analyse centrées */
.sstaf-analyses-table td {
  padding: 6px 10px;
  vertical-align: middle;
  text-align: center;
}


.erpcf-modal {
  position: fixed;
  inset: 0;
  display: none;          /* cachée par défaut */
  z-index: 9999;
}

.erpcf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}

.erpcf-modal__content {
  position: relative;
  max-width: 480px;
  margin: 10vh auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.erpcf-modal__actions {
  margin-top: 15px;
  text-align: right;
}

#erpcf-new-client-title {
  width: 100%;
  padding: 6px 8px;
  margin-top: 5px;
}


.erpcf-client-search {
  position: relative;
}

/* La liste de résultats sous l'input */
.erpcf-client-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0; /* même largeur que le form */
  z-index: 9999;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: none;
}

/* Chaque ligne de résultat */
.erpcf-client-result {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* survol sélection */
.erpcf-client-result:hover {
  background: #f3f4f6;
}


.erpcf-new-client-field-wrapper {
  position: relative;
}

.erpcf-new-client-field-wrapper input {
  width: 100%;
}

.sstaf-client-doli-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 3000;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 0 0 6px 6px;
}

.sstaf-client-doli-item {
  list-style: none;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

.sstaf-client-doli-item:hover {
  background: #f3f4f6;
}


.sstaf-client-doli-suggestions:empty {
  display: none;
}



.erpcf-new-client-field-wrapper {
  position: relative;
}

.erpcf-new-client-field-wrapper .sstaf-client-doli-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20000; /* plus haut que la modale */
  background: #fff;
  border: 1px solid #ccc;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 0 0 6px 6px;
}




/* Zébrage des lignes devis / factures */
.sstaf-quotes-table tbody tr:nth-child(odd),
.sstaf-invoices-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.sstaf-quotes-table tbody tr:nth-child(even),
.sstaf-invoices-table tbody tr:nth-child(even) {
    background-color: #f7f7f7; /* gris très clair */
}

/* Centrage des en-têtes et cellules */
.sstaf-quotes-table th,
.sstaf-quotes-table td,
.sstaf-invoices-table th,
.sstaf-invoices-table td {
    text-align: center;
    vertical-align: middle;
}

/* Style ✔ Signé / ✔ Payée */
.sstaf-quote-signed {
    color: #006400;       /* vert foncé */
    font-weight: bold;
}




/* Ligne des intitulés (en-têtes) en gris clair */
.sstaf-quotes-table thead tr,
.sstaf-invoices-table thead tr {
    background-color: #f0f0f0; /* gris clair */
}

/* Optionnel : texte centré dans les intitulés aussi */
.sstaf-quotes-table thead th,
.sstaf-invoices-table thead th {
    text-align: center;
    vertical-align: middle;
}



.erpcf-client-sessions-table-inner,
.erpcf-client-inscriptions-table-inner {
  width: 100%;
  border-collapse: collapse;
}

/* centrage des textes */
.erpcf-client-sessions-table-inner th,
.erpcf-client-sessions-table-inner td,
.erpcf-client-inscriptions-table-inner th,
.erpcf-client-inscriptions-table-inner td {
  text-align: center;
}

/* entête gris clair */
.erpcf-client-sessions-table-inner thead th,
.erpcf-client-inscriptions-table-inner thead th {
  background-color: #f3f4f5;
  font-weight: 600;
}

/* zébrage blanc / gris très clair */
.erpcf-client-sessions-table-inner tbody tr:nth-child(odd),
.erpcf-client-inscriptions-table-inner tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.erpcf-client-sessions-table-inner tbody tr:nth-child(even),
.erpcf-client-inscriptions-table-inner tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}


.erpcf-new-client-field-wrapper {
  position: relative;
}

.sstaf-client-doli-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ddd;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
}

.sstaf-client-doli-suggestions .sstaf-client-doli-item {
  padding: 8px 10px;
  cursor: pointer;
}

.sstaf-client-doli-suggestions .sstaf-client-doli-item:hover {
  background: #f3f6fd;
}















/* Titre */
.erpcf-modal__content h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
}

.erpcf-new-client-field-wrapper {
  margin-bottom: 12px;
}

.erpcf-new-client-field-wrapper label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  color: #50575e;
}

.erpcf-new-client-field-wrapper input[type="date"],
.erpcf-new-client-field-wrapper textarea {
  width: 100%;
  box-sizing: border-box;
}


/* Bloc boutons centré */
.erpcf-modal__buttons {
  margin-top: 18px;
  display: flex;
  flex-direction: column;   /* Générer au-dessus d'Annuler */
  align-items: center;
  gap: 8px;
}

/* Bouton principal Générer */
#erpcf-analyse-confirm.erpcf-btn--primary {
  min-width: 160px;
}

/* Bouton secondaire Annuler */
#erpcf-analyse-cancel.erpcf-btn--secondary {
  min-width: 160px;
  background: transparent;
  border: 1px solid #ccd0d4;
  color: #50575e;
}


/* cacher le bouton ACF Extended "Modifier" d'origine */
.acf-field-group[data-key="field_698b224f1bbe9"] > .acf-input > a.acf-button.button[data-modal] {
  display: none !important;
}


/* ========================================
   MODALE EMAIL (cockpit client)
   ======================================== */



/* ÉTAT FERMÉ PAR DÉFAUT POUR LA MODALE EMAIL */
#erpcf-email-modal {
  display: none !important;
}

/* ÉTAT OUVERT POUR LA MODALE EMAIL */
#erpcf-email-modal.is-open {
  display: flex !important;
}


.erpcf-modal--email {
    position: fixed;
    inset: 0;  /* top:0; right:0; bottom:0; left:0; */
    z-index: 999999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.erpcf-modal--email .erpcf-modal-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.erpcf-modal--email .erpcf-modal-container {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    margin: 0 auto;
}

.erpcf-modal--email .erpcf-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.erpcf-modal--email .erpcf-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.erpcf-modal--email .erpcf-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.erpcf-modal--email .erpcf-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.erpcf-modal--email .erpcf-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.erpcf-modal--email .erpcf-form-group {
    margin-bottom: 16px;
}

.erpcf-modal--email .erpcf-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.erpcf-modal--email .erpcf-form-group input[type="text"],
.erpcf-modal--email .erpcf-form-group input[type="email"],
.erpcf-modal--email .erpcf-form-group select,
.erpcf-modal--email .erpcf-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.erpcf-modal--email .erpcf-form-group input:focus,
.erpcf-modal--email .erpcf-form-group select:focus,
.erpcf-modal--email .erpcf-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.erpcf-modal--email .erpcf-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.erpcf-modal--email .erpcf-form-info {
    background: #f3f4f6;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
}

.erpcf-modal--email .erpcf-form-info strong {
    color: #1f2937;
}

.erpcf-modal--email .erpcf-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.erpcf-modal--email .erpcf-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erpcf-modal--email .erpcf-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.erpcf-modal--email .erpcf-btn-secondary:hover {
    background: #e5e7eb;
}

.erpcf-modal--email .erpcf-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.erpcf-modal--email .erpcf-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.erpcf-modal--email .erpcf-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Toggle Intra/Inter */
.erpcf-modal--email .erpcf-toggle-group {
    display: flex;
    align-items: center;
}

.erpcf-modal--email .erpcf-toggle {
    cursor: pointer;
    user-select: none;
}

.erpcf-modal--email .erpcf-toggle input[type="checkbox"] {
    display: none;
}

.erpcf-modal--email .erpcf-toggle-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #e5e7eb;
    border-radius: 50px;
    padding: 4px;
    width: 160px;
    height: 40px;
    transition: background 0.3s;
}

.erpcf-modal--email .erpcf-toggle input:checked + .erpcf-toggle-track {
    background: #667eea;
}

.erpcf-modal--email .erpcf-toggle-knob {
    position: absolute;
    width: 76px;
    height: 32px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    left: 4px;
}

.erpcf-modal--email .erpcf-toggle input:checked + .erpcf-toggle-track .erpcf-toggle-knob {
    transform: translateX(76px);
}

.erpcf-modal--email .erpcf-toggle-label-left,
.erpcf-modal--email .erpcf-toggle-label-right {
    position: absolute;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s;
    z-index: 1;
}

.erpcf-modal--email .erpcf-toggle-label-left {
    left: 20px;
    color: #374151;
}

.erpcf-modal--email .erpcf-toggle-label-right {
    right: 20px;
    color: #9ca3af;
}

.erpcf-modal--email .erpcf-toggle input:checked + .erpcf-toggle-track .erpcf-toggle-label-left {
    color: #9ca3af;
}

.erpcf-modal--email .erpcf-toggle input:checked + .erpcf-toggle-track .erpcf-toggle-label-right {
    color: #fff;
}

/* Footer de la modale email : centrage horizontal */
/* Footer : centrage parfait */
#erpcf-email-modal .erpcf-email-modal__footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

/* Base commune aux deux boutons */
#erpcf-email-modal .erpcf-email-btn {
    display: inline-flex;
    align-items: center;          /* centre verticalement le texte/emoji */
    justify-content: center;      /* centre horizontalement */
    padding: 10px 22px;
    font-size: 14px;
    line-height: 1.2;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 180px;             /* même largeur visuelle */
    box-sizing: border-box;
}

/* Bouton principal (Envoyer) */
#erpcf-email-modal .erpcf-email-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

#erpcf-email-modal .erpcf-email-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Bouton Annuler (gris clair) */
#erpcf-email-modal .erpcf-email-btn--cancel {
    color: #fff;
    border-color: #d1d5db;
}

#erpcf-email-modal .erpcf-email-btn--cancel:hover {
    background: #e5e7eb;
    border-color: #cbd5e1;
}


#erpcf-email-modal .erpcf-email-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
    margin-right: 6px;
}


      /* En-tête du tableau en gris clair comme WP */
      #sstaf_preuves_mails_box table.widefat thead th {
        background-color: #f3f4f5;
      }

      /* En-tête du tableau des preuves mails REST */
      table.erpcf-table thead th {
        background-color: #f3f4f5;
        border-bottom: 1px solid #ccd0d4;
      }




/* ===== Modale Contrat / Convention ===== */

.erpcf-modal--contrat {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.erpcf-modal--contrat.is-open {
    display: block;
}

/* Fond assombri */
.erpcf-modal--contrat .erpcf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

/* Boîte de dialogue */
.erpcf-modal--contrat .erpcf-modal__dialog {
    position: relative;
    max-width: 960px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    padding: 24px 28px 20px;
}

/* En-tête */
.erpcf-modal--contrat .erpcf-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.erpcf-modal--contrat .erpcf-modal__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

/* Bouton X */
.erpcf-modal--contrat .erpcf-modal__close {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 4px 6px;
}

.erpcf-modal--contrat .erpcf-modal__close:hover {
    color: #0f172a;
}

/* Corps */
.erpcf-modal--contrat .erpcf-modal__body {
    margin: 8px 0 16px;
}

/* Lignes de formulaire */
.erpcf-modal--contrat .erpcf-form-row {
    margin-bottom: 14px;
}

.erpcf-modal--contrat .erpcf-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 4px;
}

/* Inputs et selects */
.erpcf-modal--contrat input[type="number"],
.erpcf-modal--contrat select {
    width: 100%;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    font-size: 14px;
    color: #0f172a;
    box-sizing: border-box;
}

.erpcf-modal--contrat input[type="number"]:focus,
.erpcf-modal--contrat select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb33;
}

/* Ligne en 2 colonnes (effectif + devis) */
.erpcf-modal--contrat .erpcf-form-row--inline {
    display: flex;
    gap: 16px;
}

.erpcf-modal--contrat .erpcf-form-row--inline > div {
    flex: 1;
}

/* ===== Toggle Client particulier ===== */

.erpcf-modal--contrat .erpcf-form-row--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.erpcf-modal--contrat .erpcf-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

/* Regroupe switch + textes à droite du label */
.erpcf-modal--contrat .erpcf-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Bouton toggle */
.erpcf-modal--contrat .erpcf-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

/* Rail */
.erpcf-modal--contrat .erpcf-toggle__track {
    position: relative;
    width: 48px;
    height: 24px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background-color 0.2s ease;
}

/* Pastille */
.erpcf-modal--contrat .erpcf-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease;
}

/* Textes Convention / Contrat */
.erpcf-modal--contrat .erpcf-toggle__text {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.erpcf-modal--contrat .erpcf-toggle__text--on {
    display: none;
    color: #16a34a;
}

/* État ON */
.erpcf-modal--contrat .erpcf-toggle.is-on .erpcf-toggle__track {
    background: #2563eb;
}

.erpcf-modal--contrat .erpcf-toggle.is-on .erpcf-toggle__thumb {
    transform: translateX(24px);
}

.erpcf-modal--contrat .erpcf-toggle.is-on + .erpcf-toggle__text--off {
    display: none;
}

/* ===== Pied de modale : boutons ===== */

.erpcf-modal--contrat .erpcf-modal__footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.erpcf-modal--contrat .erpcf-btn {
    min-width: 130px;
}

/* Annuler style pilule gris clair (comme ta capture) */
.erpcf-modal--contrat .erpcf-btn--ghost {
    background-color: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 24px;
    font-weight: 500;
}

.erpcf-modal--contrat .erpcf-btn--ghost:hover {
    background-color: #e2e8f0;
}

/* Le primary peut garder ton style global erpcf-btn--primary */

/* Responsive */
@media (max-width: 768px) {
    .erpcf-modal--contrat .erpcf-modal__dialog {
        margin: 20px auto;
        max-width: 94vw;
        padding: 18px 16px 16px;
    }

    .erpcf-modal--contrat .erpcf-form-row--inline {
        flex-direction: column;
    }

    .erpcf-modal--contrat .erpcf-form-row--toggle {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .erpcf-modal--contrat .erpcf-modal__dialog {
        margin: 20px auto;
        max-width: 94vw;
        padding: 18px 16px 16px;
    }

    .erpcf-modal--contrat .erpcf-form-row--inline {
        flex-direction: column;
    }
}

/* responsive */
@media (max-width: 1200px) {
    .erpcf-client-summary__actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .erpcf-client-summary__actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .erpcf-client-summary__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .erpcf-client-summary__actions {
        grid-template-columns: 1fr;
    }
}
