/* ============================================================
   Prestations, Zones et Tarifs – Julie Le Bigot
   ============================================================ */

/* === STRUCTURE GLOBALE === */
.jlb-prestations-section,
.jlb-zones-section,
.jlb-tarifs-section {
  background: var(--blanc);
  border-radius: 12px;
  box-shadow: var(--ombre-douce);
  margin: 2rem auto;
  padding: 2rem;
  max-width: 950px;
}

/* === TITRES === */
.jlb-prestations-section h2,
.jlb-zones-section h2,
.jlb-tarifs-section h2,
.zones-intervention h2 {
  text-align: center !important;
  color: var(--rose-fonce);
  margin-bottom: 1.5rem;
}

/* === PRESTATIONS === */
.jlb-prestations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* === ZONES === */
.jlb-zones {
  margin-bottom: 1.5rem;
}

/* === Tableau des communes === */
.jlb-zones-html-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
  table-layout: fixed; /* empêche les noms longs de casser la mise en page */
}

.jlb-zones-html-table th {
  padding: 0.5rem;
  text-align: center;
}

.jlb-zones-html-table td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid #eee;
  white-space: nowrap;     /* garde les noms sur une seule ligne */
  overflow: hidden;
  text-overflow: ellipsis; /* coupe proprement si trop long */
}



/* ============================================================
   💰 SECTION TARIFS – Mise en page des deux modes
   ============================================================ */
.jlb-tarifs-section {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem 1.5rem;
  margin: 3rem auto;
  max-width: 1100px;
  font-family: "Inter", sans-serif;
}

/* ---- Titre principal ---- */
.jlb-tarifs-section h2 {
  text-align: center;
  color: var(--rose-fonce);
  margin-bottom: 0.5rem;
}

/* ============================================================
   🎀 Encadré d’introduction des tarifs — mix centré/gauche
   ============================================================ */
.tarifs-intro {
  background: #fff4f8;
  border-radius: 12px;
  padding: 1.2rem 1.8rem;
  margin: 1rem auto 2rem;
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  color: var(--texte-gris-fonce);
}

/* ✨ Centre uniquement la première ligne */
.tarifs-intro br:first-of-type::before {
  content: "";
  display: block;
}

.tarifs-intro span.intro-line {
  display: block;
  text-align: center;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--rose-fonce);
}

/* 🩷 Le reste du texte reste aligné à gauche */
.tarifs-intro strong {
  color: var(--rose-fonce);
  font-weight: 700;
}


/* ---- Conteneur global des deux modes ---- */
.tarifs-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ---- Colonnes (Mode 1 / Mode 2) ---- */
.mode-col {
  background: #fff9fb;
  border: 1px solid #f4c6d7;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.mode-col:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ---- Titres des colonnes ---- */
.mode-col h3 {
  text-align: center;
  color: var(--rose-fonce);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}
.mode-col h3 small {
  display: block;
  color: var(--texte-gris-fonce);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ---- Cards individuelles ---- */
.jlb-card.jlb-tarif {
  background: #fff;
  border: 1px solid #f4c6d7;
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.jlb-card.jlb-tarif:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* ---- Titres des cartes ---- */
.jlb-card.jlb-tarif h4 {
  color: var(--rose-fonce);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.jlb-card.jlb-tarif h4 small {
  display: block;
  font-weight: 500;
  color: var(--texte-gris-fonce);
  font-size: 0.9rem;
}

/* ---- Prix et notes ---- */
.jlb-card.jlb-tarif .prix {
  font-size: 1.3rem;
  font-weight: 700;
  color: #b2004b;
  margin-bottom: 0.2rem;
}
.jlb-card.jlb-tarif .note {
  font-size: 0.95rem;
  color: var(--texte-gris-fonce);
}

/* ---- Card spécifique des frais km ---- */
.jlb-card.jlb-tarif.frais {
  background: #fff4f8;
  border: 1px dashed #e49bb8;
}
.jlb-card.jlb-tarif.frais h4 {
  color: #b2004b;
}
.jlb-card.jlb-tarif.frais .prix {
  color: #d32f71;
}

/* ---- Bandeau des suppléments ---- */
.jlb-supplements {
  margin-top: 2.5rem;
  background: #fff4f8;
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid #f3b2c2;
  text-align: center;
}
.jlb-supplements h3 {
  color: #b2004b;
  margin-bottom: 1.2rem;
}
.jlb-supp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}
.supp-item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f3b2c2;
  padding: 1rem;
  font-weight: 600;
  color: #333;
  transition: background 0.3s;
}
.supp-item:hover {
  background: #ffe9f0;
}

/* === ============================ === */
/* === ============================ === */

/* === Grille dynamique des zones === */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  text-align: left;
  margin-top: 1rem;
}

.zone-column {
  background: #fff;
  border-radius: 8px;
  padding: 10px 15px;
  box-shadow: var(--ombre-douce);
}

.zone-column h4 {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.zone-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zone-column li {
  font-size: 0.95rem;
  line-height: 1.3;
  padding-left: 4px;
}

/* === Tableau des zones – version finale === */
.jlb-zones-html-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem; /* -1 step pour éviter la coupure */
  table-layout: fixed; /* empêche les retours à la ligne imprévus */
}

.jlb-zones-html-table th {
  padding: 0.5rem;
  text-align: center;
}

.jlb-zones-html-table td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid #f3d6e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 💗 Séparation verticale entre Zone 1 et Zone 2 */
.jlb-zones-html-table td:nth-child(2),
.jlb-zones-html-table th.zone1 {
  border-right: 2px solid #f3d6e0;
}

/* harmonisation des couleurs d’en-tête */
.jlb-zones-html-table th.zone1 {
  background: #ffe6ef;
  color: #a50044;
  border-bottom: 1px solid #f3d6e0;
}

/* Zone 2 = JAUNE */
.jlb-zones-html-table th.zone2 {
  background: #ffefc2 !important; /* jaune clair */
  color: #e67e22 !important;       /* orange doux */
  font-weight: 700;
  text-align: center;
}

/* Survol léger pour lisibilité */
.jlb-zones-html-table tr:hover td {
  background: #fff8fb;
}

/* Responsive : passe à 2 colonnes sur petit écran */
@media (max-width: 800px) {
  .jlb-zones-html-table {
    font-size: 0.85rem;
  }
  .jlb-zones-html-table td,
  .jlb-zones-html-table th {
    display: block;
    width: 100%;
    text-align: left;
  }
  .jlb-zones-html-table td:nth-child(2) {
    border-right: none;
  }
}

/*  Tarifs */
/* === Suppléments déplacement === */
.jlb-supplements {
  margin-top: 2rem;
  text-align: center;
  background: #fffafc;
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: var(--ombre-douce);
}

.jlb-supplements h3 {
  color: var(--rose-fonce);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.jlb-supp-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.supp-item {
  background: #fff;
  border: 1px solid #f3d6e0;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  min-width: 120px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.supp-item:hover {
  transform: scale(1.03);
  background: #fff7fa;
}

.supp-item strong {
  color: var(--rose-fonce);
  display: block;
  font-size: 1rem;
}


/* === Mini tableau à l'intérieur des cartes === */
.mini-tarif-table {
  margin-top: 0.6rem;
  border-top: 1px solid #f3d6e0;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f3d6e0;
}

.mini-row:last-child {
  border-bottom: none;
}

.zone-label {
  font-weight: 600;
  color: var(--rose-fonce);
}

.zone-price {
  font-weight: 500;
  color: #333;
}

/* === Ajustements titres cartes tarifs === */
.jlb-tarif h3 {
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

/* Mentions secondaires sous le titre (hors jardinage / déplacement) */
.jlb-tarif h3 small {
  display: block;
  font-size: 0.85rem;
  color: #888;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0.25rem;
}

/* Harmonisation des mini-tableaux pour qu’ils soient bien alignés */
.mini-tarif-table {
  margin-top: 0.8rem;
  border-top: 1px solid #f3d6e0;
  min-height: 90px; /* force une même hauteur visuelle sur les deux cartes */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-row {
  padding: 0.35rem 0;
}

.zone-label,
.zone-price {
  font-size: 0.95rem;
}



/* Sur mobile uniquement : empile les cartes */
@media (max-width: 900px) {
  .jlb-tarifs {
    flex-wrap: wrap;
  }
}

/* ============================================================
   🔍 Barre de recherche des communes
   ============================================================ */
.jlb-zone-search-wrapper {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--ombre-douce);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.jlb-zone-search-wrapper label {
  display: block;
  font-weight: 600;
  color: var(--rose-fonce);
  margin-bottom: 0.5rem;
}

#zone-search {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #f3d6e0;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.zone-suggestions-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
  display: inline-block;
  width: 100%;
}

.zone-suggestions-list li {
  padding: 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.zone-suggestions-list li:hover {
  background: #fff5f9;
  color: var(--rose-fonce);
}

.zone-result-text {
  margin-top: 0.8rem;
  font-weight: 600;
  color: #333;
}

.zone1-label {
  color: #b5004b;
}
.zone2-label {
  color: #004c8f;
}

/* 📱 Responsive – adaptée à mobile */
@media (max-width: 768px) {
  .jlb-zone-search-wrapper {
    margin-top: 1rem;
  }
}

/* 🎯 Style du label du filtre commune */
.zone-filter label {
  display: block;                 /* Pour qu'il prenne toute la largeur */
  text-align: center;             /* Centre le texte */
  font-weight: 600;               /* Gras mais pas trop épais */
  color: var(--rose-fonce);       /* Ta couleur rose principale */
  margin-bottom: 0.5rem;          /* Un petit espace avec le champ en dessous */
  font-size: 1.05rem;             /* Taille légèrement augmentée */
}

/* 🎯 Centrage des titres h3 dans les cards */
.jlb-card h3 {
  text-align: center;
  color: var(--rose-fonce);   /* pour rester cohérent avec ta charte */
  font-weight: 700;
  margin-bottom: 0.8rem;
}

/* ============================================================
   📱 Version mobile des zones (remplace le tableau <600px)
   ============================================================ */
#zones-mobile {
  display: none;
}

@media (max-width: 767px) {
  /* Cache le tableau classique */
  .jlb-zones-html-table {
    display: none !important;
  }

  /* Affiche la version mobile */
  #zones-mobile {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
  }

  .zone-bloc-mobile {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--ombre-douce);
    overflow: hidden;
  }

  .zone-header {
    text-align: center;
    font-weight: 700;
    padding: 0.5rem;
    color: #fff;
  }

  .zone-header.zone1 {
    background: #ffe6ef;
    color: #a50044;
  }
  .zone-header.zone2 {
    background: #e6f0ff;
    color: #0044cc;
  }

  /* Zone 3 */
  .zone-header.zone3 {
    background: #ffefc2 !important; /* même jaune que ton titre ordinateur */
    color: #e67e22 !important;       /* police orange */
    font-weight: 700;
  }

  .zone-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem 0.8rem;
    border-top: 1px solid #f3d6e0;
  }

  .zone-mobile-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f3d6e0;
  }

  .zone-mobile-list li:last-child {
    border-bottom: none;
  }
}


/* Zone 3 = BLEU */
.jlb-zones-html-table th.zone3 {
  background: #cce3ff !important; /* bleu clair */
  color: #2666af !important;       /* bleu foncé */
  font-weight: 700;
  text-align: center;
}


/* Ligne verticale complète entre Zone 1 et Zone 2 */
.jlb-zones-html-table th.zone1,
.jlb-zones-html-table td.zone1-ville {
    border-right: 2px solid #ccc !important;
}

/* Ligne verticale complète entre Zone 2 et Zone 3 */
.jlb-zones-html-table th.zone2,
.jlb-zones-html-table td.zone2-ville {
    border-right: 2px solid #ccc !important;
}

/* Marge à gauche de toutes les communes (environ 1 cm) */
.jlb-zones-html-table td.zone1-ville,
.jlb-zones-html-table td.zone2-ville,
.jlb-zones-html-table td.zone3-ville {
    padding-left: 1cm !important;
}
