/* ===== SAGAA Friendly Front ===== */

.sagaa-sf-front {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a;
}

.sagaa-sf-front h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.sf-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sf-admin-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 12px;
  margin: 10px 0 14px;
}

.sf-admin-banner strong {
  white-space: nowrap;
}

.sf-admin-banner span {
  color: #334155;
  font-size: 13px;
  line-height: 1.25;
  flex: 1;
}

.sf-admin-banner-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.sf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sf-grid label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin: 0 0 6px;
  font-weight: 600;
}

.sf-grid input,
.sf-grid select,
.sf-grid textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.sf-grid input:focus,
.sf-grid select:focus,
.sf-grid textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.sf-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.sf-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.sf-btn.secondary {
  background: #fff;
  color: #1d4ed8;
}

.sf-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef2f7;
  border-radius: 14px;
}

.sf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px; /* force scroll horizontal propre sur mobile */
  background: #fff;
}

.sf-table th,
.sf-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  font-size: 13px;
}

.sf-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.sf-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 700;
}

.sf-needs_info { background: #fff7ed; border-color: #fed7aa; }
.sf-proposed   { background: #eff6ff; border-color: #bfdbfe; }
.sf-confirmed  { background: #ecfdf5; border-color: #bbf7d0; }

.sf-muted {
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .sf-grid { grid-template-columns: 1fr; }
  .sf-admin-banner { flex-direction: column; align-items: flex-start; }
  .sf-admin-banner-btn { width: 100%; }
  .sf-row > * { width: 100%; }
  .sf-btn { width: 100%; }
}


/* =========================================================
   5) DENSITÉ DESKTOP (min-width: 1024px)
   Objectif : plus compact (moins d'espaces), lisible, sans casser mobile
   ========================================================= */
@media (min-width: 1024px) {

  /* Cartes / sections */
  .sagaa-sf-front .sf-card{
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .sagaa-sf-front .sf-card h2{
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.25;
  }

  /* Form : grilles plus serrées */
  .sagaa-sf-front .sf-grid{
    gap: 10px 12px;
  }
  .sagaa-sf-front label{
    font-size: 12px;
    margin-bottom: 4px;
  }
  .sagaa-sf-front input[type="text"],
  .sagaa-sf-front input[type="number"],
  .sagaa-sf-front input[type="email"],
  .sagaa-sf-front input[type="tel"],
  .sagaa-sf-front select,
  .sagaa-sf-front textarea{
    font-size: 13px;
    padding: 7px 10px;
  }
  .sagaa-sf-front textarea{
    min-height: 76px;
  }

  /* Barres de filtres */
  .sagaa-sf-front .sf-filters{
    gap: 10px 10px;
  }
  .sagaa-sf-front .sf-filters input,
  .sagaa-sf-front .sf-filters select{
    height: 34px;
    padding: 6px 10px;
  }
  .sagaa-sf-front .sf-actions{
    gap: 10px;
    margin-top: 10px;
  }
  .sagaa-sf-front .sf-btn{
    padding: 7px 12px;
    font-size: 12px;
  }

  /* Tableau : densité + lisibilité */
  .sagaa-sf-front .sf-table{
    font-size: 12px;
  }
  .sagaa-sf-front .sf-table th,
  .sagaa-sf-front .sf-table td{
    padding: 10px 10px;
    vertical-align: middle;
  }
  .sagaa-sf-front .sf-table th{
    font-size: 12px;
  }

  /* Lignes "details" sous une ligne principale */
  .sagaa-sf-front .sf-row-details{
    margin-top: -10px;
  }
  .sagaa-sf-front .sf-row-details td{
    padding: 10px 12px !important;
  }

  /* Badges : un peu plus compacts */
  .sagaa-sf-front .sf-badge{
    font-size: 11px;
    padding: 3px 8px;
  }

  /* CTA "Voir +" aligné */
  .sagaa-sf-front .sf-toggle{
    margin-top: 0;
  }
}

/* =========================================================
   5bis) CAP de largeur : éviter l'effet "trop étroit" sur desktop
   (si ton thème force un container trop petit)
   ========================================================= */
@media (min-width: 1024px) {
  /* On garde un maximum raisonnable mais plus large que l'état actuel */
  .sagaa-sf-front{
    max-width: 980px;
  }
}

/* =========================================================
   Important : si tu ne vois AUCUN changement après ajout,
   c'est quasi toujours un souci de cache.
   => Dans WP : purge cache (LWS Optimize / plugin cache) + Ctrl+F5
   ========================================================= */
