/* =========================
   PAVA — CSS nettoyé (stable)
   ========================= */

/* --- Topbar (bandeau noir) --- */
.topbar-user {
  width: 100vw;
  background: #111;
  color: #fff;
  padding: 2px 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.topbar-table {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
}

.topbar-cell {
  width: 25%;
  text-align: center;
  vertical-align: middle;
  padding: 1px 2px;
  font-size: 12px;
  white-space: nowrap;
}

.topbar-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.topbar-link:hover {
  text-decoration: underline;
}

/* Badge vert connecté */
.status-connected {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #1db954;
  border-radius: 50%;
}

/* --- Layout global --- */
.pava-wrap,
.pava-mes-jeunes,
.pava-front-list {
  max-width: 1400px;
  font-size: 13px;
  line-height: 1.25;
}

.pava-h2 {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.pava-h3 {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 800;
}

.pava-muted {
  color: #666;
  opacity: .75;
  font-size: 12px;
}

/* --- Cards / toolbars --- */
.pava-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  overflow: auto;
  /* utile pour sticky header */
}

.pava-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 10px 0 14px;
}

/* --- Inputs --- */
.pava-card label {
  font-weight: 800;
  font-size: 12px;
  display: inline-block;
  margin-bottom: 4px;
}

.pava-input,
.pava-select {
  height: 34px;
  padding: 6px 100px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  max-width: 100%;
}

.pava-input {
  min-width: 220px;
}

.pava-card textarea.pava-input {
  width: min(20cm, 100%);
  height: 3cm;
  padding: 10px;
  line-height: 1.25;
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}


/* --- Boutons (visibles avant hover) --- */
.pava-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .18);
  background: #f3f4f6;
  color: #111;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
}

.pava-btn:hover {
  background: #e5e7eb;
}

.pava-btn--primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: 800;
}

.pava-btn--primary:hover {
  background: #1e40af;
}

.pava-btn--ghost {
  background: transparent;
  border-color: rgba(0, 0, 0, .22);
  color: #111;
}

.pava-btn--ghost:hover {
  background: #e5e7eb;
}

.pava-btn:disabled,
button.pava-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Boutons icônes */
.pava-icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
}

/* --- Badges workflow --- */
.pava-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #f6f6f6;
}

.pava-badge--p1 {
  background: #e7f1ff;
  color: #0b57d0;
}

.pava-badge--p2 {
  background: #eafff1;
  color: #137333;
}

.pava-badge--p3 {
  background: #fff4e5;
  color: #b05a00;
}

.pava-badge--sortie {
  background: #fde7e9;
  color: #b3261e;
}

.pava-badge--termine {
  background: #f1f3f4;
  color: #3c4043;
}

.pava-badge--refus {
  background: #b3261e;
  color: #fff;
}

/* --- User menu --- */
.pava-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pava-user-menu .pava-muted {
  font-weight: 600;
}

/* --- Tableau “Mes jeunes” (compact + sticky) --- */
.pava-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
  table-layout: auto;
}

.pava-table thead th {
  background: #f7f8fa;
  color: #111;
  font-weight: 700;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  border-bottom: 1px solid #e6e8eb;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pava-table td {
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pava-table tr:last-child td {
  border-bottom: none;
}

.pava-table thead th {
  text-align: center;
}

/* Colonnes qui peuvent “wrap” (nom/prénom/référent) */
.pava-table th:nth-child(2),
.pava-table td:nth-child(2),
.pava-table th:nth-child(3),
.pava-table td:nth-child(3),
.pava-table th:nth-child(8),
.pava-table td:nth-child(8) {
  white-space: normal;
}

/* Colonnes plus serrées (adaptées à ton tableau actuel) */
.pava-table th:nth-child(4),
.pava-table td:nth-child(4) {
  width: 90px;
}

/* Année */
.pava-table th:nth-child(9),
.pava-table td:nth-child(9) {
  width: 95px;
}

/* Etat */

/* --- Stats list (si utilisé) --- */
.pava-stats-list>div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.pava-stats-list span:first-child {
  font-weight: 600;
}

/* --- Tables WP “widefat” (si tu en as ailleurs) --- */
.pava-wrap table.widefat {
  font-size: 12px;
}

.pava-wrap table.widefat th,
.pava-wrap table.widefat td {
  padding: 6px 8px !important;
  line-height: 1.15;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.pava-wrap table.widefat td a {
  white-space: nowrap;
}

.pava-wrap table.widefat thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .10);
}

/* =========================================
   PAVA — FORCE STYLE BOUTONS ACTIONS
   (écrase le thème / autres règles)
   ========================================= */

.pava-wrap a.pava-btn,
.pava-wrap button.pava-btn,
.pava-wrap input.pava-btn,
.pava-wrap .pava-btn {
  background: #f3f4f6 !important;
  color: #111 !important;
  border: 1px solid rgba(0, 0, 0, .18) !important;
  opacity: 1 !important;
  text-decoration: none !important;
}

/* Hover : noir + texte blanc (comme tu veux) */
.pava-wrap a.pava-btn:hover,
.pava-wrap button.pava-btn:hover,
.pava-wrap input.pava-btn:hover,
.pava-wrap .pava-btn:hover {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}

/* Boutons icônes (P1/P2/P3 dans le tableau) */
.pava-wrap a.pava-icon-btn,
.pava-wrap button.pava-icon-btn,
.pava-wrap .pava-icon-btn {
  background: #f3f4f6 !important;
  color: #111 !important;
  border: 1px solid rgba(0, 0, 0, .18) !important;
}

.pava-wrap a.pava-icon-btn:hover,
.pava-wrap button.pava-icon-btn:hover,
.pava-wrap .pava-icon-btn:hover {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}

/* Si tu as des boutons "primary", on garde un style cohérent */
.pava-wrap .pava-btn--primary {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}

.pava-wrap .pava-btn--primary:hover {
  background: #1e40af !important;
  border-color: #1e40af !important;
}