/* Hub /taille/ (category-taille.php). Chargé seulement sur is_category('taille'). */
.ht {
  --ht-petit: #D4931A;
  --ht-moyen: #6FB08A;
  --ht-grand: var(--green-mid);
  --ht-geant: #163D27;
  --ht-hero-muted: rgba(255, 255, 255, .72);
  --ht-hero-accent: #8FD3AC;
  --ht-hero-card: rgba(255, 255, 255, .07);
  --ht-hero-line: rgba(255, 255, 255, .14);
}
.ht-c-petit { background: var(--ht-petit); fill: var(--ht-petit); }
.ht-c-moyen { background: var(--ht-moyen); fill: var(--ht-moyen); }
.ht-c-grand { background: var(--ht-grand); fill: var(--ht-grand); }
.ht-c-geant { background: var(--ht-geant); fill: var(--ht-geant); }

.ht-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.ht [id] { scroll-margin-top: 88px; }
.ht h2 em, .ht h1 em { font-style: italic; color: var(--green-mid); }

/* ── Hero ── */
.ht-hero { background: var(--dark); color: var(--white); padding: 32px 0 28px; }
.ht-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ht-hero-accent); margin-bottom: 10px; }
.ht-hero h1 { font-size: 2.6rem; font-weight: 700; margin-bottom: 12px; color: var(--white); text-wrap: balance; }
.ht-hero h1 em { color: var(--ht-hero-accent); }
.ht-lead { color: var(--ht-hero-muted); max-width: 680px; font-size: 1.02rem; line-height: 1.65; }
.ht-lead strong { color: var(--white); font-weight: 600; }
.ht-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; max-width: 680px; }
.ht-kpi { background: var(--ht-hero-card); border: 1px solid var(--ht-hero-line); border-radius: var(--radius-sm); padding: 12px 12px 10px; }
.ht-kpi b { display: block; font-family: 'Fraunces', serif; font-size: 1.7rem; line-height: 1.05; color: var(--white); }
.ht-kpi span { display: block; font-size: .76rem; color: var(--ht-hero-muted); line-height: 1.35; margin-top: 4px; }

/* ── Sections ── */
.ht-sec { padding: 36px 0; }
.ht-sec-tight { padding-top: 8px; }
.ht-h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; text-wrap: balance; }
.ht-sec-lead { color: var(--muted); max-width: 720px; margin-bottom: 18px; font-size: .96rem; line-height: 1.65; }
.ht-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.ht-note { font-size: .8rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ── Pastilles + histogramme à points ── */
.ht-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ht-pill { display: flex; flex-direction: column; gap: 2px; position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px 10px 26px; color: var(--text); transition: border-color .15s, background .15s; }
.ht-pill:hover { text-decoration: none; border-color: var(--green-mid); background: var(--green-pale); }
.ht-pill i { position: absolute; left: 11px; top: 15px; width: 9px; height: 9px; border-radius: 50%; }
.ht-pill-n { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.ht-pill-s { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.ht-dots { width: 100%; height: auto; display: block; }
.ht-only-m { display: none !important; }
.ht-dots-thr { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ht-dots-thr-l { font-size: 12px; fill: var(--muted); font-family: 'Inter', sans-serif; font-weight: 600; }
.ht-axis { stroke: var(--border); stroke-width: 1.5; }
.ht-tick { font-size: 12px; fill: var(--muted); font-family: 'Inter', sans-serif; }
.ht-pt { stroke: var(--white); stroke-width: 1.5; }
.ht-pt:hover { stroke: var(--text); stroke-width: 2; }
.ht-pt-link { cursor: pointer; }
.ht-pt-link:focus { outline: none; }
.ht-pt-link:focus .ht-pt, .ht-pt-link:hover .ht-pt { stroke: var(--text); stroke-width: 2; }
.ht-card { position: relative; }
.ht-tip {
  position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 8px));
  background: var(--dark); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; text-decoration: none;
  pointer-events: none; opacity: 0; transition: opacity .12s;
}
.ht-tip.is-on { opacity: 1; }
@media (hover: none) { .ht-tip.is-on { pointer-events: auto; padding: 10px 12px; } .ht-tip::after { content: ' →'; } }

/* ── Onglets + barres min-max ── */
.ht-tabs { display: none; gap: 6px; margin-bottom: 14px; }
.ht-js .ht-tabs { display: flex; }
.ht-tab { flex: 1 1 0; min-width: 0; font: 600 .88rem 'Inter', sans-serif; color: var(--muted); background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.ht-tab span { font-weight: 400; opacity: .75; margin-left: 4px; }
.ht-tab[aria-selected="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.ht-tab:focus-visible { outline: 2px solid var(--green-mid); outline-offset: 2px; }
.ht-panel + .ht-panel { margin-top: 28px; }
.ht-js .ht-panel { margin-top: 0; }
.ht-js .ht-panel:not(.is-active) { display: none; }
.ht-panel-h { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.ht-panel-h span { font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 400; color: var(--muted); }
.ht-bars-scale, .ht-bar-row { display: grid; grid-template-columns: minmax(0, 11rem) 4.8rem minmax(0, 1fr); align-items: center; column-gap: 10px; }
.ht-bars-axis { position: relative; height: 18px; font-size: .75rem; color: var(--muted); grid-column: 3; }
.ht-bars-axis span { position: absolute; top: 0; transform: translateX(-50%); line-height: 18px; }
.ht-bars-axis span:first-child { transform: none; }
.ht-bars-axis span:last-child { transform: translateX(-100%); }
.ht-bars { list-style: none; margin: 0; padding: 0; }
.ht-bar-row { padding: 5px 0; border-bottom: 1px solid var(--green-pale); }
.ht-bar-row:last-child { border-bottom: 0; }
.ht-bar-name { font-size: .88rem; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-bar-val { font-size: .78rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ht-bar-track { position: relative; height: 20px; background: linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / var(--ht-step) 100% repeat-x; }
.ht-bar-track b { position: absolute; top: 6px; height: 8px; border-radius: 4px; background: var(--ht-bar, var(--green-mid)); }
.ht-bar-track em { position: absolute; top: 8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--white); }
.ht-p-petit { --ht-bar: var(--ht-petit); }
.ht-p-moyen { --ht-bar: var(--ht-moyen); }
.ht-p-grand { --ht-bar: var(--ht-grand); }
.ht-p-geant { --ht-bar: var(--ht-geant); }
.ht-js .ht-panel:not(.is-open) .ht-bar-more { display: none; }
.ht-bar-toggle { display: none; margin-top: 12px; width: 100%; font: 600 .88rem 'Inter', sans-serif; color: var(--green); background: var(--green-light); border: 0; border-radius: var(--radius-sm); padding: 11px; cursor: pointer; }
.ht-js .ht-bar-toggle { display: block; }
.ht-bar-toggle:hover { background: var(--green-hover); }

/* ── Palmarès ── */
.ht-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ht-duo-h { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.ht-duo-sub { font-size: .82rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.ht-podium { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.ht-podium-item { display: grid; grid-template-columns: 22px 48px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); }
.ht-podium-item:hover { background: var(--green-pale); text-decoration: none; }
.ht-podium-rank { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.05rem; text-align: center; }
.ht-podium-small .ht-podium-rank { color: var(--amber); }
.ht-podium-big .ht-podium-rank { color: var(--ht-geant); }
.ht-podium-item img, .ht-podium-ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-light); background: var(--green-pale); }
.ht-podium-txt strong { display: block; font-size: .95rem; font-weight: 600; line-height: 1.25; }
.ht-podium-txt span { font-size: .8rem; color: var(--muted); }

/* ── Renvoi espérance de vie ── */
.ht-life { margin-top: 18px; background: var(--green-light); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem; line-height: 1.6; }
.ht-life a { font-weight: 600; white-space: nowrap; }
.ht-life a::after { content: ' \2192'; }

/* ── Texte + FAQ ── */
.ht-prose { max-width: 720px; }
.ht-prose .ht-h2 { margin-bottom: 14px; }
.ht-prose h3 { font-size: 1.25rem; font-weight: 700; margin: 24px 0 8px; }
.ht-prose p { margin-bottom: 12px; line-height: 1.7; }
.ht-callout { background: var(--amber-light); border-left: 3px solid var(--amber); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 14px; font-size: .92rem; margin: 16px 0; line-height: 1.6; }
.ht-faq-h { margin-top: 28px; }
.ht-faq { max-width: 720px; margin-top: 12px; }
.ht-faq .sante-faq-a p { margin: 0; }

/* ── Tableau ── */
.ht-tbl-tools { display: none; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ht-js .ht-tbl-tools { display: flex; }
.ht-tbl-tools input { flex: 1 1 220px; min-width: 0; font: 16px 'Inter', sans-serif; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--text); }
.ht-tbl-tools input:focus { outline: 2px solid var(--green-mid); outline-offset: 1px; }
.ht-tbl-count { font-size: .82rem; color: var(--muted); }
.ht-tbl-box { max-height: 560px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); }
.ht-table { border-collapse: collapse; width: 100%; font-size: .88rem; table-layout: auto; }
.ht-table th, .ht-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ht-table td { white-space: nowrap; }
.ht-table td:first-child { white-space: normal; }
.ht-table .ht-num { text-align: right; font-variant-numeric: tabular-nums; }
.ht-table td small { color: var(--muted); font-size: .75rem; }
.ht-table thead th { position: sticky; top: 0; z-index: 1; background: var(--green-light); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--green); padding: 0; }
.ht-table thead button { all: unset; display: block; box-sizing: border-box; width: 100%; padding: 10px; cursor: pointer; text-align: inherit; }
.ht-table thead button:focus-visible { outline: 2px solid var(--green-mid); outline-offset: -2px; }
.ht-table thead th[aria-sort] button::after { content: ' \2195'; opacity: .35; }
.ht-table thead th[aria-sort="ascending"] button::after { content: ' \2191'; opacity: 1; }
.ht-table thead th[aria-sort="descending"] button::after { content: ' \2193'; opacity: 1; }
.ht-table tbody tr:hover { background: var(--green-pale); }
.ht-gdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

@media (max-width: 900px) {
  .ht-wrap { padding: 0 20px; }
  .ht-duo { grid-template-columns: minmax(0, 1fr); }
  .ht-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ht-only-m { display: block !important; }
  .ht-only-d { display: none !important; }
  .ht-hero { padding: 24px 0 22px; }
  .ht-hero h1 { font-size: 2rem; }
  .ht-lead { font-size: .95rem; }
  .ht-kpis { gap: 8px; margin-top: 18px; }
  .ht-kpi { padding: 10px 9px 9px; }
  .ht-kpi b { font-size: 1.35rem; }
  .ht-kpi span { font-size: .75rem; }
  .ht-sec { padding: 28px 0; }
  .ht-sec-tight { padding-top: 8px; }
  .ht-h2 { font-size: 1.5rem; }
  .ht-pills { gap: 8px; }
  .ht-pill { padding: 8px 10px 8px 24px; }
  .ht-pill i { left: 10px; top: 13px; }
  .ht-card { padding: 14px; }
  .ht-js .ht-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ht-tab { padding: 6px 2px; font-size: .82rem; border-radius: var(--radius-sm); line-height: 1.2; }
  .ht-tab span { display: block; font-size: .75rem; margin: 1px 0 0; }
  .ht-bars-scale, .ht-bar-row { grid-template-columns: minmax(0, 7.4rem) minmax(0, 1fr); column-gap: 10px; }
  .ht-bars-axis { grid-column: 2; }
  .ht-bar-row { grid-template-areas: "name track" "val track"; padding: 4px 0; }
  .ht-bar-name { grid-area: name; font-size: .84rem; padding: 9px 0; margin: -9px 0; }
  .ht-bar-val { grid-area: val; text-align: left; font-size: .75rem; line-height: 1.2; }
  .ht-bar-track { grid-area: track; height: 30px; }
  .ht-bar-track b { top: 11px; }
  .ht-bar-track em { top: 13px; }
  .ht-duo { gap: 12px; }
  .ht-podium { gap: 2px; }
  .ht-podium-item { grid-template-columns: 18px 40px minmax(0, 1fr); padding: 4px 6px; }
  .ht-podium-item img, .ht-podium-ph { width: 40px; height: 40px; }
  .ht-podium-txt strong { font-size: .9rem; }
  .ht-duo-sub { margin-bottom: 8px; }
}

@media (max-width: 600px) {
  .ht-table .ht-hide-s { display: none; }
  .ht-table th, .ht-table td { padding: 8px; }
  .ht-table thead button { padding: 10px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ht *, .ht *::before, .ht *::after { transition: none !important; }
}
