/* ------------------------------------------------------------------ */
/* Achat : ligne « version + prix + Ajouter au panier » et défilement   */
/* horizontal des produits (rubriques d'une catégorie)                  */
/* ------------------------------------------------------------------ */

/* --- Fiche produit : une ligne par version ------------------------- */
.achat_ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.6rem;
  padding: 0.6rem 0.8rem;
  background: #ffffff;
  border: 1px solid #c9d6df;
  border-radius: 6px;
  text-align: left;
}
.achat_infos {
  flex: 1 1 8rem;
  min-width: 0;
}
.achat_version {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}
.achat_prix {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--marque-intense);
  line-height: 1.3;
}
.achat_fidelite {
  font-size: 0.8rem;
}
.btn-achat {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  background-color: #1e7e34;
  border: 2px solid #1e7e34;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-achat:hover, .btn-achat:focus {
  color: #ffffff;
  background-color: #155d27;
  border-color: #155d27;
  text-decoration: none;
}
.btn-achat:focus {
  outline: 3px solid var(--marque-nuit);
  outline-offset: 2px;
}
.btn-achat.btn_interdit, .btn-achat[disabled] {
  color: #ffffff;
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
}
@media (max-width: 575.98px) {
  .achat_ligne { flex-direction: column; align-items: stretch; }
  .achat_infos { flex: 0 0 auto; }
  .btn-achat { width: 100%; }
}

/* --- Panier : miniature --------------------------------------------- */
.panier_lien_a { padding: 6px 0; }

/* --- Défilement horizontal des produits ----------------------------- */
.defile {
  position: relative;
  margin: 0 0 0.5rem;
  padding: 0 2.6rem;
}
.defile_piste {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0.5rem 0.25rem 0.75rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.defile_piste:focus { outline: 3px solid var(--marque-nuit); outline-offset: 2px; }
.defile_carte {
  flex: 0 0 11.5rem;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding: 0.6rem;
  background: #ffffff;
  border: 1px solid #c9d6df;
  border-radius: 6px;
  text-align: center;
}
.defile_carte a.defile_visuel { display: block; margin-bottom: 0.4rem; }
.defile_carte img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  height: 9.5rem;
  object-fit: contain;
}
.defile_nom {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  line-height: 1.25;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.defile_prix {
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--marque-intense);
}
.defile_action { margin-top: auto; }
.defile_action .btn-achat {
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  font-size: 0.95rem;
}
.defile_action .btn-voir {
  display: block;
  padding: 0.55rem 0.5rem;
  min-height: 44px;
  font-weight: 700;
  color: var(--marque-intense);
  border: 2px solid var(--marque-intense);
  border-radius: 6px;
  text-decoration: none;
  background: #ffffff;
}
.defile_btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: #ffffff;
  background: var(--marque-intense);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.defile_btn:hover, .defile_btn:focus { background: var(--marque-nuit); }
.defile_btn:focus { outline: 3px solid var(--marque-nuit); outline-offset: 2px; }
.defile_btn[disabled] { opacity: 0.35; cursor: default; }
.defile_prec { left: 0; }
.defile_suiv { right: 0; }
.defile_titre { margin: 0; }
.defile_plus { margin: 0 0 1rem; text-align: right; font-size: 0.95rem; }
@media (max-width: 767.98px) {
  /* sur téléphone : le doigt suffit, les flèches laissent la place aux cartes */
  .defile { padding: 0; }
  .defile_btn { display: none; }
  .defile_carte { flex-basis: 44vw; }
  .defile_piste { scroll-padding: 0 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .defile_piste { scroll-behavior: auto; }
}

/* --- Feuilletage d'un extrait : flèches sur les visuels, clic sur les pages, glissement du doigt --- */
.flipbook_pages { position: relative; touch-action: pan-y; }
.flipbook_page { cursor: pointer; }
.flipbook_nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: #ffffff;
  background: rgba(17, 72, 102, 0.85);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.flipbook_nav:hover, .flipbook_nav:focus { background: var(--marque-nuit); }
.flipbook_nav:focus { outline: 3px solid #ffbf47; outline-offset: 2px; }
.flipbook_nav[disabled] { display: none; }
.flipbook_nav_prev { left: 6px; }
.flipbook_nav_next { right: 6px; }

/* --- Titres de page devenus de vrais titres (h1/h2) : même aspect que les anciennes barres de titre --- */
.titre_page { font-size: inherit; line-height: inherit; margin-bottom: 0; }

/* --- Titres (h2) du pied de page : la règle globale « h2 { color: #212529 !important } » les rendait sombres sur fond bleu (contraste 2,8) --- */
#footer h2, #copyright h2 {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

/* --- Panier : titres de zones à gauche, plus gros et en gras (la règle globale h2 les forçait à 0,9 rem) --- */
h2.titre_zone {
  margin: 0.4rem 0 0.8rem;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-align: left;
  color: var(--marque-intense) !important;
}

/* --- Rubriques d'une catégorie : « Voir les N produits de la rubrique… » placé au-dessus de la liste, centré et bien visible --- */
.defile_plus {
  margin: 0.9rem 0 0.4rem;
  text-align: center;
}
.defile_plus a {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--marque-intense);
  background: #ffffff;
  border: 2px solid var(--marque-intense);
  border-radius: 6px;
  text-decoration: none;
}
.defile_plus a:hover, .defile_plus a:focus {
  color: #ffffff;
  background: var(--marque-intense);
  text-decoration: none;
}
.defile_plus a:focus { outline: 3px solid var(--marque-nuit); outline-offset: 2px; }

/* --- Menu de l'espace client : contenu des boutons centré --- */
.menu-espace .menu-espace__bouton {
  justify-content: center;
  text-align: center;
}
.menu-espace__texte {
  flex: 0 1 auto;
  text-align: center;
}

/* --- Pied de page sur téléphone : liste « Dernières sorties » compacte (le doigt a assez de place avec 8 px au-dessus et en dessous) --- */
@media (max-width: 991.98px) {
  #footer ul li { margin-bottom: 0; }
  #footer ul a {
    padding: 4px 0;
    min-height: 0;
    line-height: 1.35;
  }
}

/* --- Titres de rubrique d'une catégorie : la couleur de la catégorie l'emporte sur la règle globale des h2 --- */
h2.defile_titre {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

/* --- Version 1.09 : la zone d'achat visée change de fond --- */
/* Au survol ou quand son bouton a le focus, la zone (version + prix + bouton) se teinte et son contour passe au vert du bouton : on voit ce que l'on va acheter ou télécharger. */
.achat_ligne { transition: background-color 0.15s, border-color 0.15s; }
.achat_ligne:hover, .achat_ligne:focus-within {
  background: #e6f4ea;
  border-color: #1e7e34;
}
.achat_ligne:hover .text-muted, .achat_ligne:focus-within .text-muted { color: #495057 !important; }
@media (prefers-reduced-motion: reduce) { .achat_ligne { transition: none; } }

/* --- Version 1.10 : ligne « produit indisponible » (aucun tarif) : même présentation que les autres lignes d'achat, sans bouton ni changement de fond au survol --- */
.achat_ligne--indisponible { background: #f3f5f7; }
.achat_ligne--indisponible:hover, .achat_ligne--indisponible:focus-within { background: #f3f5f7; border-color: #c9d6df; }
.achat_ligne--indisponible .achat_version { color: #495057; }

/* --- Version 1.11 : lignes « autre version » (renvoi) et « billetterie » (achat extérieur) --- */
/* le bouton « Voir cette version » mène vers une autre fiche : contour et texte de la couleur de marque, fond blanc (le vert reste réservé à l'achat) */
.btn-achat.btn-achat--voir { color: var(--marque-intense); background-color: #ffffff; border-color: var(--marque-intense); }
.btn-achat.btn-achat--voir:hover, .btn-achat.btn-achat--voir:focus { color: #ffffff; background-color: var(--marque-intense); border-color: var(--marque-intense); }
.achat_ligne--renvoi:hover, .achat_ligne--renvoi:focus-within { background: #e8f0f7; border-color: var(--marque-intense); }
/* libellé long (billetterie, autre version) : il passe à la ligne au lieu de dépasser de la zone d'achat (colonne étroite de Marketplace, téléphone) */
.btn-achat.btn-achat--long { white-space: normal; max-width: 100%; text-align: center; }
