/* ==========================================================================
   Nayra — layout : conteneurs, grille, header, footer.
   Mobile-first. Dépend de tokens.css et base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Conteneurs.
   -------------------------------------------------------------------------- */

.nayra-container {
  width: 100%;
  max-width: 75rem; /* 1200px */
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .nayra-container {
    padding-inline: 2rem;
  }
}

/* --------------------------------------------------------------------------
   2. Grille utilitaire (2 colonnes mobile → 3-4 desktop, cf. CLAUDE.md).
   -------------------------------------------------------------------------- */

.nayra-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .nayra-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nayra-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   3. Header.
   Mobile : burger | logo centré | panier.
   Desktop : logo | nav horizontale | panier.
   -------------------------------------------------------------------------- */

.nayra-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nayra-creme);
  border-bottom: 1px solid var(--nayra-sable);
}

.nayra-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

/* Logo (image customizer ou nom du site en texte). */
.nayra-header__brand {
  font-family: var(--nayra-font-titres);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nayra-brun);
}

.nayra-header__brand img {
  max-height: 3rem;
  width: auto;
}

/* Bouton burger — visible mobile uniquement. */
.nayra-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--nayra-brun);
}

/* Navigation principale.
   Mobile : panneau replié sous le header, ouvert via .is-open (main.js).
   Desktop : liste horizontale toujours visible. */
.nayra-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nayra-creme);
  border-bottom: 1px solid var(--nayra-sable);
}

.nayra-nav.is-open {
  display: block;
}

.nayra-nav ul {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  list-style: none;
}

.nayra-nav a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--nayra-sable-clair);
}

/* Lien panier + compteur. */
.nayra-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--nayra-brun);
}

.nayra-cart-count {
  position: absolute;
  top: 0.25rem;
  right: 0.125rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding-inline: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--nayra-blanc);
  background: var(--nayra-or);
  border-radius: 999px;
}

.nayra-cart-count[hidden] {
  display: none;
}

/* Libellé texte « Panier » (maquette home-v2 : « PANIER (0) ») —
   masqué sur mobile (icône seule), affiché sur desktop. */
.nayra-cart-link__label {
  display: none;
}

@media (min-width: 1024px) {
  .nayra-burger {
    display: none;
  }

  /* Desktop : « Panier (n) » en ligne, compteur inline entre parenthèses
     au lieu du badge rond mobile. */
  .nayra-cart-link {
    width: auto;
    gap: 0.4rem;
    padding-inline: 0.25rem;
  }

  .nayra-cart-link__label {
    display: inline;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .nayra-cart-count {
    position: static;
    min-width: 0;
    height: auto;
    padding-inline: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: inherit;
    background: none;
    border-radius: 0;
  }

  .nayra-cart-count::before { content: "("; }
  .nayra-cart-count::after  { content: ")"; }

  .nayra-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
  }

  .nayra-nav ul {
    flex-direction: row;
    gap: 2rem;
    padding: 0;
  }

  .nayra-nav a {
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
  }

  .nayra-nav a:hover,
  .nayra-nav a:focus-visible {
    border-bottom-color: var(--nayra-or);
  }
}

/* --------------------------------------------------------------------------
   4. Carte produit (accueil, catalogue, produits similaires).
   -------------------------------------------------------------------------- */

.carte-produit__lien {
  display: block;
}

.carte-produit__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--nayra-sable);
}

.carte-produit__image--vide {
  background: var(--nayra-sable-2);
}

.carte-produit__nom {
  display: block;
  margin-top: 0.625rem;
  font-family: var(--nayra-font-titres);
  font-size: 1.0625rem;
  font-weight: 600;
}

.carte-produit__prix {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.9375rem;
  color: var(--nayra-or);
}

/* Prix barré / promo sur les cartes (D-010). */
.carte-produit__prix del {
  margin-right: 0.375rem;
  color: var(--nayra-gris-3);
  font-size: 0.875em;
}

.carte-produit__prix ins {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Drawer mini-panier (global : peut s'ouvrir sur toutes les pages).
   -------------------------------------------------------------------------- */

.nayra-drawer-voile {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(44, 38, 32, 0.5); /* --nayra-brun à 50 % */
}

.nayra-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  width: min(24rem, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--nayra-creme);
  transform: translateX(100%);
  /* visibility : sort les liens du mini-panier de l'ordre de tabulation
     quand le drawer est fermé (a11y, revue Fable). */
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s ease;
  box-shadow: -8px 0 24px rgba(44, 38, 32, 0.18);
}

.nayra-drawer.est-ouvert {
  transform: translateX(0);
  visibility: visible;
}

.nayra-drawer__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nayra-sable);
}

.nayra-drawer__titre {
  margin: 0;
  font-family: var(--nayra-font-titres);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nayra-drawer__fermer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--nayra-brun);
}

/* Mini-panier natif Woo à l'intérieur du drawer. */
.nayra-drawer .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.nayra-drawer ul.woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nayra-drawer li.woocommerce-mini-cart-item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--nayra-sable-clair);
  font-size: 0.9375rem;
}

.nayra-drawer li.woocommerce-mini-cart-item img {
  width: 4rem;
  height: auto;
  order: -1;
}

.nayra-drawer li.woocommerce-mini-cart-item .quantity {
  grid-column: 2;
  white-space: nowrap;
  color: var(--nayra-gris-2);
  font-size: 0.875rem;
}

.nayra-drawer li.woocommerce-mini-cart-item a.remove {
  color: var(--nayra-gris-3);
  text-decoration: none;
  font-size: 1.125rem;
}

.nayra-drawer .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--nayra-sable);
  font-size: 1rem;
}

.nayra-drawer .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0.5rem 0 0;
}

.nayra-drawer .woocommerce-mini-cart__buttons a.button {
  display: block;
  padding: 0.8125rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nayra-or);
  background: transparent;
  border: 1px solid var(--nayra-or);
  border-radius: 0;
}

.nayra-drawer .woocommerce-mini-cart__buttons a.button.checkout {
  color: var(--nayra-blanc);
  background: var(--nayra-or);
}

.nayra-drawer .woocommerce-mini-cart__empty-message {
  margin: 2rem 0;
  text-align: center;
  color: var(--nayra-gris-2);
}

body.drawer-ouvert {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. Pages statiques (contact, à propos, juridique).
   -------------------------------------------------------------------------- */

.page-statique {
  max-width: 46rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.page-statique__entete {
  margin-bottom: 2rem;
  text-align: center;
}

.page-statique__titre {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-statique__contenu h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.375rem;
}

.page-statique__contenu ul,
.page-statique__contenu ol {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.page-statique__contenu li {
  margin-bottom: 0.375rem;
}

.page-statique__contenu a {
  color: var(--nayra-or);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   7. Footer.
   -------------------------------------------------------------------------- */

.nayra-footer {
  margin-top: 4rem;
  padding: 2.5rem 0 2rem;
  background: var(--nayra-brun);
  color: var(--nayra-creme);
}

.nayra-footer a {
  color: var(--nayra-creme);
}

.nayra-footer a:hover,
.nayra-footer a:focus-visible {
  color: var(--nayra-or);
}

.nayra-footer__brand {
  font-family: var(--nayra-font-titres);
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.nayra-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.nayra-footer__nav a {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.nayra-footer__legal {
  font-size: 0.8125rem;
  color: var(--nayra-gris-5);
  margin-bottom: 0;
}
