/* ---------------------------------------------------------------------------
   Tiroir panier + favoris (demande client du 30/09).
   Le panier etait un simple lien vers /panier : on perdait la page en cours a
   chaque coup d'oeil. Le tiroir s'ouvre par-dessus, en glissant depuis la
   droite, sur ordinateur comme sur mobile.
--------------------------------------------------------------------------- */
.achyll-tiroir {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.achyll-tiroir[hidden] { display: none; }

.achyll-tiroir__voile {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .25s ease;
}

.achyll-tiroir__panneau {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(430px, 100vw);
  height: 100%;
  flex-direction: column;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .16);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

/* La classe est posee une image apres l'insertion : sans cela le navigateur
   applique l'etat final d'emblee et il n'y a aucune animation. */
.achyll-tiroir--ouvert .achyll-tiroir__voile { opacity: 1; }
.achyll-tiroir--ouvert .achyll-tiroir__panneau { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .achyll-tiroir__voile,
  .achyll-tiroir__panneau { transition: none; }
}

/* ---- En-tete -------------------------------------------------------------- */
.achyll-tiroir__tete {
  display: flex;
  min-height: 69px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid #ececef;
}

.achyll-tiroir__marque {
  color: #111;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.achyll-tiroir__fermer {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #111;
  cursor: pointer;
}

.achyll-tiroir__fermer:hover { background: #f5f5f7; }
.achyll-tiroir__fermer svg { width: 18px; height: 18px; }

/* ---- Onglets -------------------------------------------------------------- */
.achyll-tiroir__onglets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 1rem 1.25rem 0;
  gap: .5rem;
}

.achyll-tiroir__onglet {
  padding: .7rem .5rem;
  border: 1px solid transparent;
  border-bottom: 1px solid #ececef;
  background: none;
  color: #6e6e73;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.achyll-tiroir__onglet[aria-selected="true"] {
  border: 1px solid #0b69f6;
  border-radius: 8px;
  color: #0b69f6;
}

.achyll-tiroir__compte { font-size: .8em; vertical-align: super; }

/* ---- Corps ---------------------------------------------------------------- */
.achyll-tiroir__corps {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.25rem;
}

.achyll-tiroir__vide {
  margin: 1.5rem 0;
  color: #4b4b50;
  font-size: 1rem;
}

.achyll-tiroir__attente {
  margin: 2rem 0;
  color: #6e6e73;
  font-size: .95rem;
}

/* On masque les filets et le titre que PrestaShop ajoute autour des lignes :
   dans un tiroir ils n'apportent rien. */
.achyll-tiroir__corps .cart__overview > hr,
.achyll-tiroir__corps .cart__empty { display: none; }

.achyll-tiroir__corps .cart__item + .cart__item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ececef;
}

.achyll-tiroir__corps .product-line__img { max-width: 76px; border-radius: 8px; }

.achyll-tiroir__corps .product-line__title {
  color: #111;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

/* ---- Pied ----------------------------------------------------------------- */
.achyll-tiroir__pied {
  flex: none;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #ececef;
  background: #fff;
}

.achyll-tiroir__pied:empty { display: none; }

.achyll-tiroir__pied .cart-summary__line {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  color: #4b4b50;
  font-size: .95rem;
}

.achyll-tiroir__pied .cart-summary__line.cart-summary__line--total,
.achyll-tiroir__pied #cart-total {
  color: #111;
  font-size: 1.05rem;
  font-weight: 700;
}

.achyll-tiroir__pied .btn {
  width: 100%;
  margin-top: .75rem;
}

.achyll-tiroir__lien-panier {
  display: block;
  margin-top: .75rem;
  color: #111;
  font-size: .9rem;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Favoris -------------------------------------------------------------- */
.achyll-tiroir__favoris-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.achyll-tiroir__favoris-grille .product-miniature { min-width: 0; }

.achyll-tiroir__bouton {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 1.4rem;
  border: 1px solid #0b69f6;
  border-radius: 99px;
  background: #0b69f6;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}

.achyll-tiroir__bouton:hover { background: #0a5ed9; color: #fff; }

/* Empeche la page de defiler derriere le tiroir ouvert. */
body.achyll-tiroir-ouvert { overflow: hidden; }

@media (max-width: 575px) {
  .achyll-tiroir__panneau { width: 100vw; }
  .achyll-tiroir__favoris-grille { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Bandeau cookies (module achyllgoogleads) — hauteur sur mobile.

   Sous 600 px le module passe son conteneur en `flex-direction: column` mais
   garde `flex: 1 1 320px` sur le paragraphe : la base de 320 px devient une
   HAUTEUR. Le bandeau occupait 404 px, soit 49 % d'un ecran de 823 px, dont
   pres de 300 px de noir vide. On ramene le paragraphe a sa hauteur naturelle.
   Selecteur volontairement plus specifique que celui du module (1,0,2 contre 1,0,1).
--------------------------------------------------------------------------- */
@media (max-width: 600px) {
  /* (1,0,2) : le `>` n'ajoute AUCUNE specificite, il faut l'element devant l'id */
  div#achyll-cookie > p {
    flex: 0 0 auto;
  }
}
