/* Editorial theme hubs - styles for the DOM generated by assets/app.js. */

body.theme-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  color-scheme: light;
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.theme-page,
body.theme-page * {
  box-sizing: border-box;
}

body.theme-page a {
  color: inherit;
}

body.theme-page img {
  display: block;
  max-width: 100%;
}

body.theme-page main.container.theme-page-shell {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin: 0 auto;
  padding: 16px 0 80px;
  flex: 1 0 auto;
}

body.theme-page .theme-layout-v2 {
  display: grid;
  gap: 40px;
}

body.theme-page header .logo-img {
  width: 92px;
  height: auto;
}

body.theme-page .theme-section,
body.theme-page .theme-editorial-card,
body.theme-page .theme-summary-card,
body.theme-page .theme-journey-card {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-section {
  display: grid;
  gap: 18px;
  scroll-margin-top: 92px;
}

body.theme-page .theme-section-head {
  display: grid;
  gap: 8px;
  margin: 0;
}

body.theme-page .theme-section-kicker,
body.theme-page .theme-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--editorial-accent, var(--color-category-indigo)) 28%, var(--color-surface-border));
  background: var(--color-background-secondary);
  color: var(--color-text-primary) !important;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.theme-page .theme-section-head h2,
body.theme-page .theme-summary-card h2,
body.theme-page .theme-journey-card h2,
body.theme-page .theme-editorial-card h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.28rem, 2vw, 1.62rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

body.theme-page .theme-section-subtitle,
body.theme-page .theme-editorial-lead,
body.theme-page .theme-summary-card > p,
body.theme-page .theme-journey-card > p,
body.theme-page .theme-section > p {
  margin: 0;
  color: #334155 !important;
  font-size: 0.96rem;
  line-height: 1.68;
}

body.theme-page .theme-hero-v2 {
  --editorial-accent: var(--color-category-indigo);
  --editorial-accent-deep: var(--color-category-indigo-deep);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  gap: 24px;
  align-items: center;
  padding-top: 8px;
}

body.theme-page .theme-hero-copy {
  min-width: 0;
}

body.theme-page .theme-hero-copy h1 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 800;
}

body.theme-page .theme-hero-lead {
  max-width: 58ch;
  margin: 16px 0 0;
  color: #334155 !important;
  font-size: 1.02rem;
  line-height: 1.72;
}

body.theme-page .theme-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

body.theme-page .theme-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--color-brand-electric-deep);
  color: #fff;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

body.theme-page .theme-hero-cta--secondary {
  border-color: var(--color-surface-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
}

body.theme-page .theme-hero-cta:hover,
body.theme-page .theme-hero-cta:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

body.theme-page .theme-hero-cta:hover,
body.theme-page .theme-hero-cta:focus-visible {
  background: #1740b5;
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-hero-cta--secondary:hover,
body.theme-page .theme-hero-cta--secondary:focus-visible {
  background: color-mix(in srgb, var(--color-brand-electric) 8%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-brand-electric) 30%, var(--color-surface-border));
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

body.theme-page .theme-hero-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-surface-border);
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  font-size: 0.86rem;
  font-weight: 700;
}

body.theme-page .theme-hero-note {
  margin: 18px 0 0;
  color: #334155 !important;
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 58ch;
}

body.theme-page .theme-hero-side {
  min-width: 0;
}

body.theme-page .theme-side-highlight {
  padding: 22px 20px;
  border-radius: 22px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-background-secondary);
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-side-highlight h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}

body.theme-page .theme-side-highlight > p {
  margin: 10px 0 0;
  color: #334155 !important;
  font-size: 0.92rem;
  line-height: 1.6;
}

body.theme-page .theme-side-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

body.theme-page .theme-side-list li {
  position: relative;
  padding-left: 18px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  line-height: 1.55;
}

body.theme-page .theme-side-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--editorial-accent, var(--color-category-indigo));
}

body.theme-page .theme-entry-grid,
body.theme-page .theme-key-section-grid,
body.theme-page .theme-continue-section-grid,
body.theme-page .theme-category-grid,
body.theme-page .theme-link-grid,
body.theme-page .theme-education-grid,
body.theme-page .theme-story-grid {
  display: grid;
  gap: 12px;
}

body.theme-page .theme-entry-grid,
body.theme-page .theme-key-section-grid,
body.theme-page .theme-continue-section-grid,
body.theme-page .theme-category-grid,
body.theme-page .theme-link-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.theme-page .theme-education-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.theme-page .theme-story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.theme-page .theme-link-card,
body.theme-page .theme-edu-card,
body.theme-page .theme-story-item,
body.theme-page .theme-summary-card,
body.theme-page .theme-journey-card,
body.theme-page .theme-faq details {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface-border);
  background: var(--color-background-secondary);
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-link-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: clip;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

body.theme-page .theme-link-card:hover,
body.theme-page .theme-link-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  border-color: color-mix(in srgb, var(--editorial-accent) 30%, var(--color-surface-border));
  background: color-mix(in srgb, var(--editorial-accent) 8%, var(--color-background-secondary));
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-link-card:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

body.theme-page .theme-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-background-primary);
}

body.theme-page .theme-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.theme-page .theme-link-card-body {
  display: grid;
  gap: 8px;
  padding: 16px 16px 18px;
}

body.theme-page .theme-link-kicker,
body.theme-page .theme-link-badge,
body.theme-page .theme-edu-eyebrow {
  margin: 0;
  color: var(--color-text-primary) !important;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.theme-page .theme-link-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--color-background-secondary);
  border: 1px solid color-mix(in srgb, var(--editorial-accent) 28%, var(--color-surface-border));
}

body.theme-page .theme-link-card-body h3,
body.theme-page .theme-edu-card h3,
body.theme-page .theme-story-item h3 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.02rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 800;
}

body.theme-page .theme-link-description,
body.theme-page .theme-edu-card p,
body.theme-page .theme-story-item p {
  margin: 0;
  color: #334155 !important;
  font-size: 0.9rem;
  line-height: 1.6;
}

body.theme-page .theme-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: auto;
  color: #1d4ed8 !important;
  font-size: 0.88rem;
  font-weight: 800;
}

body.theme-page .theme-link-cta::after,
body.theme-page .theme-journey-link::after,
body.theme-page .text-link::after {
  content: "\2192";
  transition: transform 180ms ease;
}

body.theme-page .theme-link-card:hover .theme-link-cta::after,
body.theme-page .theme-link-card:focus-visible .theme-link-cta::after,
body.theme-page .theme-journey-link:hover::after,
body.theme-page .theme-journey-link:focus-visible::after,
body.theme-page .text-link:hover::after,
body.theme-page .text-link:focus-visible::after {
  transform: translateX(3px);
}

body.theme-page .theme-link-card--compact .theme-card-visual {
  aspect-ratio: 4 / 3;
}

body.theme-page .theme-link-card--wide {
  grid-column: span 2;
}

body.theme-page .theme-link-card--highlight {
  border-color: color-mix(in srgb, var(--editorial-accent) 38%, var(--color-surface-border));
}

body.theme-page .theme-edu-card,
body.theme-page .theme-story-item {
  padding: 18px;
  display: grid;
  gap: 8px;
}

body.theme-page .theme-journey-card {
  display: grid;
  gap: 16px;
}

body.theme-page .theme-journey-list {
  display: grid;
  gap: 10px;
}

body.theme-page .theme-journey-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

body.theme-page .theme-journey-link strong {
  color: var(--color-text-primary) !important;
}

body.theme-page .theme-journey-link:hover,
body.theme-page .theme-journey-link:focus-visible,
body.theme-page .text-link:hover,
body.theme-page .text-link:focus-visible {
  transform: translateY(-2px);
  outline: none;
  border-color: color-mix(in srgb, var(--editorial-accent) 30%, var(--color-surface-border));
  background: color-mix(in srgb, var(--editorial-accent) 8%, var(--color-background-secondary));
  box-shadow: var(--shadow-soft);
}

body.theme-page .theme-journey-link:focus-visible,
body.theme-page .text-link:focus-visible,
body.theme-page .theme-link-card:focus-visible,
body.theme-page .guide-like-focus:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

body.theme-page .theme-summary-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.theme-page .theme-summary-list li {
  position: relative;
  padding-left: 18px;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

body.theme-page .theme-summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--editorial-accent, var(--color-category-indigo));
}

body.theme-page .theme-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.theme-page .theme-faq details {
  overflow: clip;
}

body.theme-page .theme-faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--color-text-primary);
  font-weight: 700;
}

body.theme-page .theme-faq summary::-webkit-details-marker {
  display: none;
}

body.theme-page .theme-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--editorial-accent-deep, var(--color-category-indigo-deep));
  font-size: 1.1rem;
  font-weight: 700;
}

body.theme-page .theme-faq details[open] summary::after {
  content: "\2212";
}

body.theme-page .theme-faq p {
  margin: 0;
  padding: 0 18px 18px;
  color: #334155 !important;
  font-size: 0.92rem;
  line-height: 1.65;
}

body.theme-page .theme-faq a.text-link {
  display: inline-flex;
  margin: 0 18px 18px;
  color: #1d4ed8 !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

body.theme-page .theme-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.theme-page .theme-page-shell a,
body.theme-page .theme-page-shell button {
  -webkit-tap-highlight-color: transparent;
}

body.theme-page .theme-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}

body.theme-page .theme-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.theme-page [class^="theme-hero"],
body.theme-page .theme-section,
body.theme-page .theme-link-card,
body.theme-page .theme-edu-card,
body.theme-page .theme-story-item,
body.theme-page .theme-summary-card,
body.theme-page .theme-journey-card,
body.theme-page .theme-faq details {
  contain: content;
}

body.theme-page .theme-page-shell :focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

body.theme-page.calc-theme-finance,
body.theme-page.calc-theme-finances,
body.theme-page.calc-theme-quotidien {
  --editorial-accent: var(--color-category-indigo);
  --editorial-accent-deep: var(--color-category-indigo-deep);
}

body.theme-page.calc-theme-transport {
  --editorial-accent: var(--color-category-cyan);
  --editorial-accent-deep: var(--color-category-cyan-deep);
}

body.theme-page.calc-theme-family,
body.theme-page.calc-theme-famille {
  --editorial-accent: var(--color-category-pink);
  --editorial-accent-deep: var(--color-category-pink-deep);
}

body.theme-page.calc-theme-maison {
  --editorial-accent: var(--color-category-amber);
  --editorial-accent-deep: var(--color-category-amber-deep);
}

body.theme-page.calc-theme-sante {
  --editorial-accent: var(--color-category-emerald);
  --editorial-accent-deep: var(--color-category-emerald-deep);
}

body.theme-page.calc-theme-animaux {
  --editorial-accent: var(--color-category-teal);
  --editorial-accent-deep: var(--color-category-teal-deep);
}

@media (max-width: 1100px) {
  body.theme-page .theme-hero-v2 {
    grid-template-columns: minmax(0, 1fr);
  }

  body.theme-page .theme-story-grid,
  body.theme-page .theme-education-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  body.theme-page .theme-faq {
    grid-template-columns: minmax(0, 1fr);
  }

  body.theme-page .theme-link-card--wide {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  body.theme-page main.container.theme-page-shell {
    width: min(100% - 24px, 100%);
    padding: 12px 0 60px;
  }

  body.theme-page .theme-layout-v2 {
    gap: 32px;
  }

  body.theme-page .theme-section,
  body.theme-page .theme-editorial-card,
  body.theme-page .theme-summary-card,
  body.theme-page .theme-journey-card {
    padding: 20px;
    border-radius: 22px;
  }

  body.theme-page .theme-entry-grid,
  body.theme-page .theme-key-section-grid,
  body.theme-page .theme-continue-section-grid,
  body.theme-page .theme-category-grid,
  body.theme-page .theme-link-grid,
  body.theme-page .theme-education-grid,
  body.theme-page .theme-story-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
