/* ======================
   STYLES SITE GLOBAL
====================== */


body {
  margin: 0;
  font-family: 'Libre Franklin', sans-serif;
  background: #fff;
  color: #000;
}

header {
  background: #BC0D0D;
  color: #fff;
  text-align: center;
  padding: 15px;
}

.header-container {
  display: flex;
  justify-content: space-between; /* <-- sépare gauche/droite */
  align-items: center;
}

footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 10px;
}

.index-container {
    padding-left: 1rem;
    padding-right: 1rem;
}


/* ======================
   LOGIN PAGE STYLES
====================== */
body.login-page {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Libre Franklin', sans-serif;
    background: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.login-box h1 {
    color: #BC0D0D;
    margin-bottom: 20px;
}

.login-box .error {
    color: red;
    margin-bottom: 15px;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-box input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box button {
    background: #BC0D0D;
    color: #fff;
    font-size: 1em;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-box button:hover {
    background: #a50a0a;
}

/* ======================
   CATALOGUE STYLES
====================== */

/* Filtres */
#filters .form-control,
#filters .form-select,
#filters button {
    font-size: 1rem;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

#filters button {
    background: #BC0D0D;
    color: #fff;
    font-weight: bold;
    border: none;
    transition: background 0.3s ease;
}

#filters button:hover {
    background: #a50a0a;
}

/* Grille produits */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Image des produits */
.card img {
    height: 220px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Texte produit */
.card .card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card .btn {
    background: #BC0D0D;
    color: #fff;
    border-radius: 8px;
    padding: 10px;
}

.card .btn:hover {
    background: #a50a0a;
}

#loader {
    font-size: 1rem;
    color: #BC0D0D;
    font-weight: bold;
    text-align: center;
}

#sentinel {
    width: 100%;
    height: 50px; /* espace pour déclencher l'observateur */
}

@media (min-width: 769px) {
    #mobile-category-toggle {
        display: none !important;
    }

    #sidebar-categories ~ h5,
    .col-md-3 > h5 {
        display: none;
    }
}

.btn-secondary {
    background-color: #ccc;
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background-color: #999;
    color: #fff;
}

/* ✅ Amélioration bouton "Effacer tous les filtres" */
.clear-filters-btn {
    background-color: #ccc;
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    transition: background 0.3s ease;
    display: inline-block;
    text-decoration: none; /* ❌ supprime le souligné */
}

.clear-filters-btn:hover {
    background-color: #999;
    color: #fff;
    text-decoration: none; /* ❌ aussi au hover */
}

/* ✅ Alignement responsive */
@media (min-width: 769px) {
  .clear-filters-btn {
    /*height: 100%;*/
    /*padding-top: 10px;*/
    /*padding-bottom: 10px;*/
    padding: 10;
    line-height: 1.2;
    font-size: 1rem;
  }

  .clear-filters-wrapper {
    display: flex;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
    .clear-filters-btn {
        width: 100%;
        display: block;
        text-align: center;
    }
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }
}



/* ======================
   NAVIGATION (fusion desktop + mobile)
====================== */

/* 🌐 Menu Desktop */
.main-nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  gap: 30px;
}

.main-nav {
  margin-left: auto; /* pousse le menu à droite */
  margin-right: 20px;
}

.main-nav li {
  position: relative;
}

.main-nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  background: white;
  padding: 10px 0;
  min-width: 200px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  z-index: 99;
}

.main-nav li:hover > ul {
  display: block;
}

.main-nav li ul li {
  padding: 8px 20px;
  white-space: nowrap;
}

.main-nav li ul li a {
  color: #BC0D0D;
  text-decoration: none;
  display: block;
}

.main-nav li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.main-nav li.dropdown-left ul {
  left: auto;
  right: 0;
}

/* 📱 Menu Mobile */
.menu-toggle {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  display: block;
}

.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: #BC0D0D;
  z-index: 1000;
  overflow-y: auto;
  padding: 60px 20px 20px;
}

.mobile-menu.active {
  transform: translateX(0%);
}

.mobile-menu ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.mobile-menu li {
  border-bottom: 1px solid #ccc;
  padding: 10px;
  position: relative;
}

.mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  text-decoration: none;
}

.submenu-toggle {
  font-size: 1.2em;
  transition: transform 0.2s;
}

li.open > a > .submenu-toggle {
  transform: rotate(90deg);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
  pointer-events: none; 
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; 
}

/* Empêche de scroller derrière le menu */
body.menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
}


/* ======================
   CAROUSEL PAGE PRODUIT
====================== */

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 60% 60%;
    filter: invert(21%) sepia(98%) saturate(5425%) hue-rotate(346deg) brightness(93%) contrast(104%);
}
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.product-image-box {
    border: 1px solid #dee2e6; /* Même style que le tableau d'infos */
    border-radius: 6px;
    background-color: #fff;
}

/* === Promo Badge === */
.promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #eaff05;
    color: #000;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1.1rem;
    z-index: 10;
}

/* Prix barré & promo */
.old-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 8px;
    font-size: 1em;
}

.new-price {
    color: #BC0D0D;
    font-weight: bold;
    font-size: 1.2em;
}

/* ✅ Sidebar Info Cards */
.sidebar .info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #BC0D0D;
}

.sidebar .info-card h4 {
    font-size: 1.2rem;
    color: #BC0D0D;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.sidebar .info-card p {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #333;
}

.sidebar .info-card a {
    color: #BC0D0D;
    font-weight: bold;
    text-decoration: none;
}

.sidebar .info-card a:hover {
    text-decoration: underline;
}

.info-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.info-card h4 {
    color: #BC0D0D;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card p {
    margin: 0 0 6px;
    font-size: 14px;
}

.info-card a {
    color: #BC0D0D;
    font-weight: bold;
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* === SIDEBAR CATEGORIES === */
#sidebar-categories {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 0;
    overflow: hidden;
}

/* Catégories (fond noir, texte blanc gras) */
.category-title {
    display: block;
    background: #000;
    color: #fff;
    font-weight: bold;
    padding: 10px 12px;
    font-size: 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid #444;
}

/* Conteneur sous-catégories */
.subcategory-list {
    padding: 10px;
    background: #f8f8f8;
}

/* Sous-catégories boutons */
.subcategory-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease-in-out;
}

.subcategory-btn:hover {
    background: #BC0D0D;
    color: #fff;
    border-color: #BC0D0D;
}

/* Sous-catégorie active */
.subcategory-btn.active {
    background: #BC0D0D;
    color: #fff;
    font-weight: bold;
}

/* Responsive: réduire padding sur mobile */
@media (max-width: 768px) {
    #sidebar-categories {
        margin-bottom: 20px;
    }
    .subcategory-btn {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Décalage entre la colonne principale et la sidebar */
.main-content {
    padding-right: 100px; /* espace à droite */
}

.sidebar {
    padding-left: 15px; /* espace à gauche */
}

/* ✅ Sidebar améliorée */
.sidebar {
    background: #f8f8f8; /* fond clair pour contraste */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ✅ Cartes dans la sidebar */
.sidebar .info-card {
    background: #fff;
    border: none; /* on enlève la bordure */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 15px 18px;
    margin-bottom: 20px;
}

/* ✅ Titre des blocs */
.sidebar .info-card h4 {
    color: #BC0D0D;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ✅ Textes */
.sidebar .info-card p {
    margin: 0 0 6px;
    font-size: 14px;
}

/* ✅ Liens */
.sidebar .info-card a {
    color: #BC0D0D;
    font-weight: bold;
    text-decoration: none;
}

.sidebar .info-card a:hover {
    text-decoration: underline;
}

/* ======================
   BLOCS DYNAMIQUES (NOUVEAU DESIGN)
====================== */
.bloc-dynamique {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* ✅ Pour forcer la largeur pleine sur mobile */
}

/* Survol */
.bloc-dynamique:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* Texte dans les blocs */
.bloc-dynamique .bloc-texte {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Image + Texte alignement */
.bloc-image-texte {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bloc-image-texte img {
    max-width: 300px;
    flex-shrink: 0;
    border: 2px solid #BC0D0D;
    border-radius: 10px;
}

.bloc-image-texte .bloc-texte {
    flex: 1;
}

/* Alignement gauche/droite */
.bloc-image-texte.align-left {
    flex-direction: row;
}

.bloc-image-texte.align-right {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 768px) {
    .bloc-dynamique {
        padding: 15px;
        margin-left: 0;
        margin-right: 0;
    }

    .bloc-image-texte {
        flex-direction: column !important;
        text-align: center;
    }

    .bloc-image-texte img {
        max-width: 90%;
        margin-bottom: 15px;
    }
    .main-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    
}

.mobile-menu ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.mobile-menu li {
  border-bottom: 1px solid #ccc;
  padding: 10px;
  position: relative;
}

.mobile-menu .submenu-toggle {
  font-size: 1.2em;
  margin-left: auto;
  transition: transform 0.2s;
}

.mobile-menu li.open > a > .submenu-toggle {
  transform: rotate(90deg);
}

.close-menu {
  background: none;
  border: none;
  font-size: 2em;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  color: #000;
  z-index: 1001;
}

/* ✅ Correction couleur du menu mobile */
.mobile-menu a {
  color: white !important;
  background-color: transparent;
}

/* ✅ Couleur des sous-menus aussi */
.mobile-menu .submenu a {
  color: white !important;
}

/* ✅ Fond sombre si tu veux contraste */
.mobile-menu
 {
  background-color: #1a1a1a;
}

.mobile-menu .submenu {
  display: none;
  padding-left: 20px;
  background-color: #2a2a2a;
}

.mobile-menu li.open > .submenu {
  display: block;
}

.google-reviews { margin: 0; }
.google-review { padding: 10px 0; border-bottom: 1px solid #eee; }
.google-review:last-child { border-bottom: 0; }
.gr-header { display: flex; align-items: center; justify-content: space-between; }
.gr-stars { font-size: 0.95rem; color: #BC0D0D; margin-left: 10px; }
.gr-text { margin: 6px 0 4px; line-height: 1.4; }
.gr-footer { margin-top: 8px; }

/* Formulaires */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Place les dialogues TinyMCE devant tout */
.tox.tox-silver-sink,
.tox-dialog-wrap {
  z-index: 200000 !important;
}

.badge-reserve{
  display:inline-block;
  padding:.35rem .75rem;
  border-radius:9999px;
  background:#1f78d1;
  color:#fff;
  font-weight:700;
  font-size:.95rem;
  margin-top:.5rem;
}

/* === Recherches populaires (chips) === */
:root {
  --om-primary: #BC0D0D; /* rouge Occaz Motard */
  --om-primary-hover: #a20b0b;
  --om-chip-text: #fff;
}

.bloc-populaires {
  margin-block: 2rem;
}

.bloc-populaires h2 {
  font-family: "Libre Franklin", system-ui, -apple-system, sans-serif;
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  margin: 0 0 0.75rem;
}

.bloc-populaires .chips {
  display: flex;
  flex-wrap: wrap;                 /* passe à la ligne si trop long */
  gap: .5rem .6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 640px) {
  .bloc-populaires .chips {
    flex-wrap: nowrap;             /* liste horizontale défilable sur mobile */
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .bloc-populaires .chips > li {
    flex: 0 0 auto;                /* empêcher le wrap sur mobile */
  }
}

.bloc-populaires .chip {
  display: inline-block;
  padding: .5rem .85rem;
  border-radius: 999px;            /* effet “bulle” */
  background: var(--om-primary);
  color: var(--om-chip-text);
  text-decoration: none;
  font-family: "Libre Franklin", system-ui, -apple-system, sans-serif;
  font-size: .95rem;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.08);
  white-space: nowrap;
}

.bloc-populaires .chip:hover {
  background: var(--om-primary-hover);
}

.bloc-populaires .chip:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.bloc-populaires .chip:active {
  transform: translateY(1px);
}

@media (max-width:640px){
  .bloc-populaires .chips{
    flex-wrap:wrap;
    overflow-x:visible;
    gap:.45rem .5rem;              /* un peu plus compact */
  }
  .bloc-populaires .chip{
    white-space:normal;            /* ← autorise retour à la ligne dans la bulle */
    line-height:1.2;
    padding:.45rem .75rem;         /* bulles un poil plus petites sur mobile */
    font-size:.9rem;
  }
}

/* Lien rouge non souligné */
a.link-red {
  color: #BC0D0D;
  text-decoration: none;
}
a.link-red:hover,
a.link-red:active,
a.link-red:visited {
  color: #BC0D0D;          /* reste rouge dans tous les états */
  text-decoration: none;   /* jamais souligné */
}
a.link-red:focus-visible {  /* accessibilité clavier */
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* Footer layout */
.site-footer .footer-bar{
  display:flex;
  justify-content:space-between;   /* ← met la privacy à droite */
  align-items:baseline;
  gap:1rem;
  flex-wrap:wrap;                  /* wrap si pas la place */
}
.site-footer p{ margin:0; }

/* Lien blanc non souligné */
a.link-white{
  color:#fff;
  text-decoration:none;
}
a.link-white:hover,
a.link-white:visited,
a.link-white:active{
  color:#fff;
  text-decoration:none;
}

/* Petite note de mise à jour */
footer .footer-note{
  color:#fff;
  opacity:.9;          /* léger adoucissement */
  margin-left:.35rem;
}

/* Sur mobile, on empile proprement */
@media (max-width:576px){
  .site-footer .footer-bar{
    flex-direction:column;
    align-items:flex-start;
    gap:.25rem;
  }
}

/* ─── Sélection du jour (Occaz‑Motard) ───────────────────────── */
.selection-jour {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px;
  background: #e7e6e6;
  font-family: 'Libre Franklin', sans-serif;
}

.selection-jour-infos {
  display: flex;
  flex-direction: column;
  align-items: center; /* centre horizontalement tous les éléments */
  text-align: center;  /* centre le texte */
}

.selection-jour-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.selection-jour-title {
  font-size: 18px;
  margin: 0;
  color: #000000;
  font-weight: 700;
  align-items: center;
  text-align: center;
}

.selection-jour-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}

.selection-jour-photo .selection-img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.selection-jour-infos .sel-titre {
  font-size: 25px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #111;
}

.selection-jour-infos .sel-taille {
  font-size: 18px;
  color: #444;
  margin: 0 0 12px 0;
}

.sel-prix-zone {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 14px 0;
}

.prix-bubble {
  width: 140px;
  height: 140px;
  min-width: 140px;
  min-height: 140px;
  border-radius: 50%;
  background: #FFD54F; /* jaune doux */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border: 3px solid #FFE082;
}

.prix-bubble .prix-amount {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  color: #000;
}

.prix-bubble .prix-devise {
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .5px;
  color: #000;
  margin-top: 4px;
  text-transform: uppercase;
}

.prix-details {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
}

.sel-actions .btn {
  font-weight: 700;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 991px) {
  .selection-jour-grid {
    grid-template-columns: 1fr;
  }
  .selection-jour-photo .selection-img {
    max-height: 280px;
  }
  .prix-bubble {
    width: 120px; height: 120px; min-width: 120px; min-height: 120px;
  }
  .prix-bubble .prix-amount { font-size: 26px; }
}

.promo-mx-banner {
  display: flex; /* deux colonnes */
  height: 230px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  text-decoration: none; 
  color: inherit;
}

.promo-mx-banner:hover {
  transform: scale(1.02);
  text-decoration: none; 
}

.promo-mx-image {
  flex: 1;
  background: url('/uploads/img/banniere_articles_motocross_occaz_motard_depot_vente_equipement_moto_occasion.webp') center/cover no-repeat;
}

.promo-mx-content {
  flex: 1;
  background: rgba(0,0,0,1); /* noir plein */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  color: #fff;
}

.promo-mx-content h2 {
  font-size: 35px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #FFD54F;
}

.promo-mx-content p {
  font-size: 24px;
  margin: 0;
}

@media (max-width: 768px) {

  .promo-mx-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #FFD54F;
}

.promo-mx-content p {
  font-size: 13px;
  margin: 0;
}

}