/* =========================================================
   Ktkarena — Centre d'aide / Index de catégorie (gabarit figé)
   Page de catégorie : hero charbon + populaires (crème) +
   liste complète (charbon) + bloc ressources (vert KTK).
   Charge APRÈS colors_and_type.css + page-base.css.
   ========================================================= */

body.aide-cat-body {
  background: var(--charbon-profond);
  color: var(--fg-on-dark);
}

/* Mount-points React neutralisés (sticky-friendly) */
body.aide-cat-body > #header-root,
body.aide-cat-body > #footer-root { display: contents; }

/* Header sticky translucide — clair sur fond charbon (qui sera dark
   au scroll comme partout) : on garde le comportement du Header.jsx. */
body.aide-cat-body .ktk-header {
  background: transparent;
}

/* ---------- 1. FIL D'ARIANE ---------- */
.aide-cat-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.60);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.aide-cat-breadcrumb a {
  color: rgba(244, 239, 230, 0.60);
  text-decoration: none;
  transition: color 180ms ease;
}
.aide-cat-breadcrumb a:hover { color: var(--fg-on-dark); }
.aide-cat-breadcrumb .sep { color: rgba(244, 239, 230, 0.30); }
.aide-cat-breadcrumb .current {
  color: var(--fg-on-dark);
  font-weight: 500;
}

/* ---------- 2. HEADER CATÉGORIE (charbon, ~50vh) ---------- */
.aide-cat-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}
.aide-cat-hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: 460px;
}
.aide-cat-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signature);
  font-weight: 600;
}
.aide-cat-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 5.2vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--fg-on-dark);
  margin: 18px 0 22px;
  max-width: 16ch;
  text-wrap: balance;
}
.aide-cat-hero__title .accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--signature);
  letter-spacing: -0.01em;
}
.aide-cat-hero__subtitle {
  font-size: 20px;
  line-height: 1.55;
  color: var(--fg-on-dark-muted);
  max-width: 52ch;
  margin: 0 0 32px;
}
.aide-cat-hero__stats {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.60);
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px; /* respiration entre lignes quand les stats passent à la ligne (mobile) */
}
.aide-cat-hero__stats > span:not(:last-child)::after {
  content: '·';
  margin: 0 12px;
  color: rgba(244, 239, 230, 0.30);
}

/* Visuel droite — composition KTK abstraite */
.aide-cat-hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin-left: auto;
  width: 100%;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(212, 255, 63, 0.08) 0%, transparent 60%),
    var(--charbon-doux);
  border: 1px solid var(--hairline-on-dark);
  overflow: hidden;
}
.aide-cat-hero__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 239, 230, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
  pointer-events: none;
}
.aide-cat-hero__viz-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.aide-cat-hero__viz-label {
  position: absolute;
  bottom: 18px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.50);
}

@media (max-width: 980px) {
  .aide-cat-hero { padding: 40px 24px 64px; }
  .aide-cat-hero__grid { grid-template-columns: 1fr; gap: 48px; min-height: 0; }
  .aide-cat-hero__visual { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .aide-cat-breadcrumb { padding: 24px 20px 0; font-size: 10px; }
  .aide-cat-hero { padding: 32px 20px 56px; }
  /* 44px à 720px (identique à avant), réduit progressivement jusqu'à 32px à 320px */
  .aide-cat-hero__title { font-size: clamp(32px, 9.5vw, 44px); }
  .aide-cat-hero__subtitle { font-size: 17px; }
}

/* ---------- 3. ARTICLES POPULAIRES (crème, rounded top) ---------- */
.aide-cat-popular {
  background: var(--creme-editorial);
  color: var(--fg-on-light);
  border-top-left-radius: 48px;
  border-top-right-radius: 48px;
  padding: 96px 32px 64px;
}
.aide-cat-popular__inner {
  max-width: 1280px;
  margin: 0 auto;
}
.aide-cat-popular__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5e8a14;
  font-weight: 600;
}
.aide-cat-popular__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--charbon-profond);
  margin: 14px 0 40px;
  max-width: 18ch;
}
.aide-cat-popular__title .accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.aide-cat-popular__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .aide-cat-popular { padding: 64px 20px 48px; }
  .aide-cat-popular__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .aide-cat-popular { border-top-left-radius: 32px; border-top-right-radius: 32px; }
}
@media (max-width: 720px) {
  /* 40px à 720px (identique à avant), réduit progressivement vers 320px */
  .aide-cat-popular__title { font-size: clamp(30px, 8.5vw, 40px); }
}

.aide-cat-popcard {
  background: var(--creme-pur);
  border: 1px solid rgba(10, 10, 11, 0.10);
  border-radius: 20px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 220ms, box-shadow 220ms;
  min-height: 280px;
}
.aide-cat-popcard:hover {
  transform: scale(1.02);
  border-color: rgba(212, 255, 63, 0.50);
  box-shadow: 0 12px 32px rgba(10, 10, 11, 0.06);
}
.aide-cat-popcard__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(212, 255, 63, 0.20);
  display: flex; align-items: center; justify-content: center;
  color: #4f7510;
}
.aide-cat-popcard__icon svg { width: 22px; height: 22px; }
.aide-cat-popcard__subcat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4f7510;
  font-weight: 600;
}
.aide-cat-popcard__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--charbon-profond);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aide-cat-popcard__excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(10, 10, 11, 0.70);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}
.aide-cat-popcard__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(10, 10, 11, 0.55);
  margin-top: auto;
}
.aide-cat-popcard__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #4f7510;
  font-weight: 600;
}

/* ---------- 4. LISTE COMPLÈTE (crème, rounded top) ---------- */
.aide-cat-list {
  background: var(--creme-doux);
  color: var(--fg-on-light);
  border-top-left-radius: 48px;
  border-top-right-radius: 48px;
  padding: 96px 32px 96px;
  margin-top: -48px;
  position: relative;
}
.aide-cat-list__inner {
  max-width: 1280px;
  margin: 0 auto;
}
.aide-cat-list__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5e8a14;
  font-weight: 600;
}
.aide-cat-list__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--charbon-profond);
  margin: 14px 0 56px;
  max-width: 18ch;
}
.aide-cat-list__title .accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--charbon-profond);
  letter-spacing: -0.01em;
}

.aide-cat-group {
  margin-bottom: 64px;
}
.aide-cat-group:last-child { margin-bottom: 0; }
.aide-cat-group__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0 24px;
  border-bottom: 1px solid rgba(10, 10, 11, 0.12);
  margin-bottom: 24px;
}
.aide-cat-group__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(212, 255, 63, 0.30);
  display: flex; align-items: center; justify-content: center;
  color: #4f7510;
  flex-shrink: 0;
}
.aide-cat-group__icon svg { width: 18px; height: 18px; }
.aide-cat-group__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--charbon-profond);
  margin: 0;
  flex: 1;
}
.aide-cat-group__count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(10, 10, 11, 0.55);
  text-transform: uppercase;
}
.aide-cat-group__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px) {
  .aide-cat-list { padding: 80px 20px 64px; border-top-left-radius: 32px; border-top-right-radius: 32px; }
  .aide-cat-group__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .aide-cat-list__title { font-size: clamp(30px, 8.5vw, 40px); }
}

/* Card horizontale compacte (thème clair) */
.aide-cat-artcard {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--creme-pur);
  border: 1px solid rgba(10, 10, 11, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
  position: relative;
}
.aide-cat-artcard:hover {
  transform: scale(1.01);
  border-color: rgba(212, 255, 63, 0.60);
  box-shadow: 0 8px 24px rgba(10, 10, 11, 0.05);
}
.aide-cat-artcard__icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(212, 255, 63, 0.25);
  display: flex; align-items: center; justify-content: center;
  color: #4f7510;
}
.aide-cat-artcard__icon svg { width: 16px; height: 16px; }
.aide-cat-artcard__body { min-width: 0; }
.aide-cat-artcard__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: var(--charbon-profond);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aide-cat-artcard__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(10, 10, 11, 0.55);
}
.aide-cat-artcard__arrow {
  color: #4f7510;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  transition: transform 200ms ease;
}
.aide-cat-artcard:hover .aide-cat-artcard__arrow { transform: translateX(3px); }

/* État "BIENTÔT" — thème clair */
.aide-cat-artcard.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(10, 10, 11, 0.03);
  border-color: rgba(10, 10, 11, 0.06);
}
.aide-cat-artcard.is-soon .aide-cat-artcard__icon {
  background: rgba(10, 10, 11, 0.06);
  color: rgba(10, 10, 11, 0.35);
}
.aide-cat-artcard.is-soon .aide-cat-artcard__arrow {
  display: none;
}
.aide-cat-artcard.is-soon .aide-cat-artcard__pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.08);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 10, 11, 0.55);
}
.aide-cat-artcard__pill { display: none; }

/* ---------- 5. RESSOURCES (vert KTK, rounded top+bottom) ---------- */
.aide-cat-resources {
  background: var(--signature);
  color: var(--charbon-profond);
  border-radius: 48px 48px 48px 48px;
  margin: 64px 32px 96px;
  padding: 72px 48px;
}
@media (max-width: 720px) {
  .aide-cat-resources {
    border-radius: 32px;
    margin: 48px 16px 64px;
    padding: 56px 24px;
  }
}
.aide-cat-resources__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.aide-cat-resources__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 10, 11, 0.65);
  font-weight: 600;
}
.aide-cat-resources__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--charbon-profond);
  margin: 14px 0 18px;
}
.aide-cat-resources__title .accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
}
.aide-cat-resources__subtitle {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(10, 10, 11, 0.82);
  margin: 0 auto 36px;
  max-width: 52ch;
}
.aide-cat-resources__buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.aide-cat-resources__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease;
}
.aide-cat-resources__btn:hover { transform: translateY(-1px); }
.aide-cat-resources__btn--primary {
  background: var(--charbon-profond);
  color: var(--fg-on-dark);
}
.aide-cat-resources__btn--secondary {
  background: var(--creme-editorial);
  color: var(--charbon-profond);
}
.aide-cat-resources__btn svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  /* 40px à 720px (identique à avant), réduit progressivement vers 320px.
     Placé après la règle de base pour gagner la cascade. */
  .aide-cat-resources__title { font-size: clamp(30px, 8.5vw, 40px); }
}

/* ---------- 6. TRÈS PETITS ÉCRANS (320–480px) ---------- */
@media (max-width: 480px) {
  .aide-cat-breadcrumb { padding: 20px 16px 0; }
  .aide-cat-hero { padding: 28px 16px 48px; }
  .aide-cat-hero__grid { gap: 36px; }
  .aide-cat-hero__visual { max-width: 300px; }
  .aide-cat-hero__subtitle { font-size: 16px; margin-bottom: 24px; }

  .aide-cat-popular { padding: 56px 16px 40px; }
  .aide-cat-popcard { min-height: 0; padding: 24px 20px; }

  .aide-cat-list { padding: 64px 16px 56px; }
  .aide-cat-group { margin-bottom: 48px; }
  .aide-cat-group__header { gap: 12px; }
  .aide-cat-group__title { font-size: 20px; }
  .aide-cat-artcard { grid-template-columns: 32px 1fr auto; gap: 12px; padding: 16px; }
  .aide-cat-artcard__icon { width: 32px; height: 32px; }

  .aide-cat-resources { margin: 40px 12px 56px; padding: 48px 20px; }
  .aide-cat-resources__subtitle { font-size: 16px; }
  .aide-cat-resources__buttons { flex-direction: column; align-items: stretch; }
  .aide-cat-resources__btn { width: 100%; justify-content: center; }
}
