/* =========================
   Base / éléments communs
   ========================= */
.wprr-form-wrap{max-width:720px;margin:10px auto;padding:8px}
.wprr-form label{font-weight:600}
.wprr-form input,
.wprr-form select,
.wprr-form textarea{box-sizing:border-box;padding:8px}
.wprr-alert.success{background:#e6ffed;border:1px solid #b7f5c8;padding:10px 12px;border-radius:6px;margin-bottom:12px}
.wprr-alert.error{background:#ffecec;border:1px solid #ffb8b8;padding:10px 12px;border-radius:6px;margin-bottom:12px}
.wprr-btn{display:inline-block;padding:10px 16px;border-radius:8px;background:#111;color:#fff;border:0;cursor:pointer}
.wprr-btn:hover{opacity:.9}

/* =========================
   Tableau & actions
   ========================= */
.wprr-table{width:100%;border-collapse:collapse}
.wprr-table td,.wprr-table th{padding:12px;text-align:center;vertical-align:middle}
.wprr-table thead th{position:sticky;top:0;background:#fff;z-index:1}
.wprr-table-wrap{overflow-x:auto}

.wprr-actions{gap:10px;flex-wrap:wrap}
.wprr-actions .button,
.wprr-qe-panel .button{min-width:120px;text-align:center;padding:8px 14px;line-height:1.2;border-radius:6px}
.wprr-actions .wprr-qe-toggle.button{background:#1e73be;border-color:#1e73be;color:#fff}
.wprr-qe-panel .button.button-primary{background:#005fcc;border-color:#005fcc;color:#fff}
.wprr-qe-panel .button.wprr-qe-cancel{background:#f1f1f1;border-color:#dcdcdc;color:#333}

/* =========================
   Formulaires (ajout / filtres)
   ========================= */
.wprr-form .wprr-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:12px}
.wprr-form .wprr-grid .wide{grid-column:1/-1}
.wprr-form input[type="text"],
.wprr-form input[type="tel"],
.wprr-form input[type="email"],
.wprr-form input[type="number"],
.wprr-form select,
.wprr-form textarea,
.wprr-form .flatpickr-input{width:100%;height:44px;padding:10px 12px;border:1px solid #D0D5DD;border-radius:8px;background:#fff;box-sizing:border-box;line-height:22px}
.wprr-form textarea{min-height:120px;height:auto}

.wprr-search-wrap{padding:8px 12px}
.wprr-actions .button{min-width:180px;font-weight:600}
.wprr-search-form p{display:grid!important;grid-template-columns:repeat(3,minmax(160px,1fr));gap:10px 14px}
.wprr-search-form label{font-size:14px}
.wprr-search-form input[type="date"],
.wprr-search-form select{width:100%;height:44px;border-radius:10px;border:1px solid #D0D5DD;padding:10px 12px;box-sizing:border-box}
.wprr-search-form .button{height:44px;border-radius:10px}
.wprr-search-wrap .wprr-ca-box,
.wprr-search-wrap form[action*="wprr_save_daily_ca"]{width:100%}
.wprr-search-wrap input[name="daily_ca_value"]{width:100%;max-width:420px;height:48px;border-radius:10px}

/* =========================
   Édition rapide (panneau)
   ========================= */
.wprr-qe-panel{width:100%}
.wprr-qe-panel .wprr-form{display:grid;grid-template-columns:repeat(2,minmax(320px,1fr));gap:12px 20px}
.wprr-qe-panel .wprr-form .wide{grid-column:1/-1}
.wprr-qe-panel .wprr-field{margin:8px 0}
.wprr-qe-panel .wprr-field>label{display:block;margin-bottom:6px;font-weight:600}
.wprr-qe-panel .wprr-field input[type="text"],
.wprr-qe-panel .wprr-field input[type="email"],
.wprr-qe-panel .wprr-field input[type="number"],
.wprr-qe-panel .wprr-field select,
.wprr-qe-panel .wprr-field .flatpickr-input{width:100%;height:48px;padding:10px 12px;border:1px solid #D0D5DD;border-radius:10px;box-sizing:border-box;font-size:14px}
.wprr-qe-panel .wprr-field textarea{width:100%;min-height:140px;padding:10px 12px;border:1px solid #D0D5DD;border-radius:10px;box-sizing:border-box;font-size:14px;resize:vertical}

/* =========================
   Modal (popup édition)
   ========================= */
.wprr-modal{position:fixed;inset:0;z-index:9999;display:none}
.wprr-modal.is-open{display:block}
.wprr-modal__overlay{position:absolute;inset:0;background:rgba(17,24,39,.45)}
.wprr-modal__dialog{position:relative;margin:5vh auto;max-width:760px;width:92%;background:#fff;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.25);padding:16px 16px 20px}
.wprr-modal__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.wprr-modal__header h3{margin:0;font-size:18px;font-weight:700}
.wprr-modal__close{background:transparent;border:0;font-size:28px;line-height:1;cursor:pointer}
.wprr-modal__form{display:grid;gap:12px 16px;grid-template-columns:repeat(2,minmax(320px,1fr))}
.wprr-modal__form .wide{grid-column:1/-1}
.wprr-modal__form .wprr-field label{display:block;font-weight:600;margin-bottom:6px}
.wprr-modal__form input[type="text"],
.wprr-modal__form input[type="email"],
.wprr-modal__form input[type="number"],
.wprr-modal__form select,
.wprr-modal__form .flatpickr-input{width:100%;height:48px;padding:10px 12px;border:1px solid #D0D5DD;border-radius:10px;box-sizing:border-box;font-size:14px}
.wprr-modal__form textarea{width:100%;min-height:140px;padding:10px 12px;border:1px solid #D0D5DD;border-radius:10px;box-sizing:border-box;font-size:14px;resize:vertical}
.wprr-modal__actions{grid-column:1/-1;display:flex;gap:10px;justify-content:flex-end;margin-top:6px}

/* =========================
   Responsive
   ========================= */
/* Actions en mobile */
@media (max-width:680px){
  .wprr-actions{justify-content:stretch}
  .wprr-actions .button{flex:1 1 100%;height:48px}
  .wprr-table td:nth-child(10) .button{width:100%;height:42px;border-radius:10px;margin:0 auto;display:block}
}

/* Filtres en colonnes adaptatives */
@media (max-width:900px){.wprr-search-form p{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.wprr-search-form p{grid-template-columns:1fr}}

/* Modal en mobile */
@media (max-width:820px){
  .wprr-modal__dialog{width:94%;margin:4vh auto}
  .wprr-modal__form{grid-template-columns:1fr}
}

/* Cacher colonnes secondaires petit à petit
   Ordre: 1 N° | 2 Statut | 3 Nom | 4 Couverts | 5 Table | 6 Heure | 7 Commentaire | 8 Email | 9 Téléphone | 10 Action
*/
@media (max-width:980px){
  .wprr-table th:nth-child(8),.wprr-table td:nth-child(8),
  .wprr-table th:nth-child(9),.wprr-table td:nth-child(9){display:none}
}
@media (max-width:760px){
  .wprr-table th:nth-child(7),.wprr-table td:nth-child(7){display:none}
}
/* 👉 Conserver la colonne "Table" visible en mobile */
@media (max-width:600px){
  .wprr-table th:nth-child(5),.wprr-table td:nth-child(5){display:table-cell!important}
}
@media (max-width:460px){
  .wprr-table th:nth-child(2),.wprr-table td:nth-child(2){display:none}
  .wprr-table td,.wprr-table th{padding:10px;font-size:14px}
}

/* Tablette : padding un peu réduit */
@media (min-width:641px) and (max-width:900px){
  .wprr-table td,.wprr-table th{padding:10px}
}

/* Petites touches tactiles */
.wprr-search-form input,
.wprr-search-form select,
.wprr-actions .button{-webkit-tap-highlight-color:transparent}

/* Tableau plus compact en général */
.wprr-table th,
.wprr-table td{
  padding: 8px 10px;       /* avant 12px */
  font-size: 14px;         /* avant 16px environ selon thème */
}

/* En-têtes légèrement plus petits */
.wprr-table thead th{
  font-weight: 600;
  font-size: 13.5px;
}

/* Encore plus compact sur mobile */
@media (max-width: 640px){
  .wprr-table th,
  .wprr-table td{
    padding: 6px 8px;
    font-size: 13px;
  }
}
/* Mobile: hide the first column (N°) */
@media (max-width: 640px){
  .wprr-table thead th:nth-child(1),
  .wprr-table tbody td:nth-child(1){
    display: none !important;
  }
}

/* Rangée RECHERCHE (haut) */
.wprr-filters-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(160px,1fr));
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 10px;
}
.wprr-filters-grid label{ font-size:14px; }
.wprr-filters-grid input[type="date"],
.wprr-filters-grid select{
  width:100%; height:44px; border-radius:10px; border:1px solid #D0D5DD; padding:10px 12px;
}
.wprr-filter-actions{ display:flex; gap:8px; }
.wprr-filter-actions .button{ height:44px; border-radius:10px; }

/* Rangée EXPORT (dessous) */
.wprr-export-grid{
  display:grid;
  grid-template-columns: 200px 220px 1fr 180px;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border:1px dashed #E5E7EB; border-radius:10px; background:#FAFAFB;
}
.wprr-export-fields{
  display:flex; gap:10px; flex-wrap:wrap;
}
.wprr-export-actions{ display:flex; justify-content:flex-end; }
.wprr-export-actions .button{ height:40px; border-radius:10px; }

@media (max-width: 900px){
  .wprr-filters-grid{ grid-template-columns: repeat(2, 1fr); }
  .wprr-export-grid{ grid-template-columns: 1fr; }
  .wprr-export-actions{ justify-content: stretch; }
  .wprr-export-actions .button{ width:100%; }
}
@media (max-width: 560px){
  .wprr-filters-grid{ grid-template-columns: 1fr; }
}
/* < 980px : masquer Email (8), Téléphone (9) ET Source (10) */
@media (max-width: 980px){
  .wprr-table th:nth-child(8), .wprr-table td:nth-child(8),
  .wprr-table th:nth-child(9), .wprr-table td:nth-child(9),
  .wprr-table th:nth-child(10), .wprr-table td:nth-child(10){
    display:none;
  }
}

/* < 760px : masquer aussi Commentaire (7) */
@media (max-width: 760px){
  .wprr-table th:nth-child(7), .wprr-table td:nth-child(7){
    display:none;
  }
}

/* < 600px : garder Table (5) visible, ne rien masquer ici */
@media (max-width: 600px){}

/* < 480px : alléger encore (masquer N° (1) et Statut (2)) */
@media (max-width: 480px){
  .wprr-table thead th:nth-child(1),
  .wprr-table thead th:nth-child(2),
  .wprr-table tbody td:nth-child(1),
  .wprr-table tbody td:nth-child(2){
    display:none;
  }
  .wprr-table td, .wprr-table th{ padding: 8px 10px; }
}

/* Bouton “Action” (11ᵉ) plein écran en mobile */
@media (max-width: 680px){
  .wprr-table td:nth-child(11) .button{
    width:100%; height:42px; border-radius:10px; display:block; margin:0 auto;
  }
}

/*  mobile    */
/* -------- Layout général du formulaire -------- */

.wprr-wrap.wprr-form-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 12px;
}

.wprr-form .wprr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.wprr-form .wprr-field.wide {
  grid-column: 1 / -1;
}

/* Champs */
.wprr-form input[type="text"],
.wprr-form input[type="tel"],
.wprr-form input[type="email"],
.wprr-form input[type="number"],
.wprr-form select,
.wprr-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #D0D5DD;
  font-size: 16px;         /* important pour éviter le zoom iOS */
  line-height: 1.4;
}

.wprr-form textarea {
  min-height: 120px;
}

/* Bouton */
.wprr-actions .wprr-btn {
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 999px;
}

/* -------- Adaptation tablette -------- */
@media (max-width: 900px) {
  .wprr-form .wprr-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 12px;
  }
}

/* -------- Adaptation mobile -------- */
@media (max-width: 640px) {

  .wprr-wrap.wprr-form-wrap {
    padding: 12px 10px;
  }

  .wprr-form .wprr-grid {
    grid-template-columns: 1fr;   /* 1 colonne sur mobile */
    gap: 10px;
  }

  .wprr-form label {
    font-size: 14px;
  }

  .wprr-actions {
    grid-column: 1 / -1;
    text-align: center;
  }

  .wprr-actions .wprr-btn {
    width: 100%;                  /* bouton full-width sur mobile */
    display: block;
  }
}
.menu-item-logout > a {
  background: #e11d48;
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.menu-item-logout > a:hover {
  background: #be123c;
}





