/* Pages de contenu : navigation secondaire, visuels de héros, fiches techniques, hubs, guides, ressources */

.subnav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(247, 242, 232, .86); backdrop-filter: blur(14px); border-block: 1px solid var(--border); }
.subnav ul { list-style: none; margin: 0; padding: .5rem 0; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .45rem .9rem; min-height: 40px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .86rem; color: var(--ink-2); border: 1px solid transparent; transition: all .25s var(--ease); }
.subnav a:hover { background: #fff; border-color: var(--border); color: var(--terra-deep); }
.subnav a[aria-current="page"] { background: var(--terra); color: #fff; box-shadow: 0 6px 14px rgba(148, 86, 55, .28); }

/* Visuel de héros */
.phero { overflow-x: clip; }
.hv { position: relative; aspect-ratio: 1; width: min(100%, 380px); margin-inline: auto; display: grid; place-items: center; }
.hv__disc { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--terra-soft) 45%, rgba(217, 138, 95, .55)); box-shadow: 0 30px 70px rgba(148, 86, 55, .3), inset 0 0 0 1px rgba(148, 86, 55, .2); animation: hv-float 7s ease-in-out infinite alternate; }
.hv--blue .hv__disc { background: radial-gradient(circle at 35% 30%, #fff, #dfeaf3 45%, rgba(42, 96, 130, .45)); box-shadow: 0 30px 70px rgba(42, 96, 130, .3), inset 0 0 0 1px rgba(42, 96, 130, .2); }
.hv--green .hv__disc { background: radial-gradient(circle at 35% 30%, #fff, #dcf0e6 45%, rgba(47, 122, 90, .45)); box-shadow: 0 30px 70px rgba(47, 122, 90, .3), inset 0 0 0 1px rgba(47, 122, 90, .2); }
.hv--night .hv__disc { background: radial-gradient(circle at 35% 30%, #4a5568, #1a2029 60%, #0d1014); box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.hv__icon { position: relative; font-size: clamp(4rem, 12vw, 7rem); filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .25)); animation: hv-bob 5s ease-in-out infinite alternate; }
.hv__chip { position: absolute; padding: .5rem .9rem; border-radius: 999px; background: rgba(255, 253, 248, .94); border: 1px solid var(--border); box-shadow: 0 12px 28px rgba(49, 38, 26, .18); font-weight: 750; font-size: .84rem; white-space: nowrap; animation: hv-float 6s ease-in-out infinite alternate; }
.hv__chip--1 { left: -2%; top: 14%; } .hv__chip--2 { right: -3%; top: 40%; animation-delay: -2s; } .hv__chip--3 { left: 6%; bottom: 8%; animation-delay: -4s; }
.hv__rank { position: relative; width: 62%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); animation: hv-bob 5s ease-in-out infinite alternate; }
.table tr:has(.rank-cell) > * { vertical-align: middle; }
.rank-cell { display: inline-flex; align-items: center; gap: .7rem; }
.rank-mini { width: 40px; height: 40px; object-fit: contain; }
@keyframes hv-float { to { transform: translateY(-10px); } }
@keyframes hv-bob { to { transform: translateY(-8px) rotate(3deg); } }
@media (max-width: 900px) { .phero__grid--visual { grid-template-columns: 1fr; } .phero__visual { order: -1; } .hv { width: min(70%, 260px); } .hv__chip { font-size: .74rem; padding: .4rem .7rem; } }

/* Fiche technique */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin: 1.4rem 0; }
.spec div { background: var(--paper); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 1.1rem; box-shadow: var(--shadow-soft); }
.spec dt { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: .25rem 0 0; font-weight: 700; color: var(--ink); }
.section--night .spec div { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }

/* Bloc démo large dans une section */
.demo-block { margin-top: 1.2rem; }
.demo-hint { display: flex; gap: .6rem; align-items: center; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
.demo-hint::before { content: '👆'; }

/* Raccourcis clavier */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.shortcuts div { display: flex; align-items: center; gap: .8rem; background: var(--paper); border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; }
.shortcuts .kbd { min-width: 2.6rem; padding: .3em .6em; font-size: .9rem; font-weight: 800; box-shadow: 0 3px 0 var(--border-strong); }

/* Hub (listes de pages) */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.2rem; }
.hubcard { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 1.6rem; border-radius: 24px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); text-decoration: none; color: inherit; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; overflow: hidden; }
.hubcard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--terra-2); color: inherit; }
.hubcard__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; background: linear-gradient(145deg, var(--terra-soft), #fff); box-shadow: inset 0 0 0 1px rgba(148, 86, 55, .2); }
.hubcard h3 { font-size: 1.25rem; margin: .3rem 0 0; }
.hubcard p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.hubcard ul { margin: .3rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .9rem; }
.hubcard__go { margin-top: auto; padding-top: .6rem; font-weight: 800; color: var(--terra); }
.hubcard__tag { position: absolute; top: 1.2rem; right: 1.2rem; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 99px; background: var(--terra-soft); color: var(--terra-deep); }
.hubgroup { margin-top: clamp(2.5rem, 5vw, 4rem); }
.hubgroup:first-child { margin-top: 0; }
.hubgroup > h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .3rem; }
.hubgroup > p { margin: 0 0 1.4rem; color: var(--ink-2); max-width: 60ch; }

/* Guides : en-tête d'article */
.section--article { padding-top: clamp(2rem, 5vw, 3.5rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.aside-cta { padding: 1.2rem 1.3rem; border-radius: 20px; background: linear-gradient(160deg, #fff4ea, #f6dfcf); border: 1px solid rgba(148, 86, 55, .3); }
.aside-cta p { margin: 0 0 .8rem; font-size: .92rem; }
.prose .demo { margin: 2rem 0; }
.prose .callout { margin: 1.6rem 0; }
.formula, .prose .formula { margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: 16px; background: var(--paper-2); border: 1px dashed var(--border-strong); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; overflow-x: auto; }
.prose .example { margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: 16px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.prose .example > :last-child { margin-bottom: 0; }
.prose .good, .prose .bad { padding: .9rem 1.1rem; border-radius: 14px; margin: .6rem 0; font-size: .96rem; }
.prose .good { background: #e1f3ea; border-left: 4px solid var(--green); } .prose .bad { background: #fbe6e6; border-left: 4px solid var(--red); }
.prose .good > :last-child, .prose .bad > :last-child { margin-bottom: 0; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; } .article__aside { position: static; order: -1; } .toc { display: none; } }

/* Glossaire */
.glossary { display: grid; gap: 1rem; }
.glossary article { background: var(--paper); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow-soft); scroll-margin-top: calc(var(--header-h) + 20px); }
.glossary h2 { font-family: var(--display); font-size: 1.35rem; margin: 0 0 .3rem; }
.glossary p { margin: 0; color: var(--ink-2); }
.glossary__index { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.glossary__index a { display: inline-block; padding: .35rem .8rem; border-radius: 99px; background: var(--paper); border: 1px solid var(--border); text-decoration: none; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.glossary__index a:hover { border-color: var(--terra-2); color: var(--terra-deep); }

/* Succès */
.ach-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.4rem; }
.ach-filter button { font: inherit; font-weight: 700; font-size: .86rem; padding: .5rem .95rem; min-height: 44px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--ink-2); cursor: pointer; transition: all .25s var(--ease); }
.ach-filter button[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: #fff; box-shadow: 0 6px 16px rgba(148, 86, 55, .3); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: .9rem; }
.ach { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); transition: transform .3s var(--ease), box-shadow .3s; }
.ach:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ach[hidden] { display: none; }
.ach__icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(145deg, var(--terra-soft), #fff); box-shadow: inset 0 0 0 1px rgba(148, 86, 55, .2); }
.ach h3 { margin: 0; font-size: 1rem; } .ach p { margin: .15rem 0 0; font-size: .86rem; color: var(--ink-2); }
.ach__pp { font-weight: 850; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ach-total { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0 0 1.6rem; }
.ach-total div { display: grid; } .ach-total b { font-family: var(--display); font-size: 2rem; color: var(--terra-deep); line-height: 1.1; } .ach-total span { font-size: .8rem; font-weight: 700; color: var(--muted); }

/* Légal / confidentialité */
.legal h2 { scroll-margin-top: calc(var(--header-h) + 20px); }
.datatable { font-size: .92rem; }

/* Étapes d'installation */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; }
.platform { padding: 1.6rem; border-radius: 24px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.platform h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font-size: 1.25rem; }
.platform ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; color: var(--ink-2); }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound .display { max-width: none; margin-inline: auto; }
.notfound__big { font-family: var(--display); font-size: clamp(6rem, 22vw, 14rem); line-height: .9; font-weight: 700; background: linear-gradient(135deg, var(--terra-3), var(--terra)); -webkit-background-clip: text; background-clip: text; color: transparent; }
