/* ── Charte Déstockage HUB PR Provence ── */
:root {
  --brand: #7b3fc4;        /* lavande */
  --brand-dark: #55268f;
  --brand-hover: #652fa8;
  --silver: #c9ccd1;
}
.btn.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-focus-shadow-rgb: 123,63,196;
}
.bg-brand { background-color: var(--brand) !important; color: #fff; }
.text-brand { color: var(--brand) !important; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* ── Pièces catalogue ── */
.piece-card {
  transition: transform .15s, box-shadow .15s;
  border: none;
}
.piece-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}

.piece-thumb {
  height: 180px;
  object-fit: cover;
}

.piece-thumb-placeholder {
  height: 180px;
}

/* ── Navbar ── */
.navbar-brandbar {
  background: linear-gradient(90deg, #15121f 0%, #2a1d47 55%, #15121f 100%);
  border-bottom: 3px solid var(--brand);
  padding-top: .25rem; padding-bottom: .25rem;
}
.navbar-brand { padding: 0; display: flex; align-items: center; flex-shrink: 0; margin-right: 1rem; }
.partner-logo { height: 30px; width: auto; display: block; margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); box-sizing: content-box; }
.nav-search { min-width: 280px; }
@media (min-width: 992px) and (max-width: 1199.98px) { .nav-search { min-width: 0; max-width: 200px; } .navbar-brandbar .nav-link { padding-left: .4rem; padding-right: .4rem; } }
@media (max-width: 576px) { .partner-logo { height: 20px; margin-left: 8px; padding-left: 8px; } }
.brand-logo { height: 76px; width: auto; display: block; }
@media (max-width: 576px) { .brand-logo { height: 48px; } }

/* ── Footer ── */
.site-footer { background: #15121f; color: rgba(255,255,255,.55); border-top: 3px solid var(--brand); }
.footer-logo { height: 56px; width: auto; opacity: .9; }
.footer-partner { height: 24px; opacity: .9; }

/* ── Sidebar catégories ── */
.list-group-item.active {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* ── Badges ── */
.badge { font-weight: 500; }

/* ── Responsive images ── */
img { max-width: 100%; }

/* ── Page contact : dépôt de fichiers ── */
.drop-zone {
  border: 2px dashed #c9b6e8; border-radius: .75rem; background: #faf8fd;
  padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragging { background: #f1eafb; border-color: var(--brand); outline: none; }
.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.file-item { display: flex; align-items: center; gap: .5rem; border: 1px solid #e3e3e3; border-radius: .5rem; padding: .35rem; background: #fff; }
.file-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: .35rem; background: #f3f3f3;
              display: flex; align-items: center; justify-content: center; overflow: hidden; color: #777; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-info { min-width: 0; flex: 1; }
.contact-aside { border-top: 4px solid var(--brand); }

/* ── Carte pièce entièrement cliquable ── */
.piece-card { cursor: pointer; }
.piece-card:hover .btn-outline-dark { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ══ Page d'accueil ══════════════════════════════════════════════════════════ */
.home-hero {
  background: radial-gradient(circle at 15% 20%, rgba(155, 94, 224, .55), transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(123, 63, 196, .45), transparent 50%),
              linear-gradient(135deg, #15121f 0%, #2a1d47 60%, #15121f 100%);
  color: #fff; margin-bottom: 2.5rem;
}
.home-hero-title { font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.8rem); letter-spacing: -.02em; }
.home-hero-sub { opacity: .8; font-size: 1.1rem; margin-bottom: 1.75rem; }
.home-search {
  max-width: 640px; display: flex; align-items: center; gap: .5rem;
  background: #fff; border-radius: 999px; padding: .35rem .35rem .35rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.home-search i { color: #8a8199; }
.home-search input { flex: 1; border: 0; outline: 0; min-width: 0; font-size: 1rem; color: #221b33; }
.home-search .btn { border-radius: 999px; padding: .55rem 1.3rem; }

/* Cartes des rayons */
.section-card {
  --bg: none;
  position: relative; display: block; min-height: 280px; border-radius: 1.25rem; overflow: hidden;
  color: #fff; text-decoration: none; isolation: isolate;
  background: var(--bg) center / cover no-repeat, #2a1d47;
  box-shadow: 0 10px 30px rgba(43, 23, 77, .18);
  transition: transform .2s, box-shadow .2s;
}
.section-card::before {           /* voile coloré par-dessus la photo */
  content: ""; position: absolute; inset: 0; z-index: -1; transition: opacity .2s;
}
.section-card-occasion::before { background: linear-gradient(135deg, rgba(123,63,196,.93) 0%, rgba(42,29,71,.85) 100%); }
.section-card-neuf::before     { background: linear-gradient(135deg, rgba(21,18,31,.92) 0%, rgba(70,78,96,.82) 100%); }
.section-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(43, 23, 77, .3); color: #fff; }
.section-card:hover::before { opacity: .9; }
.section-card-body { position: relative; height: 100%; min-height: 280px; padding: 2rem; display: flex; flex-direction: column; }
.section-card-icon {
  width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.15); backdrop-filter: blur(4px); font-size: 1.7rem; margin-bottom: 1rem;
}
.section-card-pneus::before    { background: linear-gradient(135deg, rgba(34,34,40,.93) 0%, rgba(90,62,140,.85) 100%); }
.section-card-pneus .section-card-icon { background: linear-gradient(135deg, #3a3a44, #15121f); color: #fff; }
.section-card-neuf .section-card-icon { background: linear-gradient(135deg, #e9ebef, #b8bcc6); color: #221b33; }
.section-card h2 { font-weight: 800; font-size: 1.8rem; margin-bottom: .4rem; }
.section-card p { opacity: .85; max-width: 26rem; }
.section-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.section-card-count { background: rgba(255,255,255,.15); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; }
.section-card-cta { font-weight: 700; }
.section-card-cta i { transition: transform .2s; display: inline-block; }
.section-card:hover .section-card-cta i { transform: translateX(5px); }

/* Annonces */
.promo-card { border: 0; border-radius: 1rem; overflow: hidden; box-shadow: 0 6px 20px rgba(43,23,77,.10); transition: transform .15s, box-shadow .15s; }
.promo-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(43,23,77,.18); }
.promo-media {
  position: relative; height: 170px; background: linear-gradient(135deg, #9a5ee0, #7b3fc4 55%, #2a1d47) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 3rem;
}
.promo-card-wide { flex-direction: row; }
.promo-card-wide .promo-media { height: auto; min-height: 200px; flex: 0 0 45%; }
@media (max-width: 767px) { .promo-card-wide { flex-direction: column; } .promo-card-wide .promo-media { min-height: 170px; } }
.promo-badge {
  position: absolute; top: 12px; right: 12px; background: #e63946; color: #fff; font-weight: 800;
  font-size: 1rem; padding: .3rem .8rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* Pastilles sur les cartes pièces */
.section-chip { position: absolute; top: 10px; left: 10px; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; color: #fff; }
.section-chip-occasion { background: var(--brand); }
.section-chip-neuf { background: #221b33; }
.section-chip-pneus { background: #3a3a44; }
.last-unit { color: #e8590c; font-weight: 700; }
.new-chip { position: absolute; bottom: 10px; left: 10px; font-size: .7rem; font-weight: 800; padding: .2rem .6rem;
            border-radius: 999px; background: #f59f00; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.new-badge { background: #f59f00; font-size: .8rem; }
.section-card-new { display: inline-block; background: #f59f00; color: #fff; font-size: .75rem; font-weight: 700;
                    border-radius: 999px; padding: .15rem .6rem; margin-left: .4rem; }
.discount-chip { position: absolute; top: 10px; right: 10px; font-size: .75rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; background: #e63946; color: #fff; }

/* Comment ça marche */
.how-it-works { background: #faf8fd; border-radius: 1.25rem; padding: 2.5rem 1.5rem; }
.how-step {
  position: relative; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 18px rgba(123,63,196,.18);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--brand);
}
.how-num {
  position: absolute; top: -4px; right: -4px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* En-tête des catalogues */
.catalog-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-radius: 1rem; padding: 1.5rem 1.75rem; color: #fff;
}
.catalog-head-occasion { background: linear-gradient(135deg, #7b3fc4, #2a1d47); }
.catalog-head-neuf { background: linear-gradient(135deg, #2b2f3a, #15121f); }
.catalog-head-pneus { background: linear-gradient(135deg, #3a3a44, #5a3e8c); }
.catalog-head .breadcrumb-item a { color: rgba(255,255,255,.75); }
.catalog-head .breadcrumb-item.active, .catalog-head .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.55); }
.navbar .nav-link.active { color: #fff !important; box-shadow: inset 0 -2px 0 var(--brand); }

/* Annonces : l'image s'affiche en entier (pas de recadrage) */
.promo-media-img { height: auto; min-height: 0; background: #f4f1f8; display: block; }
.promo-media-img img { display: block; width: 100%; height: auto; }
.promo-card-wide .promo-media-img { min-height: 0; display: flex; align-items: center; }

/* ══ Page d'une annonce ══════════════════════════════════════════════════════ */
.promo-hero { border-radius: 1.25rem; overflow: hidden; }
.promo-hero-media { position: relative; background: #f4f1f8; display: flex; align-items: center; }
.promo-hero-media img { display: block; width: 100%; height: auto; }
.promo-piece-list { max-height: 380px; overflow-y: auto; background: #fff; }
.promo-piece { cursor: pointer; }
.promo-piece:hover { background: #faf8fd; }
.promo-cart-bar {
  position: sticky; bottom: 16px; z-index: 1020; margin-top: 2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, #7b3fc4, #2a1d47); color: #fff;
  border-radius: 999px; padding: .6rem .7rem .6rem 1.4rem; box-shadow: 0 10px 30px rgba(43,23,77,.35);
}

/* Bandeau d'accueil plus compact */
.home-hero { margin-bottom: 1.75rem; }
.home-hero-title { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-bottom: .35rem; }
.home-hero-sub { font-size: 1rem; margin-bottom: 1.1rem; }
.home-search { padding-top: .25rem; padding-bottom: .25rem; }

/* Cartes des rayons plus compactes */
.section-card, .section-card-body { min-height: 170px; }
.section-card-body { padding: 1.25rem 1.5rem; }
.section-card-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.25rem; margin-bottom: .5rem; }
.section-card h2 { font-size: 1.45rem; margin-bottom: .2rem; }
.section-card p { margin-bottom: .75rem; font-size: .95rem; }
/* Les deux cartes des rayons ont toujours la même hauteur */
.home-sections > [class*="col"] { display: flex; }
.home-sections .section-card { flex: 1; height: 100%; }

/* ══ Pages légales ══ */
.legal-content h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.6rem; color: #2a1d47; }
.legal-content p, .legal-content li { color: #3d3550; line-height: 1.65; }
.legal-todo { background: #fff3cd; padding: 0 .2rem; border-radius: 3px; }
.footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .85rem; margin: 0 .6rem; }
.footer-links a:hover { color: #fff; }

/* ══ Galerie photo de la fiche pièce ══ */
.gallery-main {
  position: relative; border-radius: 1rem; overflow: hidden; background: #f4f1f8; cursor: zoom-in;
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(43,23,77,.10);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .15s ease-out; }
.gallery-hint {
  position: absolute; left: 10px; bottom: 10px; font-size: .72rem; color: #fff; background: rgba(21,18,31,.6);
  padding: .2rem .6rem; border-radius: 999px; pointer-events: none; transition: opacity .2s;
}
.gallery-main:hover .gallery-hint { opacity: 0; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); color: #221b33; box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 2;
}
.gallery-nav.prev { left: 10px; } .gallery-nav.next { right: 10px; }
.gallery-count { position: absolute; right: 10px; bottom: 10px; font-size: .75rem; color: #fff; background: rgba(21,18,31,.6); padding: .15rem .55rem; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.gallery-thumb { width: 68px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: .5rem; overflow: hidden; background: #f4f1f8; opacity: .7; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--brand); opacity: 1; }

.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(12,10,18,.95); display: none; }
.lightbox.open { display: block; }
.lb-stage { position: absolute; inset: 0 0 56px 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.lightbox.zoomed .lb-stage { cursor: grab; }
.lb-stage img { max-width: 94vw; max-height: calc(100vh - 80px); object-fit: contain; user-select: none; transition: transform .12s ease-out; }
.lb-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%; width: 46px; height: 46px; font-size: 1.2rem; }
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; display: flex; align-items: center; justify-content: center; gap: .75rem; color: #fff; }
.lb-small { width: 38px; height: 38px; font-size: 1rem; }
.btn-outline-brand { color: var(--brand); border-color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.catalog-tools .form-select { min-width: 160px; }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #9a5ee0, #2a1d47); color: #fff; font-weight: 800; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }

/* ══ Bandeau d'information ══ */
.site-banner { color: #fff; font-size: .92rem; font-weight: 600; padding: .5rem 0; text-align: center; }
.site-banner .container { position: relative; padding-right: 2.5rem; }
.site-banner-info { background: linear-gradient(90deg, #9a5ee0, #7b3fc4); }
.site-banner-promo { background: linear-gradient(90deg, #e63946, #b5179e); }
.site-banner-warning { background: linear-gradient(90deg, #f08c00, #e8590c); }
.site-banner-success { background: linear-gradient(90deg, #2b9348, #198754); }
.site-banner-close { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: rgba(255,255,255,.85); }
.site-banner-close:hover { color: #fff; }
.offer-box { background: #faf8fd; border: 1px dashed #c9b6e8; border-radius: .75rem; padding: .75rem 1rem; }
