/* Variables de couleurs */
:root {
  --digi-primary: #0073aa;
  --digi-secondary: #b8cb43;
  --digi-success: #46b450;
  --digi-danger: #dc3232;
  --digi-warning: #ffb900;
  --digi-info: #00a0d2;
  --digi-light: #f0f0f0;
  --digi-dark: #333;
  --digi-border: #ddd;
  --digi-search-bg: #f9f9f9;
}

/* Styles pour le formulaire de recherche */
.digi-search-form-container {
  background-color: var(--digi-search-bg);
  border-radius: 50px;
  padding: 10px 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  width: 90%;
  margin: 0 auto 20px auto;
}

.digi-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.digi-search-field {
  flex: 1;
  min-width: 150px;
  position: relative;
}

.digi-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--digi-search-bg);
  border-radius: 25px;
  padding: 5px 15px;
}

.digi-select-wrapper i {
  position: absolute;
  left: 15px;
  color: var(--digi-primary);
  font-size: 20px;
  pointer-events: none;
  line-height: 0.3;
}

.digi-select {
  width: 100%;
  padding: 5px !important;
  background-color: transparent;
  font-size: 14px;
  color: var(--digi-dark);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.digi-search-form-container .digi-select {
  padding: 0px 8px 0px 35px !important;
  border: none !important;
  box-shadow: none !important;
}

.digi-select:focus {
  outline: none;
}

input[type="date"].digi-select {
  padding: 6px 8px 6px 35px;
}

.digi-search-form-container .digi-search-button {
  background-color: var(--digi-secondary);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
}

.digi-search-button:hover {
  background-color: var(--digi-primary);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .digi-search-form-container {
    border-radius: 25px;
    padding: 15px;
  }

  .digi-search-row {
    flex-direction: column;
    gap: 10px;
  }

  .digi-search-field {
    width: 100%;
  }

  .digi-select-wrapper {
    width: 100%;
  }
}

/* Styles généraux */
.digi-activity-info {
  background-color: #f9f9f9;
  border: 1px solid var(--digi-border);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 30px;
}

.digi-info-block {
  margin-bottom: 15px;
}

.digi-info-block h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--digi-secondary);
}

.digi-info-block p {
  margin: 0 0 8px;
}

/* Tableau des prix CAF */
.digi-caf-price-table {
  margin-bottom: 25px;
}

.digi-price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.digi-price-table th {
  background-color: var(--digi-primary);
  color: white;
  padding: 8px 12px;
  text-align: left;
}

.digi-price-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--digi-border);
}

.digi-stock-info {
  margin-top: 10px;
  font-weight: bold;
  color: var(--digi-secondary);
}

/* Services inclus */
.digi-service {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  margin-right: 10px;
}

.digi-service.included {
  background-color: var(--digi-secondary);
  color: white;
}

.digi-service.not-included {
  background-color: var(--digi-warning);
  color: var(--digi-dark);
}

/* Décalage pour les ancres avec header sticky */
#tab-description,
#digi-anchor-button {
  scroll-margin-top: 66px; /* Ajuste cette valeur selon la hauteur de ton header */
}

/* Alternative pour meilleure compatibilité navigateurs */
#tab-description::before,
#digi-anchor-button::before {
  content: "";
  display: block;
  height: 66px; /* Ajuste cette valeur selon la hauteur de ton header */
  margin-top: -66px;
  visibility: hidden;
  pointer-events: none;
}

.single_add_to_cart_button {
  margin-bottom: 20px;
  width: 100% !important;
}

.single_add_to_cart_button.liste-attente {
  background-color: var(--digi-warning) !important;
  color: var(--digi-dark) !important;
}

/* Style du bouton "Remonter pour réserver" */
.digi-back-to-reservation {
  text-align: center;
  margin: 30px 0;
  padding: 10px;
}

.digi-back-to-top {
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.digi-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Assigner un ID au formulaire de réservation pour le ciblage de l'ancre */
.digi-reservation-form {
  scroll-margin-top: 66px; /* Ajuste cette valeur selon la hauteur de ton header */
}

/* Formulaire de réservation */
.digi-reservation-form {
  margin-top: 20px;
}

.digi-form-group {
  margin-bottom: 15px;
}

.digi-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.digi-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--digi-border);
  border-radius: 4px;
}

/* Tableau des jours */
.digi-participation-days {
  margin-top: 20px;
  border: 1px solid var(--digi-border);
  border-radius: 4px;
  padding: 15px;
  background-color: #f9f9f9;
}

.digi-days-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.digi-days-table th {
  background-color: var(--digi-primary);
  color: white;
  padding: 8px 12px;
  text-align: left;
}

.digi-days-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--digi-border);
}

/* Résumé des coûts */
.digi-cost-summary {
  margin-top: 20px;
  border-top: 1px solid var(--digi-border);
  padding-top: 15px;
}

.digi-cost-table {
  width: 100%;
  border-collapse: collapse;
}

.digi-cost-table td {
  padding: 5px 0;
}

.digi-cost-table td:last-child {
  text-align: right;
  font-weight: bold;
}

.digi-total-row {
  border-top: 2px solid var(--digi-border);
  font-size: 1.1em;
  color: var(--digi-primary);
}

/* Messages */
.digi-reservations-closed {
  background-color: var(--digi-danger);
  color: white;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.digi-login-required {
  background-color: var(--digi-info);
  color: white;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.digi-no-children {
  background-color: var(--digi-warning);
  color: var(--digi-dark);
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Bouton d'ajout au panier */
.digi-add-to-cart-container {
  margin-top: 20px;
}

.single_add_to_cart_button {
  background-color: var(--digi-primary) !important;
  color: white !important;
  padding: 10px 20px !important;
  font-size: 16px !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}

.single_add_to_cart_button:hover {
  background-color: #005d8c !important;
}

.digi-min-days-info {
  background-color: #f8f9fa;
  border-left: 4px solid #0073aa;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-weight: bold;
  color: #333;
}

/* Style des variations dans le panier */

body .woocommerce table.shop_table td {
  padding: 5px 10px !important;
}

td.product-name {
  font-size: 1.2em !important;
  color: var(--digi-primary) !important;
  font-weight: 500;
}

#order_review .variation {
  display: flex;
  flex-direction: row !important;
  align-items: flex-start;
}

.variation {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.variation dt,
.variation dd {
  margin: 0 !important;
  padding: 4px 12px;
  border-radius: 16px;
  background-color: var(--digi-light);
  font-size: 0.7em !important;
  line-height: 1.4;
}

#order_review .variation dd,
#order_review .variation dt {
  background-color: #fff !important;
}

.variation dt {
  color: var(--digi-primary);
  font-weight: 500;
}

.variation dd {
  color: var(--digi-dark);

  margin-left: 0 !important;
}

.variation dd p {
  margin: 0 !important;
  display: inline;
}

/* Style spécifique pour chaque type de variation */
[class*="variation-"] {
  display: inline-flex;
  align-items: center;
}

.cart td.product-quantity,
.cart th.product-quantity,
.cart td.product-price,
.cart th.product-price {
  display: none !important;
}

/* Ajustement largeur colonnes restantes */
.cart td.product-name {
  width: 70%;
}
.cart td.product-total {
  width: 20%;
  text-align: right;
}
.cart td.product-remove {
  width: 10%;
}

/* Version responsive */
@media (max-width: 768px) {
  .variation {
    gap: 6px;
  }

  .variation dt,
  .variation dd {
    padding: 3px 8px;
    font-size: 0.85em;
  }
}

/*********** /
/* Page commande */

.woocommerce-checkout #order_review {
  margin-bottom: 25px;
  background: #fff;
  width: 100% !important;
  float: left !important;
  margin-right: 0;
}

/* Alterner les couleurs des lignes #order_review tr.cart_item */
.woocommerce-checkout #order_review tr.cart_item:nth-child(even) {
  background-color: #f9f9f9 !important;
  border: solid 1px red;
}

.digi-days-recap-table {
  margin-top: 10px;
  margin-bottom: 10px;
}

.digi-reservation-details {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
}

.digi-reservation-details th,
.digi-reservation-details td {
  padding: 3px !important;
  text-align: center;
  font-size: 0.7em !important;
  border-bottom: 1px solid #f0f0f0;
}

body .woocommerce table.shop_table.digi-reservation-details td {
  padding: 3px !important;
}

.digi-reservation-details th {
  background-color: #f6f8e7 !important;
  font-weight: 600;
}

.digi-reservation-details tr:nth-child(even) {
  background-color: #f1f1f1;
}

.digi-reservation-details .fa-check {
  color: #28a745;
}

.digi-reservation-details .fa-times {
  color: #dc3545;
}

.digi-stock-success {
  color: #28a745;
  font-weight: 500;
}

.digi-stock-warning {
  color: #ffc107;
  font-weight: 500;
}

/* Style pour la notice de liste d'attente */
.digi-waiting-list-notice {
  background-color: var(--digi-warning);
  color: var(--digi-dark);
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Style pour les checkboxes liste d'attente */
.digi-waiting-list {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: var(--digi-warning);
  font-weight: 500;
}

.digi-waiting-list input[type="checkbox"] {
  margin-right: 5px;
}

/* Style pour notice liste d'attente par activité */
.digi-waiting-list-item-notice {
  background-color: #fff8e5;
  border-left: 4px solid var(--digi-warning);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.9em;
  display: flex;
  align-items: center;
}

.digi-waiting-list-item-notice input[type="checkbox"] {
  margin-right: 8px;
}

.digi-waiting-list-item-notice label {
  margin: 0;
  font-weight: 500;
  color: var(--digi-dark);
}

body .woocommerce button.button.primary.alt {
  background: var(--digi-primary) !important;
  color: white !important;
  font-size: 18px !important;
}

/* table des commandes */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.orders-table th,
.orders-table td {
  padding: 0px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.orders-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.orders-table tr:hover {
  background-color: #f8fafc;
}

.orders-table .badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.orders-table .badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.orders-table .badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.orders-table .badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.order-details {
  display: none;
  padding: 0.2rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.order-details.active {
  display: block;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.details-table th,
.details-table td {
  padding: 1px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.details-table th {
  background-color: #f1f5f9;
  font-weight: 600;
}

.toggle-details {
  cursor: pointer;
  color: var(--digi-primary);
}

.toggle-details:hover {
  text-decoration: underline;
}
