/* WPZ – Contact Prestataires (scope .wpz-prestas) */
.wpz-prestas{
  --gap:14px;
  --radius:18px;
  --soft:#f6f7f8;
  --soft-alt:#eef0f4;
  --line:#e2e4e8;
  --ink:#0f172a;
  --muted:#667085;
  --brand:#5CA174;
  --brand-soft:rgba(92,161,116,.08);
  --prune:#9C1657;
  --danger:#dc2626;
  --shadow:0 10px 26px rgba(15,23,42,.10);
  color:var(--ink);
  font-family:inherit;
  padding-bottom:env(safe-area-inset-bottom);
}

.wpz-prestas__head{
  margin:4px 0 18px;
}

.wpz-prestas__title{
  margin:0 0 4px;
  font-size:1.35rem;
  font-weight:650;
}

.wpz-prestas__subtitle{
  margin:0;
  color:var(--muted);
  font-size:.95rem;
}

.wpz-prestas__controls{
  margin-top:16px;
  display:flex;
  flex-wrap:wrap;
  gap:var(--gap);
  align-items:center;
}

.wpz-prestas__controls-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.wpz-prestas__info{
  font-size:.88rem;
  color:var(--muted);
}

.wpz-p-btn{
  padding:9px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:.9rem;
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
  transition:background .18s ease, transform .12s ease, box-shadow .18s ease;
}

.wpz-p-btn--brand{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  font-weight:600;
  box-shadow:0 8px 18px rgba(92,161,116,.35);
}

.wpz-p-btn--ghost{
  background:var(--soft);
}

.wpz-p-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(15,23,42,.15);
}

.wpz-p-btn:active{
  transform:translateY(0);
  box-shadow:none;
}

.wpz-p-saved{
  margin-left:auto;
  font-size:.88rem;
  color:var(--muted);
  min-width:130px;
  text-align:right;
}



/* -------- TABLE / LISTE (scrollable) -------- */

.wpz-prestas .wpz-prestas__table-wrap{
  position:relative;
  border-radius:24px;
  background:#fff;
  margin:18px 0 90px;
  box-shadow:0 10px 26px rgba(15,23,42,.10);
  border:1px solid rgba(148,163,184,.35);
  overflow-x:auto !important;            /* scroll horizontal si besoin */
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
}

.wpz-prestas .wpz-prestas__table{
  width:100% !important;
  min-width:720px !important;            /* force la largeur mini => déclenche le scroll sur mobile */
  border-collapse:collapse !important;
  border-spacing:0 !important;
  background:transparent;
}

.wpz-prestas .wpz-prestas__table thead{
  background:#f1f5f9;
}

.wpz-prestas .wpz-prestas__table th,
.wpz-prestas .wpz-prestas__table td{
  padding:10px 12px !important;
  font-size:.9rem;
  vertical-align:middle;
}

/* En-têtes */
.wpz-prestas .wpz-prestas__table thead th{
  font-weight:600;
  color:var(--muted);
  text-align:left;
  text-transform:uppercase;
  letter-spacing:.03em;
  font-size:.78rem;
}

/* Lignes */
.wpz-prestas .wpz-prestas__table tbody tr{
  border-top:1px solid rgba(226,232,240,0.9);
}

.wpz-prestas .wpz-prestas__table tbody tr:nth-child(2n){
  background:#f9fafb;
}

.wpz-prestas .wpz-prestas__table tbody tr:hover{
  background:#eef2ff;
}

/* Tag profession */
.wpz-prestas .wpz-p-tag-prof{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  background:linear-gradient(120deg, rgba(92,161,116,.10), rgba(156,22,87,.06));
  color:var(--brand);
  font-size:.78rem;
  font-weight:600;
  text-transform:capitalize;
  letter-spacing:.02em;
  margin-bottom:4px;
}

/* Nom du presta */
.wpz-prestas .wpz-p-name{
  font-weight:650;
  font-size:1rem;
  margin-top:2px;
}

/* Tél / email */
.wpz-prestas .wpz-p-contact{
  font-size:.86rem;
  color:var(--muted);
}

/* Case “à partager” */
.wpz-prestas .wpz-p-share-check{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.86rem;
  color:var(--muted);
}

.wpz-prestas .wpz-p-share-check input[type="checkbox"]{
  width:17px;
  height:17px;
}

/* Boutons actions */
.wpz-prestas .wpz-p-actions{
  text-align:right;
  white-space:nowrap;
}

.wpz-prestas .wpz-p-iconbtn{
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:1.15rem;
  line-height:1;
  padding:3px 5px;
  opacity:.85;
  transition:transform .1s ease, opacity .1s ease;
}

.wpz-prestas .wpz-p-iconbtn:hover{
  transform:scale(1.07);
  opacity:1;
}

.wpz-prestas .wpz-p-iconbtn--danger{
  color:var(--danger);
}

/* Message vide */
.wpz-prestas .wpz-prestas__empty{
  margin-top:10px;
  font-size:.94rem;
  color:var(--muted);
}

/* -------- MOBILE : on garde le tableau, on scroll -------- */

@media (max-width:700px){

  .wpz-prestas .wpz-prestas__controls{
    flex-direction:column;
    align-items:stretch;
  }

  .wpz-prestas .wpz-prestas__controls-actions{
    width:100%;
  }

  .wpz-prestas .wpz-prestas__controls-actions .wpz-p-btn{
    flex:1 1 auto;
    justify-content:center;
  }

  .wpz-prestas .wpz-p-saved{
    margin-left:0;
    text-align:left;
  }

  .wpz-prestas .wpz-prestas__table-wrap{
    border-radius:18px;
    box-shadow:0 8px 20px rgba(15,23,42,.12);
    overflow-x:auto !important;          /* important : scroll horizontal sur mobile */
  }

  .wpz-prestas .wpz-prestas__table{
    min-width:720px !important;          /* garde la même largeur pour forcer le scroll */
  }

  .wpz-prestas .wpz-prestas__table th,
  .wpz-prestas .wpz-prestas__table td{
    padding:8px 10px !important;
    font-size:.85rem;
  }
}



/* -------- TABLE STYLE DESKTOP -------- */

@media (min-width:701px){
  .wpz-prestas__table-wrap{
    border:1px solid var(--line);
    background:#fff;
    box-shadow:var(--shadow);
    overflow:hidden;
  }

  .wpz-prestas__table thead th{
    background:var(--soft-alt);
    font-weight:600;
    color:var(--muted);
    text-align:left;
    padding:11px 12px;
  }

  .wpz-prestas__table tbody tr{
    border-top:1px solid var(--line);
  }

  .wpz-prestas__table tbody tr:nth-child(2n){
    background:#fbfbfc;
  }

  .wpz-prestas__table tbody tr:hover{
    background:#f3f4f8;
  }

  .wpz-prestas__table tbody td{
    padding:9px 12px;
  }
}

/* -------- DOCK BAS -------- */

.wpz-prestas-dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(248,249,251,.96);
  backdrop-filter:blur(16px);
  border-top:1px solid var(--line);
  box-shadow:0 -8px 22px rgba(15,23,42,.16);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  z-index:9999;
}

.wpz-prestas-dock__txt{
  font-size:.87rem;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}

.wpz-prestas-dock__txt strong{
  color:var(--ink);
}

.wpz-prestas-dock__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.wpz-prestas-dock__actions .wpz-p-btn{
  font-size:.85rem;
  padding:8px 14px;
}

@media (max-width:700px){
  .wpz-prestas-dock{
    flex-direction:column;
    align-items:flex-start;
  }
  .wpz-prestas-dock__actions{
    width:100%;
  }
  .wpz-prestas-dock__actions .wpz-p-btn{
    flex:1 1 auto;
    justify-content:center;
  }
}

/* -------- PANNEAU ÉDITION -------- */

.wpz-prestas-panel{
  position:fixed;
  inset:0;
  z-index:10000;
  display:none;
  align-items:flex-end;
  justify-content:center;
}

.wpz-prestas-panel.is-open{
  display:flex;
}

.wpz-prestas-panel__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.45);
}

.wpz-prestas-panel__content{
  position:relative;
  width:100%;
  max-width:540px;
  background:#fff;
  border-radius:24px 24px 0 0;
  padding:18px 18px 16px;
  box-shadow:0 -18px 38px rgba(15,23,42,.30);
  z-index:1;
}

@media (min-width:800px){
  .wpz-prestas-panel__content{
    margin-bottom:40px;
    border-radius:24px;
  }
}

.wpz-prestas-panel__title{
  margin:0 0 10px;
  font-size:1.1rem;
  font-weight:600;
}

.wpz-prestas-panel__field{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:10px;
}

.wpz-prestas-panel__field label{
  font-size:.9rem;
  color:var(--muted);
}

.wpz-prestas-panel__field input{
  padding:9px 11px;
  border-radius:10px;
  border:1px solid var(--line);
  font-size:.92rem;
}

.wpz-prestas-panel__field small{
  font-size:.8rem;
  color:var(--muted);
}

.wpz-prestas-panel__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:10px;
}

.wpz-prestas-panel__btn{
  padding:9px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--soft);
  cursor:pointer;
  font-size:.9rem;
}

.wpz-prestas-panel__btn--primary{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  font-weight:600;
}

/* -------- PANNEAU PARTAGE -------- */

.wpz-prestas-share{
  position:fixed;
  inset:0;
  z-index:10001;
  display:none;
  align-items:flex-end;
  justify-content:center;
}

.wpz-prestas-share.is-open{
  display:flex;
}

.wpz-prestas-share__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.45);
}

.wpz-prestas-share__content{
  position:relative;
  width:100%;
  max-width:680px;
  background:#fff;
  border-radius:24px 24px 0 0;
  padding:18px 18px 16px;
  box-shadow:0 -18px 38px rgba(15,23,42,.30);
  z-index:1;
  max-height:90vh;
  overflow:auto;
}

@media (min-width:900px){
  .wpz-prestas-share__content{
    margin-bottom:40px;
    border-radius:24px;
  }
}

.wpz-prestas-share__title{
  margin:0 0 10px;
  font-size:1.1rem;
  font-weight:600;
}

.wpz-prestas-share__section{
  margin-bottom:10px;
  border-radius:12px;
  padding:10px 10px;
  background:var(--soft);
}

.wpz-prestas-share__section h4{
  margin:0 0 6px;
  font-size:.95rem;
  font-weight:600;
}

.wpz-prestas-share__section p{
  margin:0 0 6px;
  font-size:.85rem;
  color:var(--muted);
}

.wpz-prestas-share__radios{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:.9rem;
}

.wpz-prestas-share__radios label{
  display:flex;
  align-items:center;
  gap:6px;
}

.wpz-prestas-share__list{
  max-height:140px;
  overflow:auto;
  border-radius:10px;
  background:#fff;
  padding:6px 8px;
  border:1px solid var(--line);
  font-size:.85rem;
}

.wpz-prestas-share__list-item{
  display:flex;
  align-items:center;
  gap:6px;
  padding:3px 2px;
}

.wpz-prestas-share__list-item span{
  color:var(--muted);
}

.wpz-prestas-share__chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.wpz-prestas-share__chip{
  padding:3px 8px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  font-size:.8rem;
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.wpz-prestas-share__chip button{
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:.85rem;
}

.wpz-prestas-share__preview textarea{
  width:100%;
  min-height:120px;
  border-radius:10px;
  border:1px solid var(--line);
  padding:8px 10px;
  font-size:.88rem;
  resize:vertical;
}

.wpz-prestas-share__actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}

.wpz-prestas-share__status{
  font-size:.85rem;
  color:var(--muted);
  margin-right:auto;
  min-height:18px;
  display:flex;
  align-items:center;
}

.wpz-prestas-share__btn{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--soft);
  cursor:pointer;
  font-size:.85rem;
}

.wpz-prestas-share__btn--brand{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  font-weight:600;
}

/* Impression */
@media print {
  header, footer,
  .wpz-prestas-dock,
  .wpz-prestas-panel,
  .wpz-prestas-share { display:none !important; }
  .wpz-prestas__table-wrap{
    box-shadow:none;
    border:0;
    margin-bottom:0;
  }
  .wpz-prestas__table{
    width:100%;
  }
  .wpz-prestas__table thead{
    display:table-header-group;
  }
  .wpz-prestas__table tbody tr{
    display:table-row;
    box-shadow:none;
    border-radius:0;
  }
  .wpz-prestas__table td{
    display:table-cell;
    padding:6px 8px;
  }
}




/* -------- BOUTON FLOTTANT AJOUT PRESTATAIRE -------- */

.wpz-prestas-fab{
  position:fixed;
  right:18px;
  bottom:50px; /* juste au-dessus du dock bas */
  width:54px;
  height:54px;
  border-radius:999px;
  border:none;
  background:var(--brand);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(15,23,42,.35);
  z-index:999;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.wpz-prestas-fab:hover{
  transform:translateY(-1px) scale(1.03);
  box-shadow:0 14px 32px rgba(15,23,42,.45);
}

.wpz-prestas-fab:active{
  transform:translateY(0) scale(.97);
  box-shadow:0 8px 18px rgba(15,23,42,.30);
}

.wpz-prestas-fab:focus-visible{
  outline:2px solid #0f766e;
  outline-offset:3px;
}

@media (max-width:700px){
  .wpz-prestas-fab{
    right:14px;
    bottom:90px; /* un peu plus haut pour laisser respirer le dock sur mobile */
    width:50px;
    height:50px;
    font-size:1.8rem;
  }
}
