/* ==========================================================================
   Starbit Trading — composants partagés par toutes les pages (lot 4)
   ========================================================================== */

.h-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.h-section { padding: 88px 0; }
.h-title {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  font-weight: 750;
  color: var(--sb-night);
  line-height: 1.15;
  margin: 0 0 40px;
  max-width: 22ch;
}


.h-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.h-btn-wa { background: #157a3f; color: #fff; }
.h-btn-wa:hover { background: #0f6332; color: #fff; }
.h-btn-kraft { background: var(--sb-kraft); color: var(--sb-night); }
.h-btn-kraft:hover { background: #e0c497; }
.h-link { color: var(--sb-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.h-link-light { color: #fff; }


/* ---------- Étapes ---------- */
.h-steps-section { background: var(--sb-night); color: #fff; }
.h-steps-section .h-title { color: #fff; }
.h-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  counter-reset: step;
}
.h-steps li { counter-increment: step; position: relative; padding-top: 64px; }
.h-steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sb-kraft); color: var(--sb-night);
  font-weight: 800; font-size: 1.1rem;
}
.h-steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 22px; left: 56px; right: -16px;
  border-top: 2px dashed rgba(207, 174, 122, .45);
}
.h-steps h3 { font-size: 1.15rem; margin: 0 0 10px; color: #fff; }
.h-steps p { color: #c3d2e2; margin: 0 0 12px; font-size: .97rem; }
.h-steps strong { color: #fff; }
.h-steps a { color: var(--sb-kraft); font-weight: 700; text-underline-offset: 4px; }


/* ---------- Appel à l'action ---------- */
.h-cta { background: var(--sb-blue); color: #fff; padding: 64px 0; }
.h-cta-grid { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.h-cta h2 { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); margin: 0 0 8px; }
.h-cta p { margin: 0; color: #fff; max-width: 52ch; }
.h-cta-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }


/* ---------- En-tête de page intérieure ---------- */
.p-hero {
  background: linear-gradient(180deg, var(--sb-bg) 0%, #fff 100%);
  padding: 28px 0 48px;
}
.p-crumbs { font-size: .9rem; color: var(--sb-gray); margin: 0 0 40px; }
.p-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.p-crumbs li + li::before { content: "/"; margin-right: 6px; color: #a7b3c0; }
.p-crumbs a { color: var(--sb-blue); text-decoration: none; }
.p-crumbs a:hover { text-decoration: underline; }
.p-crumbs [aria-current] { color: var(--sb-night); font-weight: 600; }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.p-hero-grid.p-solo { grid-template-columns: minmax(0, 1fr); }
.p-hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.3rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--sb-night);
  margin: 0 0 20px;
  max-width: 20ch;
}
.p-lead { font-size: 1.1rem; color: var(--sb-gray); max-width: 58ch; margin: 0 0 26px; }
.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.p-media { margin: 0; position: relative; }
.p-media img { width: 100%; height: 440px; object-fit: cover; border-radius: 22px; display: block; }

/* fiche de faits (délais, formats…) posée sur la photo ou seule */
.p-facts {
  background: var(--sb-night); color: #fff;
  border-radius: 18px; padding: 20px 22px;
  display: grid; gap: 14px;
  box-shadow: 0 24px 50px -24px rgba(15, 47, 82, .7);
}
.p-media .p-facts { position: absolute; left: -28px; right: 28px; bottom: -36px; }
.p-facts div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.p-facts div + div { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 12px; }
.p-facts dt { color: #9fb5cc; font-size: .88rem; }
.p-facts dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- Sections ---------- */
.p-tint { background: var(--sb-bg); }
.p-intro { color: var(--sb-gray); max-width: 62ch; margin: -22px 0 36px; font-size: 1.05rem; }

/* deux offres côte à côte */
.p-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.p-offers.p-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-offer {
  background: #fff;
  border: 1px solid var(--sb-line);
  border-top: 4px solid var(--sb-blue);
  border-radius: 6px 6px 18px 18px;
  padding: 28px 28px 30px;
  display: flex; flex-direction: column;
}
.p-offer h3 { font-size: 1.3rem; color: var(--sb-night); margin: 0 0 6px; }
.p-offer .p-sub { color: var(--sb-gray); margin: 0 0 18px; }
.p-offer .h-btn, .p-offer .h-link { margin-top: auto; align-self: flex-start; }
.p-tag {
  align-self: flex-start;
  background: var(--sb-kraft-soft); color: #6b4f22;
  font-weight: 700; font-size: .85rem;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* liste à coches */
.p-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.p-list li { position: relative; padding-left: 30px; line-height: 1.55; }
.p-list li::before {
  content: ""; position: absolute; left: 0; top: .32em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sb-kraft-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%236b4f22' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.p-list strong { color: var(--sb-night); }

/* atouts : colonnes séparées par des filets, pas des cartes */
.p-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--sb-night); }
.p-points > div { padding: 26px 24px 8px 0; }
.p-points > div + div { padding-left: 24px; border-left: 1px solid var(--sb-line); }
.p-points h3 { font-size: 1.12rem; color: var(--sb-night); margin: 0 0 8px; }
.p-points p { color: var(--sb-gray); margin: 0; }

/* encadré */
.p-note {
  background: var(--sb-kraft-soft);
  border-left: 4px solid var(--sb-kraft);
  border-radius: 0 14px 14px 0;
  padding: 18px 22px; margin: 0 0 36px;
  color: #4a3a1c;
}
.p-note a { color: #6b4f22; font-weight: 700; }

/* ---------- Texte long (conditions, articles) ---------- */
.p-prose { max-width: 70ch; }
.p-prose h2 { font-size: 1.45rem; color: var(--sb-night); margin: 44px 0 14px; }
.p-prose h3 { font-size: 1.15rem; color: var(--sb-night); margin: 30px 0 10px; }
.p-prose p, .p-prose li { line-height: 1.75; }
.p-prose ul { padding-left: 22px; }
.p-prose .p-art { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0 16px; padding: 18px 0; border-top: 1px solid var(--sb-line); }
.p-prose .p-art > b { color: var(--sb-blue); font-stretch: 112%; font-size: .95rem; padding-top: 3px; }
.p-prose .p-art > div > p:first-child { margin-top: 0; }
.p-prose .p-art > div > *:last-child { margin-bottom: 0; }
.p-formula {
  display: inline-block; background: var(--sb-night); color: #fff;
  border-radius: 12px; padding: 12px 18px; font-weight: 700; margin: 4px 0 8px;
}

/* ---------- Mise en page à deux colonnes (contact, à propos) ---------- */
.p-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.p-place { border: 1px solid var(--sb-line); border-radius: 18px; padding: 28px; background: #fff; }
.p-place h2 { font-size: 1.35rem; color: var(--sb-night); margin: 0 0 4px; }
.p-place .p-sub { color: var(--sb-gray); margin: 0 0 20px; }
.p-place dl { margin: 0; display: grid; gap: 14px; }
.p-place dt { font-size: .85rem; color: var(--sb-gray); }
.p-place dd { margin: 2px 0 0; font-weight: 600; color: var(--sb-ink); }
.p-place dd a { color: var(--sb-blue); }
.p-zh { font-size: .95rem; line-height: 1.7; background: var(--sb-bg); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }

/* ---------- Liste d'articles ---------- */
.p-posts { display: grid; gap: 0; border-top: 2px solid var(--sb-night); }
.p-post { display: grid; grid-template-columns: 10rem 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--sb-line); }
.p-post time { color: var(--sb-gray); font-size: .92rem; padding-top: 4px; }
.p-post h2 { font-size: 1.35rem; margin: 0 0 8px; }
.p-post h2 a { color: var(--sb-night); text-decoration: none; }
.p-post h2 a:hover { color: var(--sb-blue); text-decoration: underline; text-underline-offset: 4px; }
.p-post p { color: var(--sb-gray); margin: 0; max-width: 64ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .p-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .p-media .p-facts { left: 16px; right: 16px; bottom: -44px; }
  .p-hero.p-has-media { padding-bottom: 104px; }
  .p-offers.p-three { grid-template-columns: 1fr; }
  .h-steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .h-steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  .p-media img { height: 280px; }
  .h-section { padding: 64px 0; }
  .h-wrap { padding: 0 18px; }
  .p-offers, .p-split { grid-template-columns: 1fr; }
  .p-points { grid-template-columns: 1fr; }
  .p-points > div, .p-points > div + div { padding: 20px 0; border-left: 0; }
  .p-points > div + div { border-top: 1px solid var(--sb-line); }
  .p-post { grid-template-columns: 1fr; gap: 6px; }
  .h-steps { grid-template-columns: 1fr; }
  .h-steps li { padding: 0 0 0 64px; min-height: 44px; }
  .h-steps li::after { display: none; }
  .p-prose .p-art { grid-template-columns: 1fr; }
  .p-prose .p-art > b { padding: 0 0 4px; }
  .p-facts div { flex-direction: column; gap: 2px; }
  .p-facts dd { text-align: left; }
}

/* ---------- Galerie et étapes sur fond clair ---------- */
.p-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.p-gallery img { width: 100%; height: 300px; object-fit: cover; border-radius: 14px; display: block; }
.h-steps.h-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-steps-light h3 { color: var(--sb-night); }
.p-steps-light p { color: var(--sb-gray); }
.p-steps-light a { color: var(--sb-blue); }
.p-steps-light li:not(:last-child)::after { border-top-color: var(--sb-kraft); }
@media (max-width: 1024px) {
  .h-steps.h-steps-3 { grid-template-columns: 1fr; row-gap: 32px; }
  .h-steps.h-steps-3 li { padding: 0 0 0 64px; min-height: 44px; }
  .h-steps.h-steps-3 li::after { display: none; }
}
@media (max-width: 760px) {
  .p-gallery { grid-template-columns: 1fr 1fr; }
  .p-gallery img { height: 170px; }
  .p-gallery img:first-child { grid-column: 1 / -1; height: 220px; }
}

/* ---------- Articles ---------- */
.p-meta { color: var(--sb-gray); margin: 0; }
.p-article { font-size: 1.07rem; }
.p-article > p:first-child { font-size: 1.2rem; color: var(--sb-night); }
.p-article a { color: var(--sb-blue); font-weight: 600; }
.p-article-foot {
  max-width: 70ch; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--sb-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
.p-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--sb-gray); }
.p-share a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--sb-line); border-radius: 999px;
  color: var(--sb-night); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.p-share a:hover { border-color: var(--sb-blue); color: var(--sb-blue); }

/* ---------- Logos clients ---------- */
.p-clients { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; margin-top: 36px; }
.p-clients img { height: 70px; width: auto; object-fit: contain; mix-blend-mode: multiply; }

/* Neutralise les anciennes règles génériques des pages (main, paragraphes) */
main#contenu { max-width: none; margin: 0; padding: 0; }
.p-prose p { margin: 0 0 1.1em; }
.p-prose ul { margin: 0 0 1.2em; }
.p-prose li { margin-bottom: .45em; }

/* ---------- Suivi ---------- */
:root { --primary-dark: var(--sb-night); --primary-medium: var(--sb-blue); --accent-gold: var(--sb-kraft); --accent-gold-light: #e0c497; }
.p-track {
  background: #fff; border: 1px solid var(--sb-line); border-radius: 18px; padding: 20px;
  max-width: 640px; box-shadow: 0 18px 40px -28px rgba(15, 47, 82, .45);
}
.p-track label { display: block; font-weight: 700; color: var(--sb-night); margin-bottom: 10px; }
.p-track-row { display: flex; gap: 8px; }
.p-track input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 14px 16px;
  border: 1.5px solid var(--sb-line); border-radius: 12px; background: var(--sb-bg);
}
.p-track input:focus { border-color: var(--sb-blue); background: #fff; outline: none; }
.p-track button { font: inherit; font-weight: 700; padding: 0 24px; border: 0; border-radius: 12px; background: var(--sb-blue); color: #fff; cursor: pointer; }
.p-track button:hover { background: var(--sb-blue-dark); }
.p-results { margin-top: 32px; }
.p-results:empty { margin-top: 0; }
.p-help { color: var(--sb-gray); margin-top: 28px; max-width: 64ch; }
.p-help a { color: var(--sb-blue); font-weight: 600; }

/* ---------- Boutons secondaires ---------- */
.h-btn-blue { background: var(--sb-blue); color: #fff; }
.h-btn-blue:hover { background: var(--sb-blue-dark); color: #fff; }
.h-btn-outline { border: 2px solid var(--sb-blue); color: var(--sb-blue); background: #fff; }
.h-btn-outline:hover { background: var(--sb-bg); }

/* ---------- Boutique ---------- */
.p-product { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.p-product-visual {
  position: sticky; top: 110px;
  aspect-ratio: 1; border-radius: 22px; background: var(--sb-kraft-soft);
  display: grid; place-items: center; align-content: center; gap: 14px; color: #8a6d3e;
}
.p-product-visual svg { width: 46%; fill: none; stroke: #8a6d3e; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.p-product-visual span { font-weight: 600; }
.p-stock { display: inline-block; background: #fdecec; color: #a12a2a; font-weight: 700; font-size: .88rem; padding: 4px 12px; border-radius: 999px; margin: 0 0 14px; }
.p-product-title { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); font-stretch: 112%; color: var(--sb-night); line-height: 1.1; margin: 0 0 10px; }
.p-price { font-size: 1.6rem; font-weight: 800; color: var(--sb-night); margin: 0 0 16px; }
.p-product-h2 { font-size: 1.2rem; color: var(--sb-night); margin: 40px 0 16px; }
.p-specs { margin: 0; border-top: 1px solid var(--sb-line); }
.p-specs div { display: grid; grid-template-columns: 11rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sb-line); }
.p-specs dt { color: var(--sb-gray); }
.p-specs dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) {
  .p-product { grid-template-columns: 1fr; gap: 28px; }
  .p-product-visual { position: static; aspect-ratio: 16 / 9; }
  .p-track-row { flex-direction: column; }
  .p-track button { padding: 14px; }
  .p-specs div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Résultat du suivi de colis ---------- */
.trk-loading { display: flex; align-items: center; gap: 12px; color: var(--sb-gray); }
.trk-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--sb-line); border-top-color: var(--sb-blue); animation: trk-spin .8s linear infinite; }
@keyframes trk-spin { to { transform: rotate(360deg); } }
.trk-msg { max-width: 640px; padding: 16px 20px; border-radius: 0 14px 14px 0; line-height: 1.6; }
.trk-msg-info { background: var(--sb-kraft-soft); border-left: 4px solid var(--sb-kraft); color: #4a3a1c; }
.trk-msg-erreur { background: #fdecec; border-left: 4px solid #c43d3d; color: #6e1d1d; }
.trk-msg a { color: inherit; font-weight: 700; }

.trk-card { max-width: 820px; background: #fff; border: 1px solid var(--sb-line); border-radius: 18px; overflow: hidden; }
.trk-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--sb-night); color: #fff; padding: 20px 24px; }
.trk-code-label { margin: 0; color: #9fb5cc; font-size: .85rem; }
.trk-code { margin: 2px 0 0; font-size: 1.35rem; font-weight: 800; font-stretch: 112%; letter-spacing: .02em; word-break: break-all; }
.trk-status { margin: 0; background: var(--sb-kraft); color: var(--sb-night); font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.trk-status.is-done { background: #c9ecd6; color: #0f5a2c; }

.trk-steps { list-style: none; margin: 0; padding: 26px 24px 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.trk-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 4px; }
.trk-step::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--sb-line); z-index: 0; }
.trk-step:first-child::before { display: none; }
.trk-step.is-faite::before, .trk-step.is-en_cours::before { background: var(--sb-blue); }
.trk-dot { position: relative; z-index: 1; width: 21px; height: 21px; border-radius: 50%; background: #fff; border: 3px solid var(--sb-line); }
.trk-step.is-faite .trk-dot { background: var(--sb-blue); border-color: var(--sb-blue); }
.trk-step.is-en_cours .trk-dot { background: var(--sb-kraft); border-color: var(--sb-night); box-shadow: 0 0 0 4px rgba(207, 174, 122, .35); }
.trk-step-label { font-size: .85rem; line-height: 1.3; color: var(--sb-gray); }
.trk-step.is-faite .trk-step-label { color: var(--sb-ink); }
.trk-step.is-en_cours .trk-step-label { color: var(--sb-night); font-weight: 700; }

.trk-facts { margin: 0; padding: 12px 24px 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.trk-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--sb-line); }
.trk-facts dt { color: var(--sb-gray); }
.trk-facts dd { margin: 0; font-weight: 600; text-align: right; }
.trk-updated { margin: 0; padding: 12px 24px 20px; color: var(--sb-gray); font-size: .88rem; }

@media (max-width: 760px) {
  .trk-head { padding: 18px; }
  .trk-steps { grid-template-columns: 1fr; padding: 22px 18px 6px; gap: 0; }
  .trk-step { flex-direction: row; text-align: left; gap: 14px; padding: 0 0 18px; align-items: flex-start; }
  .trk-step::before { top: -18px; left: 9px; width: 3px; height: 18px; }
  .trk-step + .trk-step::before { display: block; }
  .trk-step-label { font-size: .95rem; padding-top: 1px; }
  .trk-facts { grid-template-columns: 1fr; padding: 4px 18px 4px; }
  .trk-updated { padding: 12px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) { .trk-spinner { animation: none; } }

/* Texte réservé aux lecteurs d'écran (toutes les pages) */
.sim-sr, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
