/*
Theme Name: Astrarium
Theme URI: https://astrarium.ch
Author: Astrarium
Author URI: https://astrarium.ch
Description: Thème pleine page pour un cabinet d'oracles, inspiré des instruments astronomiques anciens : laiton, parchemin et nuit d'encre. Conçu pour accueillir l'extension « Astrarium — Oracles & Astrologies » et regrouper les mentions légales (nLPD / RGPD). Sans police externe, respectueux de la vie privée.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astrarium
Tags: full-width, custom-menu, threaded-comments, translation-ready, one-column
*/

/* ============================================================
   Astrarium — thème
   Direction : cartographie céleste / instrument ancien.
   Laiton · parchemin · lapis · nuit d'encre.
   ============================================================ */

:root {
	--ink:        #0b1026;  /* nuit indigo profonde */
	--ink-2:      #131a3a;  /* panneau */
	--ink-3:      #1c2550;  /* relief */
	--parchment:  #ece3ce;  /* parchemin chaud */
	--parchment-2:#f5efdf;
	--brass:      #c9a24b;  /* laiton (accent) */
	--brass-soft: #e3c77e;
	--lapis:      #4f6db0;  /* lapis (liens, traits gravés) */
	--lapis-soft: #8aa0d8;
	--text:       #e8eaf2;
	--mist:       #9aa6c9;  /* texte atténué */
	--line:       rgba(201, 162, 75, .22);
	--line-cool:  rgba(122, 146, 210, .18);

	--serif: "Iowan Old Style", "Hoefler Text", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--wrap: 1180px;
	--read: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	color: var(--text);
	line-height: 1.7;
	background-color: var(--ink);
	background-image:
		radial-gradient(120% 90% at 50% -20%, #1a2350 0%, transparent 55%),
		radial-gradient(80% 60% at 100% 0%, rgba(79, 109, 176, .18) 0%, transparent 50%),
		linear-gradient(180deg, var(--ink) 0%, #080c1d 100%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a { color: var(--lapis-soft); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brass-soft); }

img { max-width: 100%; height: auto; }

/* Champ d'étoiles discret, fixe */
.sky {
	position: fixed; inset: 0; z-index: 0; pointer-events: none;
	background-image:
		radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent),
		radial-gradient(1px 1px at 68% 14%, #fff 50%, transparent),
		radial-gradient(1px 1px at 38% 64%, #d7e0ff 50%, transparent),
		radial-gradient(1.4px 1.4px at 84% 58%, #fff 50%, transparent),
		radial-gradient(1px 1px at 58% 84%, #fff 50%, transparent),
		radial-gradient(1px 1px at 8% 76%, var(--brass-soft) 50%, transparent),
		radial-gradient(1.4px 1.4px at 92% 32%, #fff 50%, transparent),
		radial-gradient(1px 1px at 26% 40%, #fff 50%, transparent);
	opacity: .5;
}

.site { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.4rem); }

/* ---------------------------------------------------------------- *
 *  EN-TÊTE
 * ---------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 20;
	backdrop-filter: blur(10px);
	background: linear-gradient(180deg, rgba(11, 16, 38, .9), rgba(11, 16, 38, .55));
	border-bottom: 1px solid var(--line);
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem; min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; color: var(--brass); flex: none; }
.brand__mark svg { display: block; width: 100%; height: 100%; }
.brand__name {
	font-family: var(--serif);
	font-size: 1.32rem;
	letter-spacing: .42em;
	text-transform: uppercase;
	padding-left: .42em; /* compense le letter-spacing à droite */
	background: linear-gradient(100deg, var(--parchment-2), var(--brass-soft) 60%, var(--brass));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__tag { display: block; font-family: var(--sans); font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--mist); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
	font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--mist); position: relative; padding: .3rem 0;
}
.nav a:hover, .nav .current-menu-item > a { color: var(--text); }
.nav .current-menu-item > a::after,
.nav a:hover::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
	background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.nav-toggle {
	display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
	color: var(--text); padding: .5rem .6rem; cursor: pointer; line-height: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- *
 *  HÉRO / PLEINE PAGE
 * ---------------------------------------------------------------- */
.hero { position: relative; flex: 1; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }

/* Signature : anneau écliptique gravé, en filigrane, derrière l'oracle */
.armilla {
	position: absolute; top: 50%; left: 50%; translate: -50% -50%;
	width: min(150vh, 1500px); height: min(150vh, 1500px);
	color: var(--brass);
	opacity: .07; pointer-events: none; z-index: 0;
	animation: armilla-turn 240s linear infinite;
}
.armilla svg { width: 100%; height: 100%; display: block; }
@keyframes armilla-turn { to { transform: rotate(360deg); } }

.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow {
	text-align: center; font-size: .72rem; letter-spacing: .42em; text-transform: uppercase;
	color: var(--brass); margin: 0 0 .8rem;
}
.hero__title {
	text-align: center; font-family: var(--serif); font-weight: 500;
	font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.1; margin: 0 auto .6rem;
	max-width: 16ch;
}
.hero__title em { font-style: italic; color: var(--brass-soft); }
.hero__lede {
	text-align: center; color: var(--mist); max-width: 56ch; margin: 0 auto 2.4rem;
	font-size: 1.05rem;
}
.hero__rule {
	width: 120px; height: 1px; margin: 0 auto 2.4rem;
	background: linear-gradient(90deg, transparent, var(--brass), transparent);
	position: relative;
}
.hero__rule::after {
	content: "✦"; position: absolute; top: -.7em; left: 50%; translate: -50% 0;
	color: var(--brass); font-size: .7rem; background: transparent;
}

/* L'oracle (extension) occupe toute la largeur disponible */
.oracle-stage { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- *
 *  CONTENU GÉNÉRIQUE (pages, légal)
 * ---------------------------------------------------------------- */
.page-shell { flex: 1; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.entry { max-width: var(--read); margin-inline: auto; }
.entry--wide { max-width: var(--wrap); }
.entry__eyebrow { font-size: .72rem; letter-spacing: .36em; text-transform: uppercase; color: var(--brass); margin: 0 0 .6rem; }
.entry__title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.12; margin: 0 0 1.6rem; }
.entry__title::after { content: ""; display: block; width: 90px; height: 1px; margin-top: 1rem; background: linear-gradient(90deg, var(--brass), transparent); }

.prose { color: #dfe3f0; font-size: 1.02rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-family: var(--serif); font-weight: 500; color: var(--parchment); font-size: 1.5rem; margin: 2.2rem 0 .7rem; }
.prose h3 { color: var(--brass-soft); font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.prose p { margin: .9rem 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: .9rem 0; }
.prose li { margin: .4rem 0; }
.prose strong { color: var(--parchment); }
.prose blockquote { border-left: 2px solid var(--brass); margin: 1.2rem 0; padding: .3rem 0 .3rem 1.1rem; color: var(--mist); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose code { background: rgba(255,255,255,.06); padding: .12em .4em; border-radius: 5px; font-size: .92em; }

/* Encart d'avertissement (modèle légal à personnaliser) */
.callout {
	border: 1px solid var(--line); border-left: 3px solid var(--brass);
	background: linear-gradient(120deg, rgba(201,162,75,.08), rgba(79,109,176,.05));
	border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 2rem;
	font-size: .92rem; color: var(--parchment);
}
.callout strong { color: var(--brass-soft); }

.entry__meta { color: var(--mist); font-size: .85rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- *
 *  PIED DE PAGE
 * ---------------------------------------------------------------- */
.site-footer {
	position: relative; z-index: 1; margin-top: auto;
	border-top: 1px solid var(--line);
	background: linear-gradient(180deg, transparent, rgba(8,12,29,.7));
	padding-block: 2.6rem 1.6rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand__name { font-size: 1.1rem; }
.footer-blurb { color: var(--mist); font-size: .9rem; margin: .9rem 0 0; max-width: 38ch; }
.footer-col h4 { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--brass); margin: 0 0 .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: .45rem 0; }
.footer-col a { color: var(--mist); font-size: .92rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
	display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between;
	margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-cool);
	color: var(--mist); font-size: .8rem;
}
.footer-disclaimer { max-width: 70ch; }

/* ---------------------------------------------------------------- *
 *  404
 * ---------------------------------------------------------------- */
.center-stage { flex: 1; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }
.center-stage .code { font-family: var(--serif); font-size: clamp(4rem, 14vw, 8rem); color: var(--brass); line-height: 1; }

/* ---------------------------------------------------------------- *
 *  RESPONSIVE
 * ---------------------------------------------------------------- */
@media (max-width: 860px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
	.nav-toggle { display: inline-flex; }
	.nav {
		position: absolute; top: 72px; right: 0; left: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: rgba(11,16,38,.97); border-bottom: 1px solid var(--line);
		padding: .4rem 0; display: none;
	}
	.nav.is-open { display: flex; }
	.nav a { padding: .85rem clamp(1.1rem, 4vw, 2.4rem); }
	.nav a:hover::after, .nav .current-menu-item > a::after { display: none; }
	.footer-grid { grid-template-columns: 1fr; }
}

/* Accessibilité : mouvement réduit */
@media (prefers-reduced-motion: reduce) {
	.armilla { animation: none; }
	html { scroll-behavior: auto; }
}

/* Focus clavier visible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 2px solid var(--brass-soft); outline-offset: 2px; border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 100;
	background: var(--brass); color: var(--ink); padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: var(--ink); }

/* ============================================================
   Mode parchemin — skin clair coordonné.
   S'active automatiquement quand l'extension passe le widget
   en .astrarium--parchment : tout le thème adopte alors une
   palette « vieux papier » pour rester cohérent.
   ============================================================ */
body:has(.astrarium--parchment) {
	color: #3a3018;
	background-color: #e8dcc2;
	background-image:
		radial-gradient(120% 90% at 50% -20%, #f4eeda 0%, transparent 55%),
		radial-gradient(80% 60% at 100% 0%, rgba(201,162,75,.10) 0%, transparent 50%),
		linear-gradient(180deg, #ece1c8 0%, #dcccab 100%);
}
body:has(.astrarium--parchment) .sky { display: none; }

body:has(.astrarium--parchment) .site-header {
	background: linear-gradient(180deg, rgba(236,225,200,.92), rgba(236,225,200,.55));
	border-bottom-color: rgba(120,95,40,.22);
}
body:has(.astrarium--parchment) .brand__name,
body:has(.astrarium--parchment) .footer-brand .brand__name {
	background: linear-gradient(100deg, #6a5320, #9c7d2f 55%, #b8923f);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
body:has(.astrarium--parchment) .brand__mark { color: #9c7d2f; }
body:has(.astrarium--parchment) .brand__tag,
body:has(.astrarium--parchment) .nav a { color: #6b5a38; }
body:has(.astrarium--parchment) .nav a:hover,
body:has(.astrarium--parchment) .nav .current-menu-item > a { color: #2a2212; }
body:has(.astrarium--parchment) .nav-toggle { color: #3a3018; border-color: rgba(120,95,40,.3); }

body:has(.astrarium--parchment) .hero__eyebrow,
body:has(.astrarium--parchment) .entry__eyebrow { color: #9c7d2f; }
body:has(.astrarium--parchment) .hero__title,
body:has(.astrarium--parchment) .entry__title { color: #2f2614; }
body:has(.astrarium--parchment) .hero__title em { color: #9c7d2f; }
body:has(.astrarium--parchment) .hero__lede { color: #5d4e30; }
body:has(.astrarium--parchment) .armilla { color: #6a5320; opacity: .06; }

body:has(.astrarium--parchment) .prose { color: #3a3018; }
body:has(.astrarium--parchment) .prose h2 { color: #2f2614; }
body:has(.astrarium--parchment) .prose h3 { color: #9c7d2f; }
body:has(.astrarium--parchment) .prose strong { color: #2a2212; }
body:has(.astrarium--parchment) .prose blockquote { color: #6b5a38; }
body:has(.astrarium--parchment) a { color: #3c5488; }
body:has(.astrarium--parchment) a:hover { color: #9c7d2f; }
body:has(.astrarium--parchment) .entry__meta { color: #6b5a38; border-top-color: rgba(120,95,40,.22); }

body:has(.astrarium--parchment) .site-footer {
	background: linear-gradient(180deg, transparent, rgba(210,193,160,.5));
	border-top-color: rgba(120,95,40,.22);
}
body:has(.astrarium--parchment) .footer-blurb,
body:has(.astrarium--parchment) .footer-col a,
body:has(.astrarium--parchment) .footer-bottom { color: #6b5a38; }
body:has(.astrarium--parchment) .footer-col a:hover { color: #2a2212; }
body:has(.astrarium--parchment) .footer-col h4 { color: #9c7d2f; }
body:has(.astrarium--parchment) .footer-bottom { border-top-color: rgba(120,95,40,.18); }
