/* =========================================================
   Page d'accueil (Acheter) — mise en page propre à index.html
   ========================================================= */
.home h1, .home h2, .home h3 { letter-spacing: -.025em; }
.home h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.h-sub { color: var(--muted); font-size: 17px; max-width: 46ch; }
.h-sub a, .h-nostock a, .stock-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.h-sub a:hover, .h-nostock a:hover, .stock-empty a:hover { text-decoration-color: var(--ink); }
.h-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.h-link { font-weight: 600; border-bottom: 1.5px solid var(--ink); padding-bottom: 1px; }
.h-link:hover { color: var(--blue-d); border-color: var(--blue-d); }

/* ---------- Hero ---------- */
.h-hero { background: linear-gradient(to left, #2f6aa8 0%, #6d99cf 30%, #b8cde8 62%, #dbe5f2 100%); padding: 64px 0 0; border-bottom: 1px solid var(--line); }
.h-hero-in { display: grid; grid-template-columns: 1.25fr .75fr; gap: 64px; align-items: center; }
.h-where { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 15px; color: var(--muted); margin-bottom: 22px; }
.h-open { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: #1d6b3a; }
.h-open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2f9e57; box-shadow: 0 0 0 4px rgba(47,158,87,.15); }
.h-open.closed { color: var(--muted); }
.h-open.closed::before { background: #b5b8bd; box-shadow: none; }
.h-hero h1 { font-size: clamp(36px, 4.8vw, 58px); font-weight: 800; line-height: 1.02; }
.h-hero h1 em { font-style: normal; font-weight: 600; color: #8b8e94; }
.h-lead { font-size: 19px; color: #3d4046; max-width: 52ch; margin-top: 22px; }

.h-ticket { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 18px 40px -24px rgba(17,18,20,.25); }
.h-ticket-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.h-ticket-head span:first-child { color: var(--ink); font-weight: 600; }
.h-ticket ol { list-style: none; padding: 6px 20px; }
.h-ticket li { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; font-size: 15.5px; }
.h-ticket li + li { border-top: 1px solid #edf1f6; }
.h-ticket li span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-ticket li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.h-ticket-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; }
.h-ticket-foot:hover svg { transform: translateX(3px); }
.h-ticket-foot svg { transition: transform .15s; }

.h-facts { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border-top: 1px solid var(--line); }
.h-facts li { padding: 22px 24px 26px 0; }
.h-facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.h-facts strong { display: block; font-family: var(--head); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.h-facts span { color: var(--muted); font-size: 15px; }

/* ---------- Stock ---------- */
.h-stock { padding: 80px 0 88px; }
.h-stock-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.h-stock-head h2 span { color: #a3a6ab; font-weight: 600; }
.h-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.home .cat-filter { justify-content: flex-start; margin: 0; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.home .cat-filter button { border: 0; border-radius: 9px; padding: 8px 14px; font-size: 14.5px; }
.home .cat-filter button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.h-sort { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); }
.h-sort select { font: inherit; color: var(--ink); font-weight: 600; border: 1px solid var(--line); border-radius: 10px; padding: 8px 30px 8px 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 9px center / 14px no-repeat; appearance: none; }

.h-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home .item { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 0; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.home .item:hover { transform: none; border-color: #c9d2de; box-shadow: 0 14px 34px -22px rgba(17,18,20,.35); }
.item-plate { position: relative; height: 150px; background: var(--paper); display: grid; place-items: center; color: #b4bfcd; }
.item-plate svg { width: 120px; height: 120px; stroke-width: .9; }
.item-plate .grade { position: absolute; top: 12px; left: 12px; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); }
.item-plate .grade.a { color: #1d6b3a; }
.item-plate .last { position: absolute; top: 12px; right: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.item-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.home .item h3 { font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.item-specs { color: var(--muted); font-size: 14.5px; line-height: 1.45; margin-bottom: 18px; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid #edf1f6; }
.item-price { font-family: var(--head); font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.item-price small { display: block; font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.item-want { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; }
.item-want:hover { background: #2a2c31; }
.item-want svg { width: 16px; height: 16px; }
.home .stock-empty { text-align: left; margin: 24px 0 0; color: var(--muted); }
.h-nostock { border: 1px dashed #cbd4e0; border-radius: 16px; padding: 28px; color: var(--muted); font-size: 17px; }

/* ---------- Préparation ---------- */
.h-prep { background: var(--ink); color: #fff; padding: 84px 0; }
.h-prep .h-sub { color: #a7abb2; }
.h-prep-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.h-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.h-steps li { counter-increment: s; padding: 20px 0 22px; border-top: 1px solid #34363c; }
.h-steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--head); font-size: 13px; font-weight: 700; color: #7d828a; margin-bottom: 10px; }
.h-steps h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.h-steps p { color: #b3b7be; font-size: 15.5px; }

/* ---------- Reprise ---------- */
.h-swap { border-bottom: 1px solid var(--line); }
.h-swap-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 24px; }
.h-swap p { font-size: 19px; }
.h-swap strong { font-family: var(--head); font-weight: 800; letter-spacing: -.02em; }

/* ---------- Recherche ---------- */
.h-ask { padding: 84px 0; }
.h-ask-in { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.h-ask-text .h-sub + .h-sub { margin-top: 14px; }
.h-ask-text h2 { margin-bottom: 14px; }
.h-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.h-form .full { grid-column: 1 / -1; }
.h-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.h-form input, .h-form select, .h-form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #d3dae4; border-radius: 10px; font: inherit; font-weight: 400; font-size: 16px; background: #fff; color: var(--text); resize: vertical; }
.h-form select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 14px no-repeat; padding-right: 34px; }
.h-form input:focus, .h-form select:focus, .h-form textarea:focus { outline: none; border-color: var(--ink); }
.h-form .btn { height: 48px; }

/* ---------- Visite ---------- */
.h-visit { background: var(--paper); border-top: 1px solid var(--line); padding: 80px 0; }
.h-visit-in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.h-addr { font-family: var(--head); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin: 16px 0 8px; }
.h-hours { margin: 0; font-size: 16.5px; }
.h-hours td { color: var(--muted); padding: 11px 0; border-bottom: 1px solid var(--line); }
.h-hours tr.today td { color: var(--ink); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .h-hero-in, .h-prep-in, .h-ask-in, .h-visit-in { grid-template-columns: 1fr; gap: 40px; }
  .h-ticket { max-width: 520px; }
  .h-facts { grid-template-columns: 1fr 1fr; }
  .h-facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .h-facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .h-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .h-hero { padding-top: 40px; }
  .h-lead { font-size: 17.5px; }
  .h-facts { margin-top: 44px; }
  .h-facts li, .h-facts li + li { padding: 16px 12px 18px 0; }
  .h-facts li:nth-child(even) { padding-left: 14px; }
  .h-facts strong { font-size: 20px; }
  .h-facts span { font-size: 14px; }
  .h-stock, .h-prep, .h-ask, .h-visit { padding: 56px 0; }
  .h-grid { grid-template-columns: 1fr; }
  .h-tools { width: 100%; }
  .home .cat-filter { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; }
  .h-steps { grid-template-columns: 1fr; }
  .h-form { grid-template-columns: 1fr; padding: 20px; }
  .h-swap-in { padding: 24px 16px; }
}
/* Hero sur dégradé bleu : filets et ombre adaptés */
.h-hero .h-facts { border-top-color: rgba(17,18,20,.12); }
.h-hero .h-facts li + li { border-left-color: rgba(17,18,20,.12); }
.h-hero .h-ticket { border-color: rgba(255,255,255,.6); box-shadow: 0 24px 50px -24px rgba(20,50,90,.45); }
@media (max-width: 1000px) {
  .h-hero { background: linear-gradient(to left, #2f6aa8 0%, #7ea5d6 40%, #d2dfef 100%); }
  .h-hero .h-facts li:nth-child(n+3) { border-top-color: rgba(17,18,20,.12); }
}

/* Fiche « En rayon aujourd'hui » : carrousel qui glisse vers la gauche */
.h-slides { overflow: hidden; }
.h-track { display: flex; transition: transform .6s cubic-bezier(.65,0,.35,1); }
.h-slide { flex: 0 0 100%; display: block; color: inherit; }
.h-slide-pic { position: relative; height: 210px; background: var(--paper); display: grid; place-items: center; color: #b4bfcd; overflow: hidden; }
.h-slide-pic svg { width: 150px; height: 125px; stroke-width: .8; }
.h-slide-pic img { width: 100%; height: 100%; object-fit: cover; }
.h-slide-pic .grade { position: absolute; top: 12px; left: 12px; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.h-slide-info { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 16px 20px 6px; }
.h-slide-info > div { min-width: 0; }
.h-slide-name { font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.h-slide-specs { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-slide-price { font-family: var(--head); font-size: 22px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.h-dots { display: flex; gap: 6px; padding: 12px 20px 16px; }
.h-dots button { width: 7px; height: 7px; border-radius: 4px; background: #d3dae4; transition: width .3s, background .3s; padding: 0; }
.h-dots button[aria-selected="true"] { width: 20px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .h-track { transition: none; } }

/* ---------- Reconditionné, ça veut dire quoi ? ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.h-why { padding: 84px 0; background: #0f2440; color: #fff; }
.h-why .h-why-text p { color: #b9c6d8; }
.h-why .h-compare thead th { color: #8fa3bd; border-bottom-color: rgba(255,255,255,.35); }
.h-why .h-compare tbody th { color: #fff; }
.h-why .h-compare td { color: #9fb0c6; }
.h-why .h-compare th, .h-why .h-compare td { border-bottom-color: rgba(255,255,255,.1); }
.h-why .h-compare .us { background: #1b3a63; color: #fff; }
.h-why .h-compare thead .us { color: #9cc4f0; box-shadow: inset 0 3px 0 #5b9be0; border-bottom-color: rgba(255,255,255,.15); }
.h-why-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.h-why-text h2 { margin-bottom: 18px; }
.h-why-text p { color: #3d4046; font-size: 17.5px; max-width: 46ch; }
.h-why-text p + p { margin-top: 14px; }
.h-compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; }
.h-compare th, .h-compare td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.h-compare thead th { font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.h-compare tbody th { font-weight: 600; color: var(--ink); padding-left: 0; width: 30%; }
.h-compare td { color: var(--muted); }
.h-compare .us { background: var(--blue-l); color: var(--ink); font-weight: 600; }
.h-compare thead .us { color: var(--blue-d); border-radius: 12px 12px 0 0; border-bottom-color: var(--blue); }
.h-compare tbody tr:last-child .us { border-radius: 0 0 12px 12px; border-bottom: 0; }
@media (max-width: 1000px) { .h-why-in { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 640px) {
  .h-why { padding: 56px 0; }
  .h-compare thead { display: none; }
  .h-compare, .h-compare tbody, .h-compare tr { display: block; }
  .h-compare tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .h-compare th, .h-compare td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 3px 0; width: auto; }
  .h-compare tbody th { padding: 0 0 6px; width: auto; }
  .h-compare td::before { content: attr(data-l); color: var(--muted); font-weight: 400; }
  .h-compare td { color: var(--ink); text-align: right; }
  .h-compare .us { border-radius: 8px !important; padding: 6px 8px; margin: 4px -8px 0; }
  .h-compare .us::before { color: #9cc4f0; font-weight: 600; }
  .h-compare tr { border-bottom-color: rgba(255,255,255,.12); }
  .h-compare td { color: #fff; }
  .h-compare td::before { color: #8fa3bd; }
}

/* Bandeau blanc des repères, entre le haut bleu et le bloc marine */
.h-hero { padding-bottom: 72px; }
.h-factband { background: #fff; border-bottom: 1px solid var(--line); }
.h-factband .h-facts { margin-top: 0; border-top: 0; }
.h-factband .h-facts li + li { border-left-color: var(--line); }
@media (max-width: 1000px) { .h-factband .h-facts li:nth-child(n+3) { border-top-color: var(--line); } }
@media (max-width: 640px) { .h-hero { padding-bottom: 48px; } }

/* Stock sur 4 colonnes : cartes plus compactes */
@media (min-width: 1001px) {
  .item-plate { height: 130px; }
  .item-plate svg { width: 104px; height: 104px; }
  .item-body { padding: 16px 16px 16px; }
  .home .item h3 { font-size: 16.5px; }
  .item-specs { font-size: 14px; }
  .item-price { font-size: 21px; }
  .item-want { height: 38px; padding: 0 12px; font-size: 14px; }
}

/* Carrousel : chaque diapo fait exactement la largeur de la carte.
   Sans min-width: 0, un long texte élargit la diapo et le défilement se décale. */
.h-slide { min-width: 0; width: 100%; overflow: hidden; }
.h-slide-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
