/* Habillage WooCommerce - palette Trouve Adresse */

.woocommerce, .woocommerce-page {
  font-family: 'Inter', sans-serif;
  color: var(--ink, #191510);
  background: var(--bg, #FAF7F0);
}

.woocommerce #content, .woocommerce-page #content,
.woocommerce .entry-content, .woocommerce-page .entry-content {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 24px;
}

.woocommerce h1, .woocommerce h2, .woocommerce h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Boutons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order {
  background: #191510;
  color: #FAF7F0;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 26px;
  border: none;
  transition: background .2s ease, transform .2s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover {
  background: #1FAE68;
  color: #191510;
  transform: translateY(-2px);
}

/* Champs de formulaire */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout #payment,
.woocommerce table.shop_table {
  border-radius: 12px;
  border: 1px solid rgba(25,21,16,0.15);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
}
.woocommerce form .form-row label {
  font-weight: 600;
  font-size: 13px;
}

/* Bloc "Informations de réservation" (champs personnalisés) */
#trouve-adresse-champs {
  margin: 30px 0;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid rgba(25,21,16,0.12);
  border-radius: 16px;
}
#trouve-adresse-champs h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* Récapitulatif de commande */
.woocommerce-checkout-review-order-table {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
}

/* Mon compte */
.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 260px !important;
  min-width: 260px !important;
  flex: 0 0 260px !important;
  float: left;
  margin-right: 36px;
}
.woocommerce-account .woocommerce-MyAccount-content {
  flex: 1 1 auto !important;
  float: left;
  width: calc(100% - 300px);
}
.woocommerce-account::after {
  content: "";
  display: table;
  clear: both;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(25,21,16,0.12);
  width: 100%;
}
.woocommerce-account .woocommerce-MyAccount-navigation a {
  padding: 14px 20px;
  display: block;
  font-size: 15px;
  white-space: nowrap;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: #1FAE68;
  color: #FAF7F0;
}

/* Statuts de commande */
.woocommerce-orders-table__cell-order-status mark {
  background: none;
  font-weight: 600;
}

.woocommerce-account .is-layout-constrained {
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}

/* Onglet "Mes recherches" */
.trouve-adresse-recherches {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(25,21,16,0.12);
  width: 100%;
  table-layout: fixed;
}
.trouve-adresse-recherches th, .trouve-adresse-recherches td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.trouve-adresse-recherches th:nth-child(1), .trouve-adresse-recherches td:nth-child(1) { width: 140px; white-space: nowrap; }
.trouve-adresse-recherches th:nth-child(2), .trouve-adresse-recherches td:nth-child(2) { width: auto; }
.trouve-adresse-recherches th:nth-child(3), .trouve-adresse-recherches td:nth-child(3) { width: 140px; }
.trouve-adresse-recherches th:nth-child(4), .trouve-adresse-recherches td:nth-child(4) { width: auto; }

/* Lien "Voir sur la carte" dans Mes recherches */
.trouve-adresse-recherches a[href*="google.com/maps"] svg {
  transition: transform .2s ease;
}
.trouve-adresse-recherches a[href*="google.com/maps"]:hover svg {
  transform: translateY(-2px) scale(1.1);
}
.trouve-adresse-recherches a[href*="google.com/maps"]:hover {
  text-decoration: underline;
}

/* Tableaux de détails de commande (confirmation, "Voir la commande", adresse,
   informations complémentaires, liste des commandes) — colonnes équilibrées
   quel que soit le nombre de colonnes, pas de débordement */
.woocommerce-order-received table,
.woocommerce-view-order table,
.woocommerce-account table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid rgba(25,21,16,0.12);
  border-radius: 12px;
  overflow: hidden;
}
.woocommerce-order-received table th,
.woocommerce-view-order table th,
.woocommerce-account table th {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
  word-break: break-word;
  background: #F1EBDD;
}
.woocommerce-order-received table td,
.woocommerce-view-order table td,
.woocommerce-account table td {
  padding: 12px 14px;
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}
/* Tableaux à 2 colonnes (détails/informations complémentaires) :
   présentation empilée (libellé au-dessus, valeur en dessous) —
   s'adapte à n'importe quelle longueur de texte, ne se déforme jamais */
.woocommerce-order-received table:has(tr > *:nth-child(2):last-child),
.woocommerce-account table:has(tr > *:nth-child(2):last-child) tr,
.woocommerce-view-order table:has(tr > *:nth-child(2):last-child) tr {
  display: block;
}
.woocommerce-order-received table:has(tr > *:nth-child(2):last-child),
.woocommerce-account table:has(tr > *:nth-child(2):last-child) th,
.woocommerce-view-order table:has(tr > *:nth-child(2):last-child) th,
.woocommerce-order-received table:has(tr > *:nth-child(2):last-child),
.woocommerce-account table:has(tr > *:nth-child(2):last-child) td,
.woocommerce-view-order table:has(tr > *:nth-child(2):last-child) td {
  display: block;
  width: 100%;
}
.woocommerce-order-received table:has(tr > *:nth-child(2):last-child),
.woocommerce-account table:has(tr > *:nth-child(2):last-child) th,
.woocommerce-view-order table:has(tr > *:nth-child(2):last-child) th {
  padding-bottom: 4px;
  font-size: 12px;
  color: #77705F;
  background: transparent;
}
.woocommerce-order-received table:has(tr > *:nth-child(2):last-child),
.woocommerce-account table:has(tr > *:nth-child(2):last-child) td,
.woocommerce-view-order table:has(tr > *:nth-child(2):last-child) td {
  padding-top: 0;
  padding-bottom: 16px;
  font-size: 13px;
  color: #191510;
}

/* --- Version mobile (téléphone / petit écran) --- */
@media (max-width: 700px) {
  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100% !important;
    min-width: 100% !important;
    flex: 1 1 100% !important;
    float: none;
    margin-right: 0;
    margin-bottom: 24px;
  }
  .woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
  }
  .woocommerce-account::after {
    content: none;
  }
  .woocommerce-account .is-layout-constrained {
    max-width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation li {
    flex: 1 1 50%;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation a {
    font-size: 14px;
    padding: 12px 14px;
    white-space: normal;
  }

  .trouve-adresse-recherches {
    table-layout: auto;
  }
  .trouve-adresse-recherches th,
  .trouve-adresse-recherches td {
    display: block;
    width: 100% !important;
  }
  .trouve-adresse-recherches thead {
    display: none;
  }
  .trouve-adresse-recherches tr {
    display: block;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(25,21,16,0.12);
  }
}

@media (max-width: 700px) {
  .woocommerce-cart .is-layout-constrained,
  .woocommerce-checkout .is-layout-constrained {
    max-width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  .woocommerce table {
    font-size: 13px;
  }
}

/* "Informations complémentaires" (Lien web, Ville précise...) est en réalité
   une <dl> en grille CSS, pas un tableau — présentation empilée forcée */
.wc-block-components-additional-fields-list {
  display: block !important;
}
.wc-block-components-additional-fields-list dt {
  font-size: 13px;
  color: #77705F;
  font-weight: 600;
  margin: 12px 0 3px;
}
.wc-block-components-additional-fields-list dt:first-child {
  margin-top: 0;
}
.wc-block-components-additional-fields-list dd {
  margin: 0 0 3px 0;
  font-size: 13px;
  color: #191510;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Adresse de facturation — même taille que le reste des détails de commande */
.woocommerce-customer-details address {
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}
.woocommerce-customer-details h2 {
  font-size: 15px;
}

/* Statistiques du tableau de bord "Mon compte" */
.trouve-adresse-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.trouve-adresse-stat-card {
  background: #FFFFFF;
  border: 1px solid rgba(25,21,16,0.12);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
}
.trouve-adresse-stat-valeur {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
}
.trouve-adresse-stat-label {
  margin-top: 8px;
  font-size: 12px;
  color: #77705F;
}
@media (max-width: 700px) {
  .trouve-adresse-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Message d'accueil du tableau de bord ("Bonjour ...") */
.woocommerce-account .woocommerce-MyAccount-content > p {
  font-size: 14.5px;
  line-height: 1.6;
  color: #77705F;
}

/* Lien "Ajouter une adresse" transformé en bouton */
.woocommerce-Address-title a,
.woocommerce-Addresses .woocommerce-Address-title a {
  display: inline-flex;
  align-items: center;
  background-color: #191510;
  color: #FAF7F0 !important;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  margin-top: 16px;
  margin-bottom: 20px;
}
.woocommerce-Address-title a:hover {
  background-color: #1FAE68;
}

/* Page produit : police et espacements réduits pour tenir sur un seul écran */
.single-product .entry-content,
.single-product .wp-block-post-title,
.single-product .product_title,
.single-product .woocommerce-product-details__short-description,
.single-product .price,
.single-product .wc-block-components-product-price,
.single-product .wc-block-components-product-rating,
.single-product .woocommerce-Reviews,
.single-product .wc-block-add-to-cart-form,
.single-product .single_add_to_cart_button {
  font-size: 14px !important;
}
.single-product .wp-block-post-title,
.single-product .product_title {
  font-size: 26px !important;
  line-height: 1.15 !important;
  margin-bottom: 10px !important;
}
.single-product .price,
.single-product .wc-block-components-product-price {
  font-size: 18px !important;
}
.single-product .woocommerce-product-details__short-description p,
.single-product p {
  margin-bottom: 8px !important;
  line-height: 1.45 !important;
}
.single-product .single_add_to_cart_button,
.single-product .wp-block-button__link {
  padding: 10px 20px !important;
  font-size: 13px !important;
}
.single-product .wp-block-group,
.single-product .wp-block-columns {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}
.single-product img.wp-post-image,
.single-product .woocommerce-product-gallery img {
  max-height: 340px !important;
  width: auto !important;
  object-fit: contain;
}
