/* Posturise Blog — plugin CSS
   Depends on posturise-ds (tokens.css + posturise.css) loaded by the theme. */

/* ================================================================
   ARTICLE CARDS
   ================================================================ */
.post {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base), box-shadow var(--duration-base);
}
.post:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.post:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.post__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}
.post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}
.post__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
.post__excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
}
.post__foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}
.post__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--link);
}

/* Category pill */
.cat {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

/* Filter chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast);
}
.chip:hover {
  background: var(--surface-soft);
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Popular tags */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.tag:hover {
  background: var(--primary-soft);
}

/* ================================================================
   MEDIA SLOT (video or photo)
   ================================================================ */
.media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16/10;
  padding: 22px 28px;
  box-sizing: border-box;
  overflow: hidden;
}
.media--photo {
  background: var(--surface-soft);
  color: var(--ink-muted);
  padding: 0;
}
.media--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post:hover .media--photo img {
  transform: scale(1.03);
}
.media--vid {
  background: var(--surface-deep);
  color: var(--on-deep);
  padding: 16px;
}
.vframe {
  display: block;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  background: #0e110e;
}
.vtag {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(14,17,14,.55);
  color: #f1f4ec;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.vtag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Placeholder (no image) */
.pblog-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--ink-muted);
  opacity: .25;
}

/* ================================================================
   DOORS (symptom entry points)
   ================================================================ */
.door {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border);
}
.door__title {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
.door__cause {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
}
.door__list {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.door__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 2px;
}
.door__link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.door__link:hover {
  background: var(--primary-soft);
  color: var(--ink);
}
.door__link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.door__time {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Icon circle */
.ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--ink);
}
.ico svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================================================
   SEARCH BAR
   ================================================================ */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  min-height: 60px;
  padding: 6px 6px 6px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--primary-soft);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.search input::placeholder {
  color: var(--ink-muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ================================================================
   TRIO VIDEO GRID (essentiel section)
   ================================================================ */
.trio {
  position: relative;
  display: grid;
  grid-template-columns: 12.8fr 9fr 9fr;
  gap: 12px;
  align-items: end;
  width: 100%;
}
.vtrio {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #0e110e;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
}

/* ================================================================
   TABLE (essentiel angles)
   ================================================================ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.tbl th {
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tbl tr:last-child td {
  border-bottom: 0;
}

/* Pin badge (numbered circle) */
.pin {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 800;
}

/* ================================================================
   NEWSLETTER BACKGROUND
   ================================================================ */
.nl-bg {
  background-size: cover;
  background-position: center;
}

/* Deep field (newsletter email) */
.field-deep {
  flex: 1 1 240px;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--on-deep) 45%, transparent);
  background: color-mix(in srgb, var(--on-deep) 8%, transparent);
  color: var(--on-deep);
  font: inherit;
  font-size: 16px;
}
.field-deep::placeholder {
  color: color-mix(in srgb, var(--on-deep) 75%, transparent);
}
.field-deep:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ================================================================
   BLOG GRID & CHIPS (shortcode layout)
   ================================================================ */
.pblog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 24px;
}
.pblog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pblog-count {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ================================================================
   ARTICLE TYPOGRAPHY (single post)
   ================================================================ */
.article-header { padding-bottom: 0 !important; }
.article-header .wp-block-post-title { margin-bottom: 16px; }
.article-meta { align-items: center; }
.article-meta .reading-time { position: relative; padding-left: 16px; }
.article-meta .reading-time::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-muted);
  opacity: .5;
}
.article-body { padding-top: 40px !important; padding-bottom: 48px !important; }
.article-body h1 { display: none; }
.article-body h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 56px !important;
  margin-bottom: 20px !important;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0 !important; }
.article-body h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-top: 40px !important;
  margin-bottom: 14px !important;
}
.article-body h4 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px !important;
  margin-bottom: 10px !important;
}
.article-body p {
  font-size: 17px;
  line-height: 1.72;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  color: var(--ink-muted);
}
.article-body p strong { color: var(--ink); }
.article-body p a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.article-body p a:hover { text-decoration-color: var(--ink); }
.article-body ul, .article-body ol {
  margin-top: 0 !important;
  margin-bottom: 24px !important;
  padding-left: 24px;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.72;
}
.article-body li { margin-bottom: 8px; }
.article-body li strong { color: var(--ink); }
.article-body em { color: var(--ink-muted); }
.article-body blockquote {
  margin: 32px 0 !important;
  padding: 20px 24px;
  border-left: 4px solid var(--primary);
  background: var(--surface-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-body blockquote p { color: var(--ink); font-size: 17px; margin-bottom: 0 !important; }
.article-body .wp-block-group.callout-tip {
  margin: 32px 0;
  padding: 24px;
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: var(--radius-lg);
}
.article-body .wp-block-group.callout-tip p { color: var(--ink); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 760px) {
  .pblog-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    margin: 0 -24px;
    padding: 4px 24px 8px;
    scrollbar-width: none;
  }
  .pblog-chips::-webkit-scrollbar { display: none; }
  .pblog-chips .chip { flex: 0 0 auto; }
  .pblog-grid { grid-template-columns: 1fr; }
  .article-body h2 { font-size: 24px; margin-top: 44px !important; padding-top: 24px; }
  .article-body h3 { font-size: 19px; margin-top: 32px !important; }
  .article-body p, .article-body ul, .article-body ol { font-size: 16px; }
  .tbl th:nth-child(2), .tbl td:nth-child(2) { display: none; }
}

@media (max-width: 420px) {
  .pblog-chips { margin: 0 -16px; padding: 4px 16px 8px; }
  .search .p-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .post { transition: none; }
  .media--photo img { transition: none; }
}
