/* Ganttmint : éléments partagés du site (nav, pied de page) et pages de contenu (blog, modèles, nouveautés). */
html { color-scheme: light dark; }
body { font-size: var(--fs-body); }
.brand img { display: block; height: 26px; width: auto; }
.foot .brand img { height: 22px; }

/* ---------- Navigation ---------- */
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ---------- Pied de page ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 56px 0 40px; }
.foot-brand p { margin: 14px 0 0; color: var(--ink-muted); font-size: var(--fs-small); }
.foot h2 { font-size: var(--fs-small); font-weight: 640; margin: 0 0 14px; letter-spacing: -0.01em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot ul a { color: var(--ink-muted); text-decoration: none; font-size: var(--fs-small); }
.foot ul a:hover { color: var(--ink); }
.foot-bottom { border-top: 1px solid var(--line); padding: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-muted); font-size: 13px; }
.foot-bottom a { color: inherit; text-decoration: none; }
.foot-bottom a:hover { color: var(--ink); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Éditeur intégré (hero, modèles) ---------- */
.hero-editor { height: min(640px, 76vh); min-height: 460px; position: relative; }
.hero-editor iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .35s; background: var(--surface); }
.hero-editor.ready iframe { opacity: 1; }
.he-skeleton { position: absolute; inset: 0; transition: opacity .35s; }
.hero-editor.ready .he-skeleton { opacity: 0; }
.he-top { height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.he-top i { display: block; height: 12px; border-radius: 6px; background: var(--surface-soft-2); width: 120px; }
.he-top i:nth-child(2) { width: 160px; margin-left: auto; }
.he-top i:nth-child(3) { width: 90px; background: var(--ink); opacity: .85; }
.he-rows { padding: 34px 0; display: flex; flex-direction: column; gap: 22px; }
.he-rows i { display: block; height: 22px; border-radius: 8px; margin-left: calc(28% + var(--x) * .7); width: calc(var(--w) * .7); background: var(--surface-soft-2); animation: he-pulse 1.4s ease-in-out infinite alternate; }
@keyframes he-pulse { to { opacity: .55; } }
.tpl-editor { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; height: min(600px, 72vh); min-height: 440px; }
@media (max-width: 720px) { .hero-editor { height: 520px; min-height: 0; } .tpl-editor { height: 480px; } }

/* ---------- Pages de contenu ---------- */
.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.038em; margin: 0; text-wrap: balance; }
.page-head .lead { margin: 18px 0 0; max-width: 680px; text-align: left; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--ink-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Liste d'articles */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 96px; }
.post-card { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: border-color .2s; background: var(--surface); }
.post-card:hover { border-color: var(--line-strong); }
.post-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; display: block; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.post-card div { padding: 22px 24px 26px; }
.post-card h2 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 10px; }
.post-card p { margin: 0; color: var(--ink-muted); font-size: 15px; }
.post-card .meta { margin-top: 14px; font-size: 13px; color: var(--ink-muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 96px; margin-top: -60px; }
@media (max-width: 760px) { .posts { grid-template-columns: 1fr; } }

/* Article */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 64px; align-items: start; padding-bottom: 72px; }
.article-head { max-width: 760px; }
.article-head h1 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.038em; margin: 0; text-wrap: balance; }
.article-head .desc { font-size: 19px; color: var(--ink-muted); margin: 18px 0 0; line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 22px 0 0; color: var(--ink-muted); font-size: var(--fs-small); }
.byline b { color: var(--ink-muted); font-weight: 560; }
.prose { max-width: 720px; font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 29px; line-height: 1.2; letter-spacing: -0.028em; margin: 2em 0 .2em; scroll-margin-top: 84px; }
.prose h3 { font-size: 21px; letter-spacing: -0.02em; margin: 1.6em 0 .2em; scroll-margin-top: 84px; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose code { font: .88em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-soft-2); padding: 2px 6px; border-radius: 6px; }
.prose img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); display: block; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: var(--fs-small); color: var(--ink-muted); margin-top: 10px; text-align: center; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--line-strong); color: var(--ink-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 1.6em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 620; background: var(--surface-soft); }
.prose tr:last-child td { border-bottom: 0; }
.toc { position: sticky; top: 92px; font-size: var(--fs-small); }
.toc h2 { font-size: var(--fs-small); font-weight: 640; margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.toc a { color: var(--ink-muted); text-decoration: none; line-height: 1.4; display: block; }
.toc a:hover, .toc a.on { color: var(--ink); }
.related { border-top: 1px solid var(--line); padding: 56px 0 96px; }
.related h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 22px; }
@media (max-width: 980px) { .article-wrap { grid-template-columns: 1fr; } .toc { display: none; } }

/* Mini Gantt interactif (appel à l'action) */
.mini { border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 22px; margin: 2.2em 0 !important; background: var(--surface); }
.mini-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.mini-head b { display: block; font-size: 19px; letter-spacing: -0.02em; line-height: 1.3; }
.mini-head span { display: block; color: var(--ink-muted); font-size: 15px; margin-top: 4px; }
.mini-head .btn { text-decoration: none; color: var(--surface); }
.mini-tl { position: relative; height: 172px; margin-top: 22px; border-radius: 12px; background:
  repeating-linear-gradient(to right, var(--line-2) 0 1px, transparent 1px 12.5%); user-select: none; touch-action: pan-y; }
.mini-bar { position: absolute; height: 28px; border-radius: 9px; background: var(--surface-soft-2); border: 1px solid var(--line-strong); cursor: grab; display: flex; align-items: center; padding: 0 10px; font-size: 13px; font-weight: 580; white-space: nowrap; color: var(--ink); transition: box-shadow .15s, transform .15s; touch-action: none; }
.mini-bar:hover { border-color: var(--ink-faint); }
.mini-bar.drag { cursor: grabbing; transform: translateY(-1px); box-shadow: var(--shadow-pop); z-index: 2; }
.mini-bar.ms { width: 18px !important; height: 18px; padding: 0; border-radius: 4px; transform: rotate(45deg); background: var(--ink); border-color: var(--ink); }
.mini-bar.ms span { position: absolute; left: 24px; top: -4px; transform: rotate(-45deg); transform-origin: left top; }
.mini-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mini-svg path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }

/* Modèles */
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 40px; }
.tpl-card { border: 1px solid var(--line); border-radius: 20px; padding: 26px; text-decoration: none; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s; background: var(--surface); }
.tpl-card:hover { border-color: var(--line-strong); }
.tpl-card h2 { font-size: 21px; margin: 0; letter-spacing: -0.02em; }
.tpl-card p { margin: 0; color: var(--ink-muted); font-size: 15px; }
.tpl-card .meta { font-size: 13px; color: var(--ink-muted); }
.tpl-thumb { display: flex; flex-direction: column; gap: 7px; padding: 16px; border-radius: 12px; background: var(--surface-soft); }
.tpl-thumb i { display: block; height: 9px; border-radius: 5px; background: var(--line-strong); margin-left: var(--x); width: var(--w); }
.tpl-thumb i.g { background: var(--ink); opacity: .78; height: 5px; }
.tpl-thumb i.m { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--ink); }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tpl-actions .btn { text-decoration: none; }
.tpl-hint { color: var(--ink-muted); font-size: var(--fs-small); margin: 14px 0 0; }
.tpl-body { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 72px 0 40px; }
.tpl-body h2 { font-size: 27px; letter-spacing: -0.025em; margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; color: var(--ink-muted); }
.steps li b { color: var(--ink); font-weight: 620; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; font-weight: 640; color: var(--ink); }
.tpl-body p { color: var(--ink-muted); margin: 0 0 18px; }
.task-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.task-table th, .task-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.task-table th { font-weight: 620; background: var(--surface-soft); }
.task-table td:nth-child(n+2), .task-table th:nth-child(n+2) { text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.task-table tr.grp td { font-weight: 640; color: var(--ink); }
.task-table tr.sub td:first-child { padding-left: 30px; }
.blank { border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 32px 0 96px; }
.blank h2 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
.blank p { margin: 6px 0 0; color: var(--ink-muted); }
.blank .btn { text-decoration: none; }
@media (max-width: 860px) { .tpl-grid, .tpl-body { grid-template-columns: 1fr; } }

/* Nouveautés */
.changelog .prose h2 { font-size: 22px; margin-top: 2.2em; padding-top: 1.6em; border-top: 1px solid var(--line); }
.changelog .prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* 404 */
.nf { padding: 120px 0 140px; text-align: center; }
.nf h1 { font-size: var(--fs-h2); letter-spacing: -0.038em; margin: 0; }
.nf p { color: var(--ink-muted); margin: 18px auto 30px; max-width: 520px; }
.nf .cta-row { justify-content: center; }
.nf .btn { text-decoration: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Bouton clair / sombre */
.theme-btn, .theme-fab { display: inline-grid; place-items: center; }
.theme-btn .i-sun, .theme-fab .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun, :root[data-theme="dark"] .theme-fab .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon, :root[data-theme="dark"] .theme-fab .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun, :root:not([data-theme="light"]) .theme-fab .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon, :root:not([data-theme="light"]) .theme-fab .i-moon { display: none; }
}
.theme-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); cursor: pointer; transition: background .15s, color .15s; }
.theme-btn:hover { background: var(--surface-soft); color: var(--ink); }
