/* =========================================================
   Pages éditoriales / légales — Doigts Magiques
   Légères, lisibles, sans JS lourd.
   ========================================================= */

body.page-editorial {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body.page-editorial .editorial-main {
  flex: 1 1 auto;
  position: relative;
  z-index: 2;
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
}

body.page-editorial .editorial-main > .breadcrumbs,
body.page-editorial .editorial-main > header.editorial-header,
body.page-editorial .editorial-main > .editorial-body,
body.page-editorial .editorial-main > .related-guides,
body.page-editorial .editorial-main > .editorial-cta {
  max-width: 42rem;
}

.breadcrumbs {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--line);
  opacity: 0.9;
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--accent-dark);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.editorial-header {
  margin-bottom: 1.5rem;
}

.editorial-header h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.2;
  color: var(--ink);
}

.editorial-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.editorial-body h2 {
  margin: 1.75rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.25;
}

.editorial-body h3 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.editorial-body p,
.editorial-body li {
  color: var(--ink);
  line-height: 1.6;
}

.editorial-body p {
  margin: 0 0 0.9rem;
}

.editorial-body ul,
.editorial-body ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.editorial-body li {
  margin-bottom: 0.4rem;
}

.editorial-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.editorial-body a:hover,
.editorial-body a:focus-visible {
  color: var(--ink);
}

.editorial-note {
  margin: 1.25rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--warn);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 0 12px 12px 0;
}

.editorial-note p:last-child {
  margin-bottom: 0;
}

.editorial-cta {
  margin: 2rem 0 0;
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.editorial-cta h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.editorial-cta p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}

.editorial-cta .btn {
  display: inline-flex;
  text-decoration: none;
}

.related-guides {
  margin: 2.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.related-guides h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.related-guides ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.related-guides a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.related-guides a:hover,
.related-guides a:focus-visible {
  color: var(--accent-dark);
}

.guides-index-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.guides-index-list li {
  margin: 0;
}

.guides-index-card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.guides-index-card:hover,
.guides-index-card:focus-visible {
  border-color: rgba(226, 79, 46, 0.45);
  transform: translateY(-1px);
}

.guides-index-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.guides-index-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  .guides-index-card {
    transition: none;
  }

  .guides-index-card:hover,
  .guides-index-card:focus-visible {
    transform: none;
  }
}

/* Pied de page site (liens) — non fixe, compact */
.site-footer {
  position: relative;
  z-index: 1;
  width: min(52rem, 100%);
  margin: 1.5rem auto 1.75rem;
  padding: 0 1.25rem 0.75rem;
  text-align: center;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}

.site-footer-nav a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  color: var(--accent-dark);
}

.site-footer-credit {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
  opacity: 0.85;
}

/* Ne pas gêner clavier / mains / écrans bas en session de frappe */
body.view-exercise .site-footer,
body.view-text-play .site-footer,
body.view-path .site-footer {
  display: none;
}

@media (max-height: 720px) {
  body:not(.page-editorial) .site-footer {
    margin: 0.75rem auto 0.85rem;
  }

  body:not(.page-editorial) .site-footer-nav {
    font-size: 0.75rem;
    gap: 0.25rem 0.65rem;
  }

  body:not(.page-editorial) .site-footer-credit {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  body.page-editorial .editorial-main {
    padding: 1rem 1rem 2rem;
  }

  .site-footer {
    margin-bottom: 1.25rem;
  }
}
