/* ===================================================================
   SOS EHPAD — SINGLE POST TEMPLATE
   Prefixe : sp-
   =================================================================== */

/* Variables globales via design-system.css */
.sp-article-wrapper *,
.sp-article-wrapper *::before,
.sp-article-wrapper *::after {
  box-sizing: border-box;
}

/* --- Hero --- */
.sp-hero {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}
.sp-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.sp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,32,80,0.15) 0%, rgba(15,32,80,0.85) 100%);
  z-index: 2;
}
.sp-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1340px;
  margin: 0 auto;
  padding: 60px 32px 48px;
  width: 100%;
}
.sp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sp-breadcrumb a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.sp-breadcrumb a:hover {
  color: var(--sos-green);
}
.sp-breadcrumb svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255,255,255,0.5);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sp-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,168,160,0.9);
  color: var(--sos-white);
  font-size: 14px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: background 0.2s;
}
.sp-cat-badge:hover {
  background: var(--sos-teal);
}
.sp-hero h1 {
  font-family: var(--sos-font-display, 'Source Serif 4', Georgia, serif) !important;
  font-size: clamp(1.6rem, 4vw, 2.6rem) !important;
  font-weight: 800 !important;
  color: var(--sos-white) !important;
  line-height: 1.25 !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
  border: none !important;
  max-width: 900px;
}
.sp-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}
.sp-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-hero-meta svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255,255,255,0.7);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sp-hero-meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.sp-hero-no-img {
  min-height: 280px;
  background: linear-gradient(135deg, #1a365d 0%, #2B6CB0 50%, #3B7DD8 100%);
}

/* --- Article body layout --- */
.sp-body {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 40px;
  position: relative;
}
.sp-content {
  flex: 1;
  min-width: 0;
  padding: 40px 0 60px;
}

/* --- Share bar (left sticky) --- */
.sp-share-sticky {
  position: sticky;
  top: 120px;
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 48px;
  align-self: flex-start;
}
.sp-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sos-white);
  border: 1px solid var(--sos-border);
  color: var(--sos-text-light);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.sp-share-btn:hover {
  background: var(--sos-blue);
  border-color: var(--sos-blue);
  color: var(--sos-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43,108,176,0.25);
}
.sp-share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.sp-share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 8px;
}

/* --- Article content styling --- */
.sp-content h2 {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sos-navy);
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--sos-blue);
  line-height: 1.35;
  scroll-margin-top: 100px;
}
.sp-content h3 {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sos-teal);
  margin: 32px 0 12px;
  line-height: 1.4;
}
.sp-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sos-text);
  margin: 24px 0 10px;
}
.sp-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--sos-text);
  margin: 0 0 18px;
}
.sp-content ul, .sp-content ol {
  margin: 0 0 20px 20px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--sos-text);
}
.sp-content li {
  margin-bottom: 6px;
}
.sp-content a {
  color: var(--sos-blue);
  text-decoration: underline;
  text-decoration-color: rgba(43,108,176,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.sp-content a:hover {
  text-decoration-color: var(--sos-blue);
}
.sp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sos-radius-sm, 8px);
  margin: 24px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sp-content img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.sp-content blockquote {
  border-left: 4px solid var(--sos-teal);
  margin: 24px 0;
  padding: 16px 24px;
  background: #f0faf8;
  border-radius: 0 var(--sos-radius) var(--sos-radius) 0;
  font-style: italic;
  color: var(--sos-text);
}
.sp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.sp-content th {
  background: var(--sos-navy);
  color: var(--sos-white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}
.sp-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--sos-border);
}
.sp-content tr:nth-child(even) td {
  background: var(--sos-bg);
}
.sp-content figure {
  margin: 24px 0;
}
.sp-content figcaption {
  font-size: 0.85rem;
  color: var(--sos-text-light);
  text-align: center;
  margin-top: 8px;
}
/* WordPress blocks */
.sp-content .wp-block-image {
  margin: 24px 0;
}
.sp-content .wp-block-embed {
  margin: 24px 0;
}
.sp-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.sp-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--sos-radius);
}

/* --- Tags --- */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--sos-border);
}
.sp-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sos-blue);
  background: #eef4fb;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}
.sp-tag:hover {
  background: var(--sos-blue);
  color: var(--sos-white);
}

/* --- Share bar mobile (bottom of article) --- */
.sp-share-mobile {
  display: none;
  gap: 10px;
  justify-content: center;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--sos-border);
}
.sp-share-mobile-top {
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-top: none;
  border-bottom: 1px solid var(--sos-border);
}
.sp-share-mobile-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
}

/* --- Post navigation --- */
.sp-nav-posts {
  max-width: var(--sos-max-w);
  margin: 0 auto 48px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.sp-nav-post {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  background: var(--sos-white);
  border: 1px solid var(--sos-border);
  border-radius: var(--sos-radius);
  text-decoration: none;
  transition: all 0.25s;
}
.sp-nav-post:hover {
  border-color: var(--sos-blue);
  box-shadow: var(--sos-shadow);
  transform: translateY(-2px);
}
.sp-nav-post-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--sos-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-nav-post-label svg {
  width: 14px;
  height: 14px;
  stroke: var(--sos-text-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sp-nav-post-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--sos-text);
  line-height: 1.4;
}
.sp-nav-post:hover .sp-nav-post-title {
  color: var(--sos-blue);
}
.sp-nav-next {
  text-align: right;
}
.sp-nav-next .sp-nav-post-label {
  justify-content: flex-end;
}

/* --- Related articles section --- */
.sp-related {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  background: var(--sos-bg);
  padding: 56px 32px 64px;
}
.sp-related-inner {
  max-width: 1340px;
  margin: 0 auto;
}
.sp-related-title {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sos-navy);
  margin-bottom: 8px;
}
.sp-related-sub {
  font-size: 15px;
  color: var(--sos-text-light);
  margin-bottom: 32px;
}
.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.sp-related-card {
  background: var(--sos-white);
  border-radius: var(--sos-radius);
  overflow: hidden;
  border: 1px solid var(--sos-border);
  text-decoration: none;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.sp-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: transparent;
}
.sp-related-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.sp-related-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--sos-navy) 0%, var(--sos-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-related-card-img-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255,255,255,0.4);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sp-related-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sp-related-card-cat {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-teal);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.sp-related-card-title {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--sos-text);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-related-card:hover .sp-related-card-title {
  color: var(--sos-blue);
}
.sp-related-card-date {
  font-size: 14px;
  color: var(--sos-text-light);
}
.sp-related-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 12px 28px;
  background: var(--sos-blue);
  color: var(--sos-white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--sos-radius);
  text-decoration: none;
  transition: all 0.2s;
}
.sp-related-more:hover {
  background: var(--sos-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30,58,138,0.3);
}
.sp-related-more svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Section separator label */
.sp-section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.sp-section-label::before,
.sp-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sos-border);
}
.sp-section-label span {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sos-text-light);
  white-space: nowrap;
}

/* --- Copy link toast --- */
.sp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--sos-navy);
  color: var(--sos-white);
  padding: 12px 24px;
  border-radius: var(--sos-radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}
.sp-toast.sp-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Mid-article CTA banner --- */
/* --- CTA Banner (mid-article product) --- */
.sp-cta-banner {
  margin: 36px 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--sos-white);
  border: 1px solid var(--sos-border);
  box-shadow: 0 2px 12px rgba(30,58,138,0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.sp-cta-banner:hover {
  box-shadow: 0 8px 24px rgba(30,58,138,0.12);
  transform: translateY(-2px);
}
.sp-cta-banner-top {
  background: linear-gradient(135deg, #1a365d 0%, #2B6CB0 60%, #3B7DD8 100%);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-cta-banner-top svg {
  width: 15px;
  height: 15px;
  stroke: var(--sos-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sp-cta-banner-top-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sos-green);
}
.sp-cta-banner-content {
  display: flex;
  align-items: stretch;
}
.sp-cta-banner-img-wrap {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid var(--sos-border);
}
.sp-cta-banner-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  padding: 12px;
}
.sp-cta-banner-body {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.sp-cta-banner-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sos-teal);
  margin-bottom: 8px;
}
.sp-cta-banner-type::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--sos-teal);
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-cta-banner-title {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--sos-navy);
  line-height: 1.35;
  margin-bottom: 6px;
}
.sp-cta-banner-desc {
  font-size: 13px;
  color: var(--sos-text-light);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-cta-banner-footer {
  display: flex;
  align-items: center;
  gap: 20px;
}
.sp-cta-banner-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--sos-navy);
  letter-spacing: -0.3px;
}
.sp-cta-banner-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--sos-text-light);
  margin-left: 2px;
}
.sp-cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--sos-blue) 0%, var(--sos-teal) 100%) !important;
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.25s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(43,108,176,0.2);
}
.sp-cta-banner-btn:hover,
.sp-cta-banner-btn:visited,
.sp-cta-banner-btn:active {
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43,108,176,0.35);
}
.sp-cta-banner-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Product cards section — compact shelf --- */
.sp-products {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  background: linear-gradient(135deg, var(--sos-navy) 0%, #152e6e 100%);
  padding: 36px 32px 40px;
  position: relative;
  overflow: hidden;
}
.sp-products::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sos-blue) 0%, var(--sos-teal) 40%, var(--sos-green) 100%);
}
.sp-products-inner { max-width: 1340px; margin: 0 auto; }
.sp-products-header { text-align: center; margin-bottom: 24px; }
.sp-products-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sos-green);
  margin-bottom: 6px;
}
.sp-products-label svg { width: 14px; height: 14px; stroke: var(--sos-green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-products-title {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sos-white);
  margin-bottom: 4px;
}
.sp-products-sub { font-size: 13px; color: rgba(255,255,255,0.5); }
.sp-products-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.sp-products-grid::-webkit-scrollbar { display: none; }
.sp-product-card {
  flex: 1 1 0;
  min-width: 280px;
  max-width: 420px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.25s;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  scroll-snap-align: start;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sp-product-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.sp-product-card-img-wrap {
  position: relative;
  width: 90px;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border-right: 1px solid rgba(255,255,255,0.08);
}
.sp-product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.sp-product-card:hover .sp-product-card-img { transform: scale(1.05); }
.sp-product-card-type {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sos-teal);
  color: var(--sos-white);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.sp-product-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.sp-product-card-name {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-product-card:hover .sp-product-card-name { color: var(--sos-green); }
.sp-product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sp-product-card-price {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.sp-product-card-price span { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 400; }
.sp-product-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sos-green);
  transition: gap 0.2s;
  white-space: nowrap;
}
.sp-product-card:hover .sp-product-card-cta {
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sp-product-card-cta svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- TOC Sidebar (right sticky) --- */
.sp-toc {
  width: 240px;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: 100px;
  padding-top: 48px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.sp-toc::-webkit-scrollbar {
  width: 3px;
}
.sp-toc::-webkit-scrollbar-thumb {
  background: var(--sos-border);
  border-radius: 3px;
}
.sp-toc-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  background: #eef4fb;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.sp-toc-cat:hover {
  background: #ddeaf7;
}
.sp-toc-cat svg {
  width: 16px;
  height: 16px;
  stroke: var(--sos-blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sp-toc-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.sp-toc-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sos-text-light);
  margin-bottom: 12px;
  padding-left: 12px;
}
.sp-toc-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-toc-nav li {
  margin: 0;
}
.sp-toc-nav li a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sos-text-light);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.sp-toc-nav li a:hover {
  color: var(--sos-blue);
  border-left-color: var(--sos-border);
}
.sp-toc-nav li a.sp-toc-active {
  color: var(--sos-blue);
  font-weight: 600;
  border-left-color: var(--sos-blue);
  background: rgba(43,108,176,0.06);
}

/* ===================================================================
   STICKY PRODUCT (sidebar gauche, sous les boutons partage)
   =================================================================== */
.sp-sticky-product {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--sos-border);
  width: 100%;
}
.sp-sticky-product-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--sos-card-bg);
  border: 1px solid var(--sos-border);
  border-radius: var(--sos-radius);
  text-decoration: none;
  color: var(--sos-text);
  transition: all 0.25s ease;
  box-shadow: var(--sos-shadow);
}
.sp-sticky-product-link:hover {
  box-shadow: var(--sos-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--sos-blue-light);
}
.sp-sticky-product-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.sp-sticky-product-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--sos-teal);
  background: rgba(91,168,160,0.1);
  padding: 3px 8px;
  border-radius: 20px;
}
.sp-sticky-product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-navy);
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-sticky-product-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--sos-green-dark);
}
.sp-sticky-product-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-blue-light);
  transition: gap 0.2s;
}
.sp-sticky-product-link:hover .sp-sticky-product-cta {
  color: var(--sos-blue);
}

/* ===================================================================
   PILLAR PAGE BANNER (dossier expert)
   =================================================================== */
.sp-pillar-banner {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}
.sp-pillar-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(30,58,138,0.04) 0%, rgba(59,125,216,0.06) 100%);
  border: 1px solid var(--sos-border, #E2E8F0);
  border-left: 4px solid var(--sos-teal, #5BA8A0);
  border-radius: var(--sos-radius, 12px);
  transition: all 0.2s;
}
.sp-pillar-banner-inner:hover {
  box-shadow: var(--sos-shadow-hover, 0 8px 24px rgba(0,0,0,0.1));
  border-left-color: var(--sos-blue, #3B7DD8);
}
.sp-pillar-banner-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91,168,160,0.12);
  border-radius: 10px;
}
.sp-pillar-banner-icon svg {
  width: 22px; height: 22px;
  stroke: var(--sos-teal, #5BA8A0);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sp-pillar-banner-content {
  flex: 1;
  min-width: 0;
}
.sp-pillar-banner-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sos-teal, #5BA8A0);
  margin-bottom: 4px;
}
.sp-pillar-banner-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sos-navy, #1e3a8a);
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 4px;
}
.sp-pillar-banner-title:hover {
  color: var(--sos-blue, #3B7DD8);
}
.sp-pillar-banner-desc {
  font-size: 0.85rem;
  color: var(--sos-text-light, #718096);
  line-height: 1.5;
  margin: 0;
}
.sp-pillar-banner-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sos-blue, #3B7DD8);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.2s;
}
.sp-pillar-banner-cta:hover { gap: 10px; }
.sp-pillar-banner-cta svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .sp-toc {
    display: none;
  }
  .sp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sp-products-grid { gap: 10px; }
  .sp-product-card { min-width: 250px; }
}

@media (max-width: 900px) {
  .sp-cta-banner-content {
    flex-direction: column;
  }
  .sp-cta-banner-img-wrap {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    border-right: none;
    border-bottom: 1px solid var(--sos-border);
    padding: 16px 0;
  }
  .sp-products { padding: 28px 16px 32px; }
  .sp-product-card { min-width: 230px; }
  .sp-product-card-img-wrap { width: 72px; }
  .sp-share-sticky {
    display: none;
  }
  .sp-share-mobile {
    display: flex;
    flex-wrap: wrap;
  }
  .sp-body {
    padding: 0 24px;
  }
  .sp-hero h1 {
    font-size: clamp(1.4rem, 5vw, 2rem) !important;
  }
  .sp-hero {
    min-height: 320px;
  }
  .sp-hero-content {
    padding: 40px 24px 36px;
  }
  .sp-nav-posts {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }
  .sp-nav-next {
    text-align: left;
  }
  .sp-nav-next .sp-nav-post-label {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .sp-pillar-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
  }
  .sp-pillar-banner-icon { display: none; }
  .sp-pillar-banner-cta { align-self: flex-start; }
  .sp-cta-banner-img-wrap {
    max-width: 160px;
  }
  .sp-cta-banner-body {
    padding: 20px;
  }
  .sp-cta-banner-title {
    font-size: 16px;
  }
  .sp-cta-banner-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sp-cta-banner-btn {
    width: 100%;
    justify-content: center;
  }
  .sp-cta-banner-top {
    padding: 12px 20px;
  }
  .sp-products { padding: 24px 12px 28px; }
  .sp-products-title { font-size: 1.1rem; }
  .sp-product-card { min-width: 210px; }
  .sp-product-card-img-wrap { width: 64px; }
  .sp-product-card-name { font-size: 12px; }
  .sp-product-card-price { font-size: 14px; }
  .sp-hero {
    min-height: 260px;
  }
  .sp-hero-content {
    padding: 32px 16px 28px;
  }
  .sp-hero-meta {
    gap: 12px;
    font-size: 14px;
  }
  .sp-content {
    padding: 24px 0 40px;
  }
  .sp-content h2 {
    font-size: 1.25rem;
    margin: 36px 0 12px;
  }
  .sp-content h3 {
    font-size: 1.05rem;
  }
  .sp-content p,
  .sp-content ul,
  .sp-content ol {
    font-size: 1rem;
    line-height: 1.75;
  }
  .sp-body {
    padding: 0 16px;
  }
  .sp-related {
    padding: 40px 16px 48px;
  }
  .sp-related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .sp-related-card-img,
  .sp-related-card-img-placeholder {
    height: 160px;
  }
  .sp-nav-posts {
    padding: 0 16px;
  }
}

@media (max-width: 380px) {
  .sp-hero h1 {
    font-size: 1.3rem !important;
  }
  .sp-breadcrumb {
    font-size: 14px;
  }
}

@media print {
  .sp-share-sticky,
  .sp-share-mobile,
  .sp-toc,
  .sp-related,
  .sp-nav-posts {
    display: none !important;
  }
  .sp-hero {
    min-height: auto;
    break-inside: avoid;
  }
  .sp-content {
    max-width: 100%;
  }
}

/* ===================================================================
   BANNIERE IDEC 360 — sous le hero
   =================================================================== */
.sp-idec-banner {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-bottom: 24px !important;
  background: linear-gradient(135deg, #0c1f4a 0%, #1e3a8a 35%, #2B6CB0 70%, #3B7DD8 100%);
  position: relative;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

/* Animated shine sweep */
.sp-idec-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 45%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 55%, transparent 100%);
  transform: rotate(25deg);
  animation: sp-idec-shine 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes sp-idec-shine {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

/* Decorative dots pattern */
.sp-idec-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.sp-idec-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 32px;
  position: relative;
  z-index: 2;
}

/* Cover image */
.sp-idec-cover {
  flex: 0 0 auto;
  position: relative;
}
.sp-idec-cover img {
  width: 90px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(59,125,216,0.3);
  transition: transform 0.3s ease;
}
.sp-idec-cover:hover img {
  transform: scale(1.06) rotate(-1deg);
}

/* "Best-seller" floating badge */
.sp-idec-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #f59e0b;
  color: #1a1a1a;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
  z-index: 3;
  animation: sp-idec-pulse 2s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes sp-idec-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Text content */
.sp-idec-text {
  flex: 1;
  min-width: 0;
}
.sp-idec-title {
  font-family: 'Open Sans', -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-idec-title em {
  font-style: normal;
  color: #7de8ff;
}
.sp-idec-subtitle {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.4;
}
.sp-idec-subtitle strong {
  color: #7BC143;
}

/* Price tag */
.sp-idec-price {
  flex: 0 0 auto;
  text-align: center;
  padding: 0 16px;
  border-left: 1px solid rgba(255,255,255,0.15);
  border-right: 1px solid rgba(255,255,255,0.15);
}
.sp-idec-price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #7BC143;
  line-height: 1;
  margin: 0 0 2px;
}
.sp-idec-price-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* CTA button */
.sp-idec-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7BC143 0%, #5ca63a 100%);
  color: #ffffff !important;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(123,193,67,0.35);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.sp-idec-cta:hover {
  background: linear-gradient(135deg, #6eb33a 0%, #4d8f2e 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123,193,67,0.5);
  color: #ffffff !important;
}
.sp-idec-cta::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.sp-idec-cta:hover::after {
  left: 100%;
}
.sp-idec-cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Close button */
.sp-idec-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  z-index: 3;
  transition: color 0.2s;
}
.sp-idec-close:hover { color: rgba(255,255,255,0.7); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sp-idec-inner {
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 20px;
    justify-content: center;
    text-align: center;
  }
  .sp-idec-text { flex: 1 1 calc(100% - 110px); text-align: left; }
  .sp-idec-title { font-size: 0.95rem; justify-content: flex-start; }
  .sp-idec-price {
    border-left: none; border-right: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 10px 0 0;
    display: flex; align-items: center; gap: 10px;
    width: 100%; justify-content: center;
  }
  .sp-idec-cta { width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
  .sp-idec-inner { padding: 14px 16px; gap: 12px; }
  .sp-idec-cover img { width: 70px; }
  .sp-idec-title { font-size: 0.85rem; flex-wrap: wrap; }
  .sp-idec-subtitle { font-size: 0.72rem; }
  .sp-idec-price-amount { font-size: 1.2rem; }
  .sp-idec-cta { font-size: 0.8rem; padding: 10px 22px; }
}

@media print {
  .sp-idec-banner { display: none !important; }
}

/* WordPress full-width override */
.entry-content > .wp-block-html:has(.sp-hero),
.entry-content > .wp-block-html:has(.sp-article-wrapper),
.entry-content > .wp-block-html:has(.sp-idec-banner),
.entry-content > div:has(.sp-hero) {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --- Pages piliers : marges quick-actions sous le hero --- */
div[class$="-quick-actions"] {
  margin-top: 12px !important;
  margin-bottom: 32px !important;
}
