/* ==========================================================================
   Hypp agency — Blog (.hypp-blog)
   Chargé par functions.php uniquement sur les articles, après style.css
   (variables, base et composants partagés). Ne pas utiliser seul.
   ========================================================================== */

body.hypp-blog-page {
  background: oklch(99% 0.003 150);
}

/* ==========================================================================
   B01 — Blog : base du modèle d'article
   ========================================================================== */

.hypp-blog a {
  color: var(--accent);
  text-decoration: none;
}

.hypp-blog a:hover {
  text-decoration: underline;
}

.hypp-blog :is(.pill, .wp-block-button__link):hover {
  text-decoration: none;
}

.hypp-blog h1,
.hypp-blog h2,
.hypp-blog h3,
.hypp-blog h4 {
  color: inherit;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.hypp-blog .col {
  width: 100%;
  max-width: 690px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hypp-blog .wide {
  max-width: 642px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hypp-skip {
  position: absolute;
  left: -10000px;
}

.hypp-skip:focus {
  top: 50px;
  left: 16px;
  z-index: 100;
  padding: 12px;
  background: #fff;
}

/* ==========================================================================
   B02 — Blog : navigation (base partagée en 01)
   ========================================================================== */

.hypp-blog .gnav {
  border-bottom: 1px solid var(--line);
}

.hypp-blog .gnav nav {
  min-height: 48px;
}

.hypp-blog .logo i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.hypp-blog .links {
  display: flex;
  gap: 30px;
}

.hypp-blog .links a {
  color: var(--ink);
  font-size: 13px;
}

.hypp-blog .links a[aria-current="page"] {
  font-weight: 600;
}

/* ==========================================================================
   B03 — Blog : en-tête, catégories et partage
   ========================================================================== */

/* Neutralise aussi le style d'article Astra. */
.hypp-blog .art {
  display: block;
  margin: 0;
  padding: 56px 0 0;
  border: 0;
  background: var(--bg);
}

.hypp-blog .crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 13px;
}

.hypp-blog .crumb a {
  color: var(--ink-soft);
}

.hypp-blog .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.hypp-blog .cat {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hypp-blog .date {
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.hypp-blog .art h1 {
  margin: 0 0 22px;
  font-size: clamp(36px, 4.6vw, 52px);
  overflow-wrap: anywhere;
}

.hypp-blog .sub {
  margin: 0 0 30px;
  font-size: clamp(19px, 1.9vw, 22px);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.4;
}

.hypp-blog .share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 44px;
}

.hypp-blog .share a,
.hypp-blog .share button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gray);
  color: var(--ink);
  cursor: pointer;
}

.hypp-blog .share a:hover,
.hypp-blog .share button:hover {
  background: var(--line);
  text-decoration: none;
}

.hypp-blog .share svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hypp-blog .share .rt {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 13px;
}

.hypp-blog .hypp-share-status {
  color: var(--accent);
  font-size: 12px;
}

/* ==========================================================================
   B04 — Blog : image principale et contenu Gutenberg
   ========================================================================== */

.hypp-blog .hero {
  margin-block: 0 56px;
}

.hypp-blog .hero .vis {
  display: block;
  width: 100%;
  height: clamp(300px, 52vw, 620px);
  border-radius: 22px;
  object-fit: cover;
}

.hypp-blog figcaption {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.hypp-blog .article-content {
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hypp-blog .article-content > * {
  max-width: 642px;
  margin-left: auto;
  margin-right: auto;
}

.hypp-blog .article-content > .alignwide {
  max-width: 952px;
}

.hypp-blog .article-content > .alignfull {
  max-width: none;
}

.hypp-blog .article-content p {
  margin-bottom: 26px;
  font-size: 19px;
  letter-spacing: -.012em;
  line-height: 1.6;
}

.hypp-blog .article-content h2 {
  margin-top: 54px;
  margin-bottom: 18px;
  font-size: clamp(26px, 2.6vw, 32px);
}

.hypp-blog .article-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
  font-size: 25px;
}

.hypp-blog .article-content > h3 {
  margin-inline: auto;
  margin-bottom: 20px;
}

.hypp-blog .article-content h4 {
  margin-top: 30px;
  margin-bottom: 14px;
  font-size: 22px;
}

.hypp-blog .article-content :is(h2, h3)[id] {
  scroll-margin-top: 130px;
}

.hypp-blog .article-content ul,
.hypp-blog .article-content ol {
  margin-bottom: 28px;
  padding-left: 22px;
}

.hypp-blog .article-content li {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.55;
}

.hypp-blog .article-content li::marker {
  color: var(--accent);
}

.hypp-blog .article-content strong {
  font-weight: 600;
}

.hypp-blog .article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

.hypp-blog .article-content figure {
  margin-top: 36px;
  margin-bottom: 56px;
}

.hypp-blog .article-content blockquote {
  margin-block: 46px 50px;
  padding: 0;
  border: 0;
}

.hypp-blog .article-content blockquote p {
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.25;
}

.hypp-blog .article-content blockquote cite {
  color: var(--ink-soft);
  font-size: 15px;
  font-style: normal;
}

.hypp-blog .article-content .wp-block-table {
  overflow-x: auto;
}

.hypp-blog .article-content pre {
  padding: 20px;
  border-radius: 12px;
  background: var(--gray);
  overflow-x: auto;
}

.hypp-blog .article-content iframe,
.hypp-blog .article-content video {
  max-width: 100%;
}

.hypp-blog .article-content .wp-block-button__link {
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
}

.hypp-blog .keyfig {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 10px 56px;
  border-block: 1px solid var(--line);
}

.hypp-blog .keyfig > div {
  padding: 28px 18px 28px 0;
}

.hypp-blog .keyfig b {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -.05em;
  line-height: 1;
}

.hypp-blog .keyfig span {
  color: var(--ink-soft);
  font-size: 14px;
}

.hypp-blog .inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-block: 20px 60px;
  padding: 36px;
  border-radius: 22px;
  background: var(--dark);
  color: #fff;
}

.hypp-blog .inline-cta h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.hypp-blog .inline-cta p {
  margin: 0;
  color: var(--on-dark-soft);
  font-size: 16px;
}

.hypp-blog .duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ==========================================================================
   B05 — Blog : sommaire automatique H2 / H3 (après le contenu : surcharge ul)
   ========================================================================== */

.hypp-blog .hypp-toc {
  margin-bottom: 44px;
}

.hypp-blog .hypp-toc[hidden] {
  display: none;
}

.hypp-blog .hypp-toc-box {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--gray);
}

.hypp-blog .hypp-toc-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
}

.hypp-blog .hypp-toc-list,
.hypp-blog .hypp-toc-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hypp-blog .hypp-toc-list li + li {
  margin-top: 10px;
}

.hypp-blog .hypp-toc-list a {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.hypp-blog .hypp-toc-list ul {
  margin: 8px 0 14px;
  padding-left: 18px;
  border-left: 2px solid var(--line);
}

.hypp-blog .hypp-toc-list ul a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 400;
}

/* ==========================================================================
   B06 — Blog : étiquettes, auteur et articles liés
   ========================================================================== */

.hypp-blog .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 30px;
  border-top: 1px solid var(--line);
}

.hypp-blog .tags a {
  padding: 7px 14px;
  border-radius: 980px;
  background: var(--gray);
  color: var(--ink);
  font-size: 13px;
}

.hypp-blog .author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 30px 70px;
  border-top: 1px solid var(--line);
}

.hypp-blog .author img {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.hypp-blog .author .hypp-author-avatar {
  display: block;
  flex-shrink: 0;
}

.hypp-blog .author .hypp-author-avatar img {
  display: block;
}

.hypp-blog .author b {
  display: block;
  font-size: 16px;
}

.hypp-blog .author b a {
  color: var(--ink);
}

.hypp-blog .author span {
  color: var(--ink-soft);
  font-size: 14px;
}

.hypp-blog .author .hypp-author-job {
  display: block;
  margin-top: 4px;
}

.hypp-blog .related {
  padding-block: 90px 110px;
  background: var(--gray);
}

.hypp-blog .posts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.hypp-blog .posts-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
}

.hypp-blog .posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}

/* Couleurs : --hypp-bg / --hypp-fg / --hypp-fg-soft, définies en ligne par les options de la carte
   (template-parts/post-card.php) ; repli sur la palette. */
.hypp-blog .post {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--hypp-fg, var(--ink));
}

.hypp-blog .post:hover {
  color: var(--hypp-fg, var(--ink));
  text-decoration: none;
}

/* Avec un fond, la carte devient un encadré ; le texte se décolle des bords. */
.hypp-blog .post.hypp-has-bg {
  padding: 10px 10px 22px;
  border-radius: 26px;
  background: var(--hypp-bg);
}

.hypp-blog .post.hypp-has-bg > :not(.vis) {
  padding-inline: 10px;
}

.hypp-blog .post .vis {
  width: 100%;
  height: 340px;
  border-radius: 20px;
  object-fit: cover;
}

.hypp-blog .post .tag {
  color: var(--hypp-fg, var(--accent));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Carte sans image à la une : garde l'alignement de la grille. */
.hypp-blog .post .vis--empty {
  display: block;
  background: var(--accent-soft);
}

.hypp-blog .post h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.hypp-blog .post p {
  margin: 0;
  color: var(--hypp-fg-soft, var(--ink-soft));
  font-size: 15px;
}

.hypp-blog .meta {
  color: var(--ink-soft);
  font-size: 13px;
}

.hypp-blog .post .meta {
  display: flex;
  color: var(--hypp-fg-soft, var(--ink-soft));
  flex-wrap: wrap;
  gap: 4px 10px;
}

.hypp-blog .hypp-comments {
  padding-block: 40px;
}

.hypp-blog .hypp-page-links {
  padding-block: 20px;
}

/* ==========================================================================
   B07 — Blog : responsive (pied de page et barre d'admin : voir 01)
   ========================================================================== */

@media (min-width: 768px) {

  .hypp-blog .wide {
    padding-inline: 0;
  }
}

@media (max-width: 900px) {

  .hypp-blog .posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .hypp-blog .duo,
  .hypp-blog .keyfig {
    grid-template-columns: 1fr;
  }

  .hypp-blog .keyfig > div {
    padding-block: 20px;
  }
}

@media (max-width: 600px) {

  .hypp-blog .gnav nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
  }

  .hypp-blog .gnav .links {
    gap: 16px;
  }

  .hypp-blog .art {
    padding-top: 36px;
  }

  .hypp-blog .hypp-toc-box {
    padding: 22px 20px;
  }

  .hypp-blog .article-content :is(h2, h3)[id] {
    scroll-margin-top: 160px;
  }

  .hypp-blog .posts {
    grid-template-columns: 1fr;
  }

  .hypp-blog .related {
    padding-block: 56px;
  }
}
