:root {
  --color-primary: #348980;
  --color-secondary: #54a48a;
  --color-accent: #95cfbc;
  --color-light: #f8f9fa;
  --color-cta: #ea4e28;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
b,
strong,
em,
span {
  font-family: "Barlow", sans-serif;
}

body {
  background-color: #f5f5f5;
}

[data-barba="container"] {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.barba-container-leave {
  opacity: 1;
}

.barba-container-leave-active {
  opacity: 0;
}

.barba-container-enter {
  opacity: 0;
}

.barba-container-enter-active {
  opacity: 1;
}

.loop,
.wave {
  position: absolute;
  z-index: 5;
}

h1.product-title {
  color: var(--color-primary);
  margin-bottom: 0;
  border-bottom: solid 1px var(--color-light);
  padding-bottom: 10px;
}

.product-item {
  position: relative;
}

.product-item img {
  /* Les 4 coins ont le même arrondi (avant: coin bas-droit à 0) */
  border-radius: 25px;
}

.home header.site-header {
  margin-bottom: 60px;
}

header.site-header {
  overflow: hidden;
  display: block !important;
  background-image: url(/wp-content/themes/hello-elementor-custom/assets/images/loop-01.svg);
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
}

header.site-header .logo img {
  max-width: 200px;
}

.header-top {
  background-color: var(--color-primary);
}

.header-top ul li {
  padding: 7px 0;
  a {
    font-size: 12px;
    transition: all 0.3s;
    &:hover {
      color: #ddd;
    }
  }
}

#navbarNav {
  padding: 7px 0;
  position: relative;
  z-index: 10000;
  a {
    font-size: 15px !important;
    transition: all 0.6s !important;
    background-color: var(--color-light) !important;
    color: var(--color-primary) !important;
    padding: 7px 15px !important;
    border-radius: 20px !important;
    border: solid 1px var(--color-secondary) !important;
    &:hover {
      background-color: var(--color-accent) !important;
      color: var(--color-primary) !important;
    }
  }
}

#navbarNav .current-menu-item a {
  background-color: var(--color-primary);
  color: var(--color-light);
}

body:not(.home) .loop {
  right: -30px;
}

.navbar-nav {
  gap: 8px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.navbar-nav li a {
  color: #fff;
}

.home .header-cart {
  float: right;
  margin-left: 30px;
}

.loop {
  right: 0;
  top: 0;
  width: 300px;
}

.wave {
  left: 0;
  top: 0;
  max-width: 80px;
  width: 100%;
}

body:not(.home) .page-title {
  margin-top: 50px;
  margin-bottom: 30px;
}

.home-header .page-title {
  font-size: 3em;
}

.home-header .page-title,
.home-header .page-subtitle {
  text-align: left;
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: var(--color-light);
}

.home-header .image {
  max-width: 250px;
  z-index: 6;
  position: relative;
}

.breadcrumb-wrapper {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.home .breadcrumb-wrapper,
.page-template-template-page-admin-dasboard .breadcrumb-wrapper {
  display: none;
}

ul.products {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

ul.wpc-filter-chips-list {
  padding: 0;
  display: flex;
  margin-bottom: 20px;
}

.product-form {
  /* Avant: -77px (l'onglet "Formulaire d'inscription" chevauchait le bas de l'affiche).
     Maintenant: un espace sous l'affiche pour qu'elle soit visible au complet. */
  margin-top: 24px;
  position: relative;
  margin-bottom: 60px;
}

.product-form h4 {
  border: solid 1px #e9ecef;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  border-bottom: 0px;
  background-color: #f8f9fa;
  padding: 20px 40px;
  display: inline-block;
  position: relative;
  margin-bottom: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.product-form:before {
  content: "";
  height: 1px;
  background-color: #e9ecef;
  width: 100%;
  position: absolute;
  top: 77px;
  display: block;
}

form.variations_form.cart.multi-variation-form,
.invoice-product-form {
  background-color: #f8f9fa;
  padding: 40px;
  border: 1px solid #e9ecef;
  border-top: 0;
}

.etats span {
  background-color: #eee;
  width: 100px;
  height: 100px;
  border-radius: 100px;
  border: 1px solid #fff;
  z-index: 999;
  position: absolute;
  font-weight: 600;
  left: 0;
  font-size: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

p.product-date {
  color: var(--color-secondary);
  font-size: 14px;
  display: flex;
  flex-direction: row;
  gap: 1px;
  font-weight: 600;
  margin-top: 10px;
  width: 100%;
}

p.product-limit-date {
  color: var(--color-cta);
  margin-top: 0;
}

.etats .visible {
  opacity: 1;
  transform: translateY(0);
}

.etats .open {
  background-color: var(--color-secondary);
  color: #fff;
}

.etats .closed {
  background-color: var(--color-cta);
  color: #fff;
}

.invoice-product-notice {
  display: none;
}

.facture .invoice-product-notice {
  display: block;
}

.variations-table td {
  padding: 15px !important;
  vertical-align: middle;
}

.woocommerce div.product form.cart .button {
  float: none;
}

.page-header .entry-title {
  margin: 0;
  margin-bottom: 20px;
  display: none;
}

nav.woocommerce-MyAccount-navigation {
  ul {
    padding: 0;
    display: flex;
    gap: 10px;
    flex-direction: column;
    li {
      list-style: none;
      a {
        background-color: var(--color-primary);
        text-decoration: none;
        color: var(--color-light);
        padding: 7px 15px;
        border-radius: 16px;
        transition: all 0.6s;
        &:hover {
          background-color: var(--color-secondary);
        }
      }
    }
  }
}

[type="button"]:focus,
[type="button"]:hover,
[type="submit"]:focus,
[type="submit"]:hover,
button:focus,
button:hover,
a:active,
a:hover {
  color: #000;
}

footer#site-footer {
  background-color: var(--color-primary);
  color: var(--color-light);
  margin-top: 60px;
}

footer .legal {
  background-color: #333;
  padding: 20px 0;
  display: flex;
  p {
    color: #999;
    margin-bottom: 0;
    font-size: 12px;
    a:hover {
      color: #999;
    }
  }
}

/* WooCommerce Cart Styles */

/* Cart Container */
.woocommerce-cart {
  margin: 0 auto;
  padding: 20px;
}

/* Cart Form */
.woocommerce-cart-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

/* Cart Table */
.shop_table.cart {
  width: 100%;
  border-collapse: collapse;
  border: none;
  margin: 0;
}

.shop_table.cart thead {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  color: white;
}

.shop_table.cart thead th {
  padding: 20px 15px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  border: none;
  text-align: left;
}

.shop_table.cart tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.shop_table.cart tbody tr:hover {
  background-color: var(--color-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shop_table.cart tbody td {
  padding: 25px 15px;
  border: none;
  vertical-align: middle;
}

/* Product Image - More specific to override WooCommerce defaults */
.woocommerce-cart .product-thumbnail {
  width: 120px;
  padding: 10px;
}

.woocommerce-cart table.cart .product-thumbnail img,
.woocommerce-cart .shop_table.cart img {
  width: 100px !important;
  height: 100px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #f1f5f9;
  transition: all 0.3s ease;
  display: block;
  max-width: none !important;
}

.woocommerce-cart table.cart .product-thumbnail img:hover,
.woocommerce-cart .shop_table.cart img:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

/* Product Name */
.product-name {
  font-weight: 600;
  color: #1e293b;
}

.product-name a {
  color: #1e293b;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.product-name a:hover {
  color: var(--color-primary);
}

/* Product Price */
.product-price {
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 16px;
}

/* Quantity Input */
.product-quantity {
  position: relative;
}

.quantity {
  display: flex;
  align-items: center;
  background: var(--color-light);
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  width: 120px;
}

.quantity input[type="number"] {
  width: 60px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  -moz-appearance: textfield;
}

.quantity input[type="number"]::-webkit-outer-spin-button,
.quantity input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity input[type="number"]:focus {
  outline: none;
  background: #fff;
}

/* Product Subtotal */
.product-subtotal {
  font-weight: 700;
  color: #1e293b;
  font-size: 18px;
}

/* Remove Button */
.product-remove {
  text-align: center;
}

.product-remove a:hover {
  background: var(--color-cta);
  color: white;
  transform: scale(1.1);
}

/* Loading State */
.removing-item {
  opacity: 0.6;
  pointer-events: none;
}

.product-remove a.loading {
  background: #d1d5db;
  color: #6b7280;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Update Cart Button */
.actions {
  padding: 20px;
  background: var(--color-light);
  border-top: 1px solid #e2e8f0;
}

.actions .button {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.actions .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 137, 128, 0.4);
}

/* Cart Collaterals (Totals) */
.cart-collaterals {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.cart_totals {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 30px;
  min-width: 400px;
}

.cart_totals h2 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 24px;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
}

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

.cart_totals th,
.cart_totals td {
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.cart_totals th {
  font-weight: 600;
  color: #64748b;
  width: 60%;
}

.cart_totals td {
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

.order-total th,
.order-total td {
  border-bottom: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

/* Checkout Button */
.wc-proceed-to-checkout {
  margin-top: 25px;
}

.wc-proceed-to-checkout .checkout-button {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--color-cta) 0%, #d63916 100%);
  color: white;
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.wc-proceed-to-checkout .checkout-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 78, 40, 0.4);
}

/* Empty Cart */
.wc-empty-cart-message {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wc-empty-cart-message::before {
  content: "🛒";
  display: block;
  font-size: 64px;
  margin-bottom: 20px;
}

/* Success/Error Messages */
.woocommerce-message,
.woocommerce-error {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.woocommerce-message {
  background: #d1fae5;
  color: var(--color-primary);
  border-left: 4px solid var(--color-secondary);
}

.woocommerce-error {
  background: #fee2e2;
  color: var(--color-cta);
  border-left: 4px solid var(--color-cta);
  padding-left:60px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .woocommerce-cart {
    padding: 10px;
  }

  .shop_table.cart {
    font-size: 14px;
  }

  .shop_table.cart thead {
    display: none;
  }

  .shop_table.cart tbody tr {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
  }

  .shop_table.cart tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .shop_table.cart tbody td:last-child {
    border-bottom: none;
  }

  .shop_table.cart tbody td::before {
    content: attr(data-title) ": ";
    font-weight: 600;
    color: #64748b;
  }

  .woocommerce-cart .product-thumbnail {
    width: 100px;
    margin-bottom: 10px;
  }

  .woocommerce-cart table.cart .product-thumbnail img,
  .woocommerce-cart .shop_table.cart img {
    width: 80px !important;
    height: 80px !important;
  }

  .product-thumbnail::before {
    display: none;
  }

  .cart-collaterals {
    justify-content: center;
  }

  .cart_totals {
    min-width: auto;
    width: 100%;
  }
}

/* Animation for adding/removing items */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shop_table.cart tbody tr {
  animation: slideInUp 0.3s ease-out;
}

/* CSS pour le nom du centre de services scolaire en bas de page */
.footer-centre-services {
  text-align: center;
  font-size: 16px;
  margin-top: 30px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.footer-centre-services h3 {
  margin: 0;
  font-weight: 600;
  display: inline;
  white-space: nowrap;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
  .footer-centre-services {
    font-size: 14px;
    padding: 0;
    margin:10px 0;
    text-align: left;
  }
  .wave{
    display:none;
  }

  .etats span{
    top:-20px;
  }

  table tbody>tr:nth-child(odd)>td, table tbody>tr:nth-child(odd)>th{
    background-color: transparent;
  }

  .woocommerce-cart-form, 
  .woocommerce table.shop_table,
  .shop_table.cart tbody tr {
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    margin-bottom: 30px;
    border: 0;
  }

  .woocommerce table.shop_table_responsive tr td, .woocommerce-page table.shop_table_responsive tr td {
    display: flex;
    text-align: right !important;
    }

  .woocommerce #content table.cart .product-thumbnail, .woocommerce table.cart .product-thumbnail, .woocommerce-page #content table.cart .product-thumbnail, .woocommerce-page table.cart .product-thumbnail,
  .woocommerce table.shop_table_responsive tbody th, .woocommerce-page table.shop_table_responsive tbody th {
    display: block;
  }

  .woocommerce table.shop_table tbody th, .woocommerce table.shop_table tfoot td, .woocommerce table.shop_table tfoot th {
    font-weight: 700;
    border: 0;
    padding: 0;
  }
}

/* ===================================
   Styles pour les informations d'activité sur reçus
   =================================== */

/* Conteneur principal des informations d'activité */
.woocommerce-order-activity-info {
  background: var(--color-light);
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  border: 1px solid #e9ecef;
}

.woocommerce-order-activity-info h3 {
  margin-top: 0;
  color: var(--color-primary);
  font-size: 1.2em;
  font-weight: 600;
}

/* Items individuels d'activité */
.activity-item {
  background: white;
  padding: 15px;
  margin: 10px 0;
  border-left: 4px solid var(--color-primary);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.activity-item h4 {
  margin: 0 0 10px 0;
  color: var(--color-primary);
  font-size: 1.1em;
  font-weight: 600;
}

.activity-item p {
  margin: 5px 0;
  line-height: 1.4;
  color: #333;
}

.activity-item p strong {
  color: #555;
}

/* Style du champ multi-select */
select[name="groupes[]"] {
  appearance: none;
  background-color: #fff;
  border: 1px solid #d1d5db; /* même couleur que les autres inputs */
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
  height: auto;
  min-height: 120px;
  max-height: 260px;
  overflow-y: auto;
}

select[name="groupes[]"]:focus {
  outline: none;
  border-color: #2563eb; /* bleu focus (harmonieux avec WP / Tailwind) */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Option de base */
select[name="groupes[]"] option {
  padding: 6px 10px;
}

/* Option "Tout sélectionner" mise en évidence */
select[name="groupes[]"] option[value="all"] {
  background-color: #f9fafb;
  font-weight: 600;
  color: #2563eb;
}

/* Quand on passe sur une option */
select[name="groupes[]"] option:hover {
  background-color: #eff6ff;
  color: #1d4ed8;
}

button.select2-selection__choice__remove {
    border: none !important;
}

/* Responsive pour les informations d'activité */
@media (max-width: 768px) {
  .woocommerce-order-activity-info {
    padding: 15px;
    margin: 15px 0;
  }

  .activity-item {
    padding: 12px;
  }

  .activity-item h4 {
    font-size: 1em;
  }

  .activity-item p {
    font-size: 0.9em;
  }
}

/* Styles pour les titres des colonnes des variations */
.variation-headers {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-secondary);
  color: white;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0;
}

.variation-headers + #variations-wrapper .variation-group:first-child {
  border-radius: 0;
  border-top: none;
  margin-top: 0;
}

.variation-headers + #variations-wrapper .variation-group:last-child {
  border-radius: 0 0 8px 8px;
}

/* Styles pour l'icône de panier dans tous les menus */
.cart-menu-item .cart-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: var(--color-primary) !important;
  color: var(--color-light) !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  margin-left: 8px !important;
  text-decoration: none !important;
  border: 1px solid var(--color-primary) !important;
}

.cart-menu-item .cart-link:hover {
  background: var(--color-secondary) !important;
  color: var(--color-light) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(52, 137, 128, 0.3) !important;
  border-color: var(--color-secondary) !important;
}

.cart-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.cart-text {
  font-weight: 600;
  font-size: 14px;
}

.cart-count {
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

/* Responsif pour mobile */
@media (max-width: 768px) {
  .cart-menu-item .cart-link {
    padding: 6px 12px !important;
    margin-left: 4px !important;
  }

  .cart-text {
    font-size: 15px;
  }

  .cart-icon {
    width: 15px;
    height: 15px;
    margin-right: -2px;
  }

  .shop-grid.container {
    flex-direction: column;
  }

  .home-header .page-title {
    font-size: 19px;
  }

  h2.page-subtitle {
    font-size: 20px;
  }

  .woocommerce ul.products[class*=columns-] li.product, .woocommerce-page ul.products[class*=columns-] li.product {
      width: 100%;
  }

  ul.products {
    flex-direction: column;
  }

  .activity-image {
    height: 270px;
  }

  .wpc-filters-open-button-container {
    display: block !important;
  }

  /* Cache les filtres au chargement */
  .wpc-filters-widget-content.wpc-show-counts-no {
    display: none;
  }

  .header-top{
    display:none;
  }

  .navbar-collapse{
    background-color: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: end;
  }

    .navbar-nav{
    text-align: right !important;
    gap: 5 !important;
  }

  #navbarNav{
    padding:0;
    margin:0;
  }

  .navbar-nav .nav-item{
    margin:0;
  }

  .home header.site-header {
    margin-bottom: 30px;
  }

  form.variations_form.cart.multi-variation-form, 
  .invoice-product-form, .product-form h4{
    padding:0;
    background-color:transparent;
    border:0;
  }

  .product-form h4{
    margin:20px 0;
  }

  .prose{
    display:none;
  }

  .product-form{
    margin-top:0;
  }

  .woocommerce div.product {
    padding: 0;
  }

}

/* Stock availability styling for product variations */
.stock-info {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
}

.stock-info.in-stock {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.stock-info.out-of-stock {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.stock-info.unlimited {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}


/* Commande : même en-tête que le tableau du panier (le texte blanc du CSS additionnel était illisible sans fond) */
.woocommerce-checkout-review-order-table thead {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}
.woocommerce-checkout-review-order-table thead th {
  color: #fff !important;
}
