/*
Theme Name: philosophIAI
Template: air-pro
Description: Peau d'Air Pro pour philosophiai.com : « penser avant le jour ». Le ciel passe de la nuit au lever du soleil au fil de la page ; Literata et Martian Mono. Trois langues sans extension (français, anglais, espagnol), lexique, bibliothèque, « Humain ou machine ? », plan du site en constellation, audience sans cookie. 120 pages et 21 essais importés à l'activation.
Author: Julien Morthier
Version: 1.4.3
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: philosophiai
*/

/* =====================================================================
   philosophIAI — ce que theme.json ne sait pas exprimer
   (chargé sur le site ET dans l'éditeur)

   Concept : « penser avant le jour ». Chaque section porte un style
   « Ciel : … » ; sur le site, un calque fixe passe d'un ciel à l'autre
   au défilement. Dans l'éditeur (et sans JavaScript), chaque section
   montre son propre dégradé.
   ===================================================================== */

/* ---------------------------------------------------------------- encres */

:root {
	--pa-ink: #16143a;
	--pa-ink-soft: #4d4c6b;
	--pa-ink-faint: rgba(22, 20, 58, 0.16);
	--pa-accent: #3a3592;
	--pa-on-accent: #eef0f6;
	--pa-a: linear-gradient(180deg, #d5733f 0%, #a2508a 55%, #4b3fae 100%);
	--pa-a-dark: linear-gradient(180deg, #ffd2ad 0%, #f4b183 45%, #b88ad0 100%);
	--pa-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--pa-mono: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	--pa-titres: var(--wp--preset--font-family--titres, Georgia, serif);
}

html[data-ink="light"],
.is-style-pa-ciel-nuit,
.is-style-pa-ciel-aube-astronomique,
.is-style-pa-ciel-aube-nautique,
.is-style-pa-ciel-aube-civile {
	--pa-ink: #e8e6f4;
	--pa-ink-soft: #aeadc2;
	--pa-ink-faint: rgba(232, 230, 244, 0.2);
	--pa-accent: #f4b183;
	--pa-on-accent: #03040d;
	--pa-a: var(--pa-a-dark);
}

html[data-ink="dark"],
.is-style-pa-ciel-lever,
.is-style-pa-ciel-jour {
	--pa-ink: #16143a;
	--pa-ink-soft: #4d4c6b;
	--pa-ink-faint: rgba(22, 20, 58, 0.16);
	--pa-accent: #3a3592;
	--pa-on-accent: #eef0f6;
	--pa-a: linear-gradient(180deg, #d5733f 0%, #a2508a 55%, #4b3fae 100%);
}

/* ---------------------------------------------------------------- ciels (styles de groupe) */

[class*="is-style-pa-ciel-"] {
	color: var(--pa-ink);
}
.is-style-pa-ciel-nuit { background: linear-gradient(180deg, #03040d 0%, #03040d 18%, #0a0c22 100%); }
.is-style-pa-ciel-aube-astronomique { background: linear-gradient(180deg, #050719 0%, #050719 18%, #14173b 100%); }
.is-style-pa-ciel-aube-nautique { background: linear-gradient(180deg, #09102f 0%, #09102f 18%, #2c336c 100%); }
.is-style-pa-ciel-aube-civile { background: linear-gradient(180deg, #132055 0%, #132055 18%, #5d5893 100%); }
.is-style-pa-ciel-lever { background: linear-gradient(180deg, #8ea6cf 0%, #8ea6cf 18%, #f0c5a3 100%); }
.is-style-pa-ciel-jour { background: #eef0f6; }

/* Sur le site, le calque fixe peint le ciel : les sections deviennent transparentes. */
html.pa-sky-on [class*="is-style-pa-ciel-"] { background: transparent; }

/* Section « plein écran » (hauteur minimale réglée dans l'éditeur) : contenu centré verticalement. */
.alignfull[class*="is-style-pa-ciel-"][style*="min-height"] {
	display: grid;
	align-content: center;
}

/* Liens et filets suivent l'encre de la section. */
[class*="is-style-pa-ciel-"] a:where(:not(.wp-element-button)) { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
[class*="is-style-pa-ciel-"] a:where(:not(.wp-element-button)):hover { color: var(--pa-accent); }
[class*="is-style-pa-ciel-"] .wp-block-separator { color: var(--pa-ink-faint); border-color: var(--pa-ink-faint); }

/* Boutons pleins : couleur d'accent de la section. */
[class*="is-style-pa-ciel-"] .wp-block-button:not([class*="is-style-pa-"]) .wp-element-button {
	background: var(--pa-accent);
	color: var(--pa-on-accent);
}

/* ---------------------------------------------------------------- calque du ciel (site) */

.pa-sky {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	display: none;
}
html.pa-sky-on .pa-sky { display: block; }
.pa-sky > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.pa-sky__gradient { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-top) 18%, var(--sky-horizon) 100%); }
.pa-sky__glow {
	background: radial-gradient(ellipse 90% 55% at 50% 108%, var(--sky-glow) 0%, color-mix(in oklab, var(--sky-glow) 40%, transparent) 40%, transparent 75%);
}
.pa-sky__stars { opacity: var(--stars, 0); }

/* Lever du soleil (page d'accueil, voir sky.js) : le voile d'aurore, une lueur rasante sur
   l'horizon, le disque, puis les nuages (dessinés dans des canevas). */
.pa-sky > .pa-sky__aurora {
	opacity: 0;
	background: linear-gradient(0deg,
		rgba(255, 200, 112, 0.95) 0%,
		rgba(255, 146, 92, 0.82) 9%,
		rgba(244, 118, 132, 0.6) 22%,
		rgba(196, 116, 170, 0.38) 38%,
		rgba(130, 108, 190, 0.16) 56%,
		rgba(110, 100, 190, 0) 72%);
}
.pa-sky > .pa-sky__clouds { opacity: 0; will-change: transform, opacity; }
.pa-sky > .pa-sky__dawn {
	opacity: 0;
	background:
		radial-gradient(ellipse 70% 14% at 50% 100%, rgba(255, 196, 140, 0.85) 0%, rgba(255, 160, 120, 0.35) 45%, transparent 100%),
		radial-gradient(ellipse 120% 30% at 50% 100%, rgba(255, 170, 150, 0.35) 0%, transparent 70%);
}
.pa-sky > .pa-sky__sun {
	inset: 0 auto auto 0;
	width: clamp(96px, 15vmin, 180px);
	height: clamp(96px, 15vmin, 180px);
	border-radius: 50%;
	opacity: 0;
	background: radial-gradient(circle closest-side, var(--sun-core, #fffef9) 0%, var(--sun-core, #fffef9) 55%, var(--sun-rim, #ffe6b0) 100%);
	box-shadow:
		0 0 18px 2px var(--sun-rim, #ffe6b0),
		0 0 90px 30px color-mix(in oklab, var(--sun-rim, #ffe6b0) 55%, transparent),
		0 0 320px 40px color-mix(in oklab, var(--sun-rim, #ffe6b0) 24%, transparent);
	will-change: transform;
}

/* ---------------------------------------------------------------- logotype */

.pa-logo {
	display: inline-flex;
	align-items: baseline;
	white-space: nowrap;
	line-height: 1;
	margin: 0;
	color: inherit;
	font-weight: 400;
}
/* Sélecteurs doublés : plus forts que les styles de titres d'Astra (site et éditeur). */
.pa-logo.pa-logo { color: inherit; font-weight: 400; letter-spacing: 0; text-transform: none; }
.pa-logo.pa-logo--hero { font-size: clamp(3.25rem, 1.5rem + 9vw, 11rem); line-height: 1; padding-block: 2.4rem 2.6rem; margin: 0; }
.pa-logo.pa-logo--moyen { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: 1; }
.pa-logo.pa-logo--small { font-size: 1.35rem; }
.pa-logo__philo {
	font-family: var(--pa-titres);
	font-style: italic;
	letter-spacing: -0.02em;
}
.pa-logo__iai {
	position: relative;
	display: inline-flex;
	font-family: var(--pa-mono);
	font-size: 0.68em;
	font-weight: 250;
	font-stretch: 100%;
	font-style: normal;
	letter-spacing: 0;
	margin-left: 0.04em;
}
.pa-logo--small .pa-logo__iai { font-weight: 400; }
.pa-logo__a {
	background: var(--pa-a);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
/* Accolades : chaque lettre mono fait exactement 1ch. IA au-dessus, AI en dessous. */
.pa-logo__brace {
	position: absolute;
	width: 2ch;
	height: 0.12em;
	border: 1px solid var(--pa-ink-soft);
	transform: scaleX(0);
	animation: pa-brace 1.2s var(--pa-ease) forwards;
}
.pa-logo__brace--ia { left: 0; top: -0.2em; border-bottom: 0; transform-origin: left; animation-delay: 0.6s; }
.pa-logo__brace--ai { left: 1ch; bottom: -0.16em; border-top: 0; transform-origin: right; animation-delay: 1.1s; }
.pa-logo__label {
	position: absolute;
	font-size: 0.6875rem;
	font-stretch: 87.5%;
	letter-spacing: 0.04em;
	color: var(--pa-ink-soft);
	white-space: nowrap;
	opacity: 0;
	animation: pa-fade 0.8s ease forwards;
}
.pa-logo__brace--ia .pa-logo__label { left: -1px; bottom: calc(100% + 0.7rem); animation-delay: 1.2s; }
.pa-logo__brace--ai .pa-logo__label { right: -1px; top: calc(100% + 0.7rem); animation-delay: 1.7s; }
@keyframes pa-brace { to { transform: scaleX(1); } }
@keyframes pa-fade { to { opacity: 1; } }

/* ---------------------------------------------------------------- styles de blocs : texte */

.is-style-pa-surtitre {
	font-family: var(--pa-mono);
	font-size: var(--wp--preset--font-size--etiquette);
	font-stretch: 87.5%;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.5;
}
.is-style-pa-surtitre a { text-decoration: none; }
.is-style-pa-chapo,
.is-style-pa-chapo-extrait {
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.42;
	color: var(--pa-ink-soft);
	max-width: 46ch;
}
.is-style-pa-chapo-extrait .wp-block-post-excerpt__excerpt { margin: 0; }
.is-style-pa-chapo-extrait .wp-block-post-excerpt__more-text { display: none; }
.is-style-pa-these {
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: var(--wp--preset--font-size--tres-grand);
	line-height: 1.18;
	max-width: 20ch;
}
.is-style-pa-note {
	font-style: italic;
	font-size: var(--wp--preset--font-size--petit);
	line-height: 1.55;
	color: var(--pa-ink-soft);
	max-width: 46ch;
}
.is-style-pa-signature {
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
	line-height: 1;
}
.pa-doux { color: var(--pa-ink-soft); }
.pa-accent { color: var(--pa-accent); }
.pa-filet-bas { padding-bottom: 0.9rem; border-bottom: 1px solid currentColor; }
.pa-filet-haut { padding-top: 1.5rem; border-top: 1px solid var(--pa-ink-faint); }

/* ---------------------------------------------------------------- styles de blocs : titres */

.is-style-pa-question {
	font-style: italic;
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.015em;
	max-width: 22ch;
}
/* Dans une colonne de lecture (mise en page contrainte), la question garde l'alignement du texte. */
.is-layout-constrained > .is-style-pa-question { max-width: var(--wp--style--global--content-size); }
.is-style-pa-question:not([class*="-font-size"]) { font-size: var(--wp--preset--font-size--enorme); }
.is-style-pa-titre-page,
.is-style-pa-titre-section {
	font-style: italic;
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.02em;
	max-width: 18ch;
}
.is-style-pa-titre-page:not([class*="-font-size"]),
.is-style-pa-titre-section:not([class*="-font-size"]) { font-size: var(--wp--preset--font-size--enorme); }
.is-style-pa-angle {
	font-family: var(--pa-mono);
	font-weight: 200;
	font-stretch: 75%;
	font-style: normal;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}
.is-style-pa-angle:not([class*="-font-size"]) { font-size: clamp(3rem, 2rem + 4vw, 6.5rem); }

/* ---------------------------------------------------------------- styles de blocs : listes, citations */

.is-style-pa-carnet {
	list-style: none;
	padding-left: 0;
}
.is-style-pa-carnet li {
	margin: 0;
	padding-block: 1rem;
	border-bottom: 1px solid var(--pa-ink-faint);
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: 1.2rem;
	line-height: 1.3;
}
.is-style-pa-liens { list-style: none; padding-left: 0; }
.is-style-pa-liens li { margin-block: 0.35rem; font-size: var(--wp--preset--font-size--petit); }
.is-style-pa-liens a { text-decoration: none; }
.is-style-pa-liens a:hover { text-decoration: underline; text-decoration-color: var(--pa-accent); }
.is-style-pa-references { list-style: none; padding-left: 0; }
.is-style-pa-references li { margin: 0; padding-block: 0.6rem; border-bottom: 1px solid var(--pa-ink-faint); font-size: var(--wp--preset--font-size--petit); }

.wp-block-quote.is-style-pa-citation {
	border: 0;
	padding: 0;
	max-width: 30ch;
	margin-inline: auto;
	text-align: center;
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: var(--wp--preset--font-size--enorme);
	line-height: 1.12;
}
.wp-block-quote.is-style-pa-citation cite {
	display: block;
	margin-top: 2rem;
	font-family: var(--pa-mono);
	font-style: normal;
	font-size: var(--wp--preset--font-size--etiquette);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pa-ink-soft);
}

/* ---------------------------------------------------------------- styles de blocs : boutons, séparateur, carte */

.wp-block-button.is-style-pa-fleche .wp-block-button__link,
.wp-block-button.is-style-pa-fleche-bas .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.4em 0;
	background: transparent;
	color: inherit;
	border-radius: 0;
	border-bottom: 1px solid var(--pa-ink-faint);
	transition: border-color 0.3s, gap 0.3s var(--pa-ease);
}
.wp-block-button.is-style-pa-fleche .wp-block-button__link::after { content: "→"; font-family: var(--pa-titres); font-size: 1.2em; }
.wp-block-button.is-style-pa-fleche-bas .wp-block-button__link::after { content: "↓"; font-family: var(--pa-titres); font-size: 1.2em; }
.wp-block-button.is-style-pa-fleche .wp-block-button__link:hover,
.wp-block-button.is-style-pa-fleche-bas .wp-block-button__link:hover { border-color: var(--pa-accent); gap: 0.9em; }
.wp-block-button.is-style-pa-discret .wp-block-button__link {
	padding: 0.4em 0;
	background: transparent;
	color: var(--pa-ink-soft);
	font-family: var(--wp--preset--font-family--texte);
	font-style: italic;
	font-size: var(--wp--preset--font-size--petit);
	letter-spacing: 0;
	text-transform: none;
	border-radius: 0;
}
.wp-block-button.is-style-pa-discret .wp-block-button__link:hover { color: var(--pa-ink); text-decoration: underline; text-decoration-color: var(--pa-accent); }

.wp-block-separator.is-style-pa-horizon:not(.is-style-wide):not(.is-style-dots) {
	border: 0;
	border-top: 1px solid var(--pa-ink-faint);
	width: 100%;
	max-width: none;
	opacity: 1;
}

.wp-block-group.is-style-pa-carte {
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--pa-ink-faint);
	border-radius: 2px;
	background: color-mix(in oklab, currentColor 3%, transparent);
}

/* ---------------------------------------------------------------- liste des essais (boucle de requête) */

.pa-liste-essais { border-top: 1px solid var(--pa-ink); }
.pa-liste-essais > li { border-bottom: 1px solid var(--pa-ink-faint); margin: 0; }
.pa-ligne-essai {
	padding-block: var(--wp--preset--spacing--40);
	grid-template-columns: minmax(8rem, 1fr) minmax(0, 2.6fr) minmax(0, 0.9fr) !important;
	align-items: baseline;
}
.pa-ligne-essai .wp-block-post-date { color: var(--pa-ink-soft); }
.pa-ligne-essai .wp-block-post-title { font-style: italic; margin: 0; }
.pa-ligne-essai .wp-block-post-title a { text-decoration: none; }
.pa-ligne-essai .wp-block-post-title a:hover { color: var(--pa-accent); }
.pa-extrait { color: var(--pa-ink-soft); font-size: var(--wp--preset--font-size--petit); max-width: 58ch; }
.pa-extrait .wp-block-post-excerpt__more-text { display: none; }
.pa-ligne-essai .wp-block-post-terms { justify-self: end; text-align: right; color: var(--pa-ink-soft); }
.pa-ligne-essai .wp-block-post-terms a { text-decoration: none; }
@media (max-width: 781px) {
	.pa-ligne-essai { grid-template-columns: 1fr !important; }
	.pa-ligne-essai .wp-block-post-terms { justify-self: start; text-align: left; }
}

/* ---------------------------------------------------------------- rubriques : lexique, bibliothèque */

body .is-style-pa-question a,
body.pa-site .entry-content .is-style-pa-question a {
	text-decoration-line: underline;
	text-decoration-color: var(--pa-ink-faint);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}
body .is-style-pa-question a:hover,
body.pa-site .entry-content .is-style-pa-question a:hover { color: var(--pa-accent); text-decoration-color: currentColor; }
.pa-rayon { border-top: 1px solid var(--pa-ink); }
.pa-rayon > .pa-livre { margin: 0; }
.pa-livre {
	padding-block: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--pa-ink-faint);
	grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 2fr) minmax(0, 2fr) !important;
	align-items: baseline;
}
.pa-livre h3 { margin: 0; }
@media (max-width: 781px) {
	.pa-livre { grid-template-columns: 1fr !important; }
}

/* Sous chaque essai : notions et lectures liées (ajoutées par le thème). */
.pa-plus-loin {
	padding: 0 var(--wp--preset--spacing--gouttiere) var(--wp--preset--spacing--70);
	color: var(--pa-ink);
}
.pa-plus-loin__inner,
body.pa-site .entry-content .pa-plus-loin > .pa-plus-loin__inner {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--pa-ink-faint);
}
.pa-plus-loin__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--30);
}
.pa-plus-loin__cols .is-style-pa-surtitre { margin: 0 0 0.6rem; }
.pa-plus-loin ul { margin: 0; }

/* ---------------------------------------------------------------- humain ou machine ? */

.pa-fragment > .is-style-pa-these {
	max-width: 34ch;
	font-size: clamp(1.4rem, 1rem + 1.3vw, 2rem);
	line-height: 1.38;
}
.pa-vote { max-width: 34rem; color: var(--pa-ink); }
.pa-vote__question {
	margin: 0 0 1.1rem;
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: var(--wp--preset--font-size--moyen);
}
.pa-vote__choices { display: grid; gap: 0.6rem; }
body .pa-vote .pa-vote__choice,
body .pa-vote .pa-vote__choice:hover,
body .pa-vote .pa-vote__choice:focus {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 0.95rem 1.3rem;
	overflow: hidden;
	border: 1px solid var(--pa-ink-faint);
	border-radius: 99px;
	background: transparent;
	box-shadow: none;
	color: var(--pa-ink);
	font-family: var(--pa-mono);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s;
}
body .pa-vote:not(.is-done) .pa-vote__choice:hover,
body .pa-vote .pa-vote__choice:focus-visible { border-color: var(--pa-accent); }
body .pa-vote .pa-vote__choice:focus-visible { outline: 2px solid var(--pa-accent); outline-offset: 3px; }
body .pa-vote .pa-vote__choice:disabled { cursor: default; opacity: 1; }
.pa-vote__bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: color-mix(in oklab, var(--pa-ink) 13%, transparent);
	transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pa-vote.is-done .pa-vote__bar { width: var(--share, 0%); }
.pa-vote__label, .pa-vote__share { position: relative; }
.pa-vote__share { font-variant-numeric: tabular-nums; }
body .pa-vote .pa-vote__choice.is-mine { border-color: var(--pa-accent); }
.pa-vote__choice.is-mine .pa-vote__bar { background: color-mix(in oklab, var(--pa-accent) 34%, transparent); }
.pa-vote.is-busy { opacity: 0.6; }
.pa-vote__status {
	min-height: 1.4em;
	margin: 1rem 0 0;
	color: var(--pa-ink-soft);
	font-family: var(--pa-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.pa-vote__never {
	margin: 0.4rem 0 0;
	color: var(--pa-ink-soft);
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: var(--wp--preset--font-size--petit);
}
.pa-vote--apercu .pa-vote__choice { cursor: default; }
@media (prefers-reduced-motion: reduce) {
	.pa-vote__bar { transition: none; }
}

/* ---------------------------------------------------------------- plan du site : constellation */

.pa-constellation { color: var(--pa-ink); }
.pa-constellation__list { columns: 15rem; column-gap: var(--wp--preset--spacing--50); padding: 0; list-style: none; }
.pa-constellation__list > li { break-inside: avoid; margin-bottom: var(--wp--preset--spacing--30); }
.pa-constellation__list ul { list-style: none; padding: 0; margin: 0.4rem 0 0; font-size: var(--wp--preset--font-size--petit); }
.pa-constellation__section { font-family: var(--pa-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pa-constellation.is-drawn > .pa-constellation__list { display: none; }
.pa-constellation__tabs { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
body .pa-constellation .pa-constellation__tab,
body .pa-constellation .pa-constellation__tab:hover,
body .pa-constellation .pa-constellation__tab:focus {
	margin: 0;
	padding: 0.3rem 0;
	border: 0;
	border-bottom: 1px solid transparent;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--pa-ink-soft);
	font-family: var(--pa-mono);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}
body .pa-constellation .pa-constellation__tab:hover { color: var(--pa-ink); }
body .pa-constellation .pa-constellation__tab[aria-selected="true"] { color: var(--pa-ink); border-bottom-color: var(--pa-accent); }
body .pa-constellation .pa-constellation__tab:focus-visible { outline: 2px solid var(--pa-accent); outline-offset: 3px; }
.pa-constellation__sky { margin-block: var(--wp--preset--spacing--30); }
.pa-constellation__sky svg { display: block; width: 100%; height: auto; overflow: visible; }
.pa-c-line { stroke: var(--pa-ink); stroke-opacity: 0.14; stroke-width: 1; transition: stroke-opacity 0.4s; }
.pa-c-line--child { stroke-opacity: 0.07; }
.pa-c-line--child.is-active { stroke-opacity: 0.32; }
.pa-c-core { fill: var(--pa-ink); }
.pa-c-home { fill: var(--pa-ink); font-family: var(--pa-titres); font-style: italic; font-size: 26px; }
.pa-c-section { cursor: pointer; }
.pa-c-halo { fill: var(--pa-ink); fill-opacity: 0.06; transition: fill-opacity 0.3s; }
.pa-c-star { fill: var(--pa-ink); transition: fill 0.3s; }
.pa-c-label { fill: var(--pa-ink-soft); font-family: var(--pa-mono); font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; transition: fill 0.3s; }
.pa-c-section:hover .pa-c-halo, .pa-c-section.is-active .pa-c-halo { fill: #f4b183; fill-opacity: 0.18; }
.pa-c-section.is-active .pa-c-star { fill: #f4b183; filter: drop-shadow(0 0 6px #f4b183); }
.pa-c-section:hover .pa-c-label, .pa-c-section.is-active .pa-c-label { fill: var(--pa-ink); }
.pa-c-hit { fill: transparent; }
.pa-c-dot { fill: var(--pa-ink); opacity: 0.45; transition: opacity 0.4s, r 0.3s; animation: pa-scintille 11s ease-in-out infinite; }
.pa-c-child.is-active .pa-c-dot { opacity: 1; r: 3.2; }
.pa-c-child:hover .pa-c-dot { fill: #f4b183; r: 4.5; }
.pa-c-tip { fill: var(--pa-ink); font-family: var(--pa-titres); font-style: italic; font-size: 19px; opacity: 0; pointer-events: none; transition: opacity 0.2s; paint-order: stroke; stroke: var(--sky-top, #03040d); stroke-width: 6px; stroke-linejoin: round; }
.pa-c-tip.is-on { opacity: 1; }
@keyframes pa-scintille { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.2; } }
.pa-constellation__panel { min-height: 6rem; border-top: 1px solid var(--pa-ink-faint); padding-top: var(--wp--preset--spacing--30); }
.pa-constellation__head { margin: 0 0 0.8rem; }
.pa-constellation__open { font-family: var(--pa-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
body.pa-site .entry-content .pa-constellation__pages { margin-left: 0; }
.pa-constellation__pages { columns: 14rem; column-gap: var(--wp--preset--spacing--40); list-style: none; padding: 0; margin: 0; }
.pa-constellation__pages li { break-inside: avoid; padding-block: 0.2rem; font-size: var(--wp--preset--font-size--petit); }
body.pa-site .entry-content .pa-constellation a { text-decoration: none; }
body.pa-site .entry-content .pa-constellation__pages a:hover,
body.pa-site .entry-content .pa-constellation__open:hover { color: var(--pa-accent); }
@media (max-width: 640px) {
	.pa-c-label, .pa-c-home { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pa-c-dot { animation: none; }
}
.pa-constellation--apercu { padding: var(--wp--preset--spacing--40); border: 1px dashed var(--pa-ink-faint); }

/* Vignettes du plan : un morceau de ciel (bloc Couverture), son horizon et son soleil
   à la hauteur de la phase. Remplaçables par une image dans l'éditeur. */
.wp-block-cover.pa-vignette { border-radius: 2px; overflow: hidden; color: #e8e6f4; border: 1px solid var(--pa-ink-faint); }
.wp-block-cover.pa-vignette.is-light { color: #16143a; }
.wp-block-cover.pa-vignette .is-style-pa-angle { margin: 0; color: inherit; position: relative; }
/* Astra impose une couleur claire dans les couvertures : la vignette garde la sienne. */
body.pa-site .entry-content .wp-block-cover.pa-vignette.pa-vignette .wp-block-cover__inner-container { color: inherit; }
.pa-vignette .wp-block-cover__background::before {
	content: "";
	position: absolute;
	inset: 68% 0 auto;
	border-top: 1px solid rgba(232, 230, 244, 0.3);
}
.pa-vignette.is-light .wp-block-cover__background::before { border-top-color: rgba(22, 20, 58, 0.2); }
.pa-vignette .wp-block-cover__background::after {
	content: "";
	position: absolute;
	left: var(--astre-x, 70%);
	top: var(--astre-y, 80%);
	width: 160px;
	height: 160px;
	margin: -80px 0 0 -80px;
	border-radius: 50%;
	background: radial-gradient(circle, #fff1d8 0 13%, rgba(255, 196, 140, 0.55) 22%, rgba(255, 170, 120, 0.18) 42%, rgba(255, 170, 120, 0) 70%);
	opacity: var(--astre-o, 1);
}
.pa-vignette--questions { --astre-y: 96%; --astre-o: 0.35; }
.pa-vignette--essays { --astre-y: 88%; --astre-o: 0.55; }
.pa-vignette--lexicon { --astre-y: 78%; --astre-o: 0.8; }
.pa-vignette--library { --astre-y: 68%; }
.pa-vignette--manifesto { --astre-y: 24%; }
.pa-vignette--hom { --astre-x: 76%; --astre-y: 28%; }
.pa-vignette--hom .wp-block-cover__background::after {
	background: radial-gradient(circle, #eceaf6 0 9%, rgba(236, 234, 246, 0.16) 16%, rgba(236, 234, 246, 0) 40%);
}

/* ---------------------------------------------------------------- jauge du soleil (site) */

.pa-gauge {
	position: fixed;
	right: clamp(1rem, 2vw, 2rem);
	top: 50%;
	z-index: 40;
	transform: translateY(-50%);
	display: none;
	color: var(--pa-ink);
	font-family: var(--pa-mono);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.pa-gauge__readout { display: grid; justify-items: end; gap: 0.15rem; margin: 0 0 1.5rem; }
.pa-gauge__deg { font-size: 1.05rem; font-weight: 300; font-variant-numeric: tabular-nums; }
.pa-gauge__phase { font-size: 0.625rem; font-stretch: 75%; color: var(--pa-ink-soft); }
.pa-gauge__scale { position: relative; height: min(44vh, 26rem); width: 10rem; margin-left: auto; }
.pa-gauge__scale::before { content: ""; position: absolute; right: 4px; top: 0; bottom: 0; width: 1px; background: var(--pa-ink-faint); }
.pa-gauge ol { list-style: none; padding: 0; margin: 0; }
.pa-gauge li { position: absolute; right: 0; top: calc(var(--pos) * 100%); transform: translateY(-50%); }
.pa-gauge a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding-block: 0.3rem;
	text-decoration: none;
	font-size: 0.625rem;
	font-stretch: 75%;
	color: var(--pa-ink-soft);
}
.pa-gauge__name { opacity: 0; transform: translateX(4px); transition: opacity 0.3s, transform 0.3s var(--pa-ease); }
.pa-gauge__tick { width: 9px; height: 1px; background: currentColor; }
.pa-gauge .is-horizon .pa-gauge__tick { width: 18px; margin-right: -9px; }
.pa-gauge a:hover, .pa-gauge a:focus-visible, .pa-gauge li.is-active a { color: var(--pa-ink); }
.pa-gauge a:hover .pa-gauge__name, .pa-gauge a:focus-visible .pa-gauge__name, .pa-gauge li.is-active .pa-gauge__name { opacity: 1; transform: none; }
.pa-gauge__sun {
	position: absolute;
	right: 0;
	top: calc(var(--sun-pos, 1) * 100%);
	width: 9px;
	height: 9px;
	margin-top: -4.5px;
	border-radius: 50%;
	background: #f4b183;
	box-shadow: 0 0 calc(6px + var(--sun-glow, 0) * 18px) calc(var(--sun-glow, 0) * 4px) #f4b183;
}
.pa-pill {
	position: fixed;
	left: clamp(1rem, 0.5rem + 2.5vw, 3rem);
	bottom: 1rem;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--pa-ink-faint);
	border-radius: 99px;
	background: color-mix(in oklab, var(--sky-top) 60%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--pa-ink);
	font-family: var(--pa-mono);
	font-size: 0.625rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}
.pa-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: #f4b183; box-shadow: 0 0 calc(4px + var(--sun-glow, 0) * 10px) #f4b183; }
@media (min-width: 1280px) {
	.pa-gauge { display: block; }
	.pa-pill { display: none; }
	/* Réserve la marge droite pour la jauge. */
	body:has(.pa-gauge) .alignfull[class*="is-style-pa-ciel-"] > .alignwide { max-width: min(var(--wp--style--global--wide-size), calc(100vw - 22rem)); }
}

/* ---------------------------------------------------------------- Līlā, le jeu (sky.js, page d'accueil) */

.pa-lila {
	--lila-x: 0;
	position: fixed;
	left: clamp(1rem, 0.5rem + 2.5vw, 3rem);
	bottom: 3.6rem; /* au-dessus de la pastille du soleil */
	z-index: 41;
	display: flex;
	align-items: center;
	gap: 0.55em;
	margin: 0;
	padding: 0.45rem 0.95rem 0.45rem 0.8rem;
	border: 1px solid rgba(244, 177, 131, 0.45);
	border-radius: 99px;
	background: color-mix(in oklab, var(--sky-top) 55%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #e8e6f4;
	font-family: var(--pa-mono);
	font-size: 0.625rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0;
	transform: translate(var(--lila-x), 0.75rem);
	transition: opacity 0.9s var(--pa-ease), transform 0.9s var(--pa-ease), border-color 0.3s, box-shadow 0.3s;
}
.pa-lila.is-in { opacity: 1; transform: translate(var(--lila-x), 0); }
.pa-lila.is-in.is-away { opacity: 0; pointer-events: none; transform: translate(var(--lila-x), 0.75rem); }
.pa-lila__spark { display: inline-block; color: #f4b183; animation: pa-lila-spark 2.4s ease-in-out infinite; }
.pa-lila__name { font-family: var(--pa-titres); font-size: 1rem; font-style: italic; letter-spacing: 0; text-transform: none; }
.pa-lila__hint { color: #aeadc2; }
.pa-lila:hover, .pa-lila:focus-visible { border-color: #f4b183; box-shadow: 0 0 18px rgba(244, 177, 131, 0.35); }
.pa-lila[aria-pressed="true"] { border-color: #f4b183; box-shadow: 0 0 22px rgba(244, 177, 131, 0.4), inset 0 0 12px rgba(244, 177, 131, 0.15); }
.pa-lila[aria-pressed="true"] .pa-lila__spark { animation-duration: 1.1s; }
@keyframes pa-lila-spark {
	0%, 100% { opacity: 0.75; transform: scale(1) rotate(0deg); }
	50% { opacity: 1; transform: scale(1.35) rotate(45deg); }
}
/* En mode jeu, le ciel vide se vise ; le texte et les liens gardent leur curseur. */
html.pa-lila-on body { cursor: crosshair; }
html.pa-lila-on :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption) { cursor: auto; }
html.pa-lila-on :is(a, button, summary, label) { cursor: pointer; }
@media (min-width: 1280px) {
	.pa-lila { --lila-x: -50%; left: 50%; bottom: 1.25rem; }
}

/* ---------------------------------------------------------------- mouvement réduit */

@media (prefers-reduced-motion: reduce) {
	.pa-logo__brace { animation: none; transform: none; }
	.pa-logo__label { animation: none; opacity: 1; }
}

/* ---------------------------------------------------------------- astres des rubriques (inc/astres.php) */

.pa-has-astre { position: relative; overflow: clip; }
.pa-has-astre > :not(.pa-astre) { position: relative; z-index: 1; }
.pa-astre {
	position: absolute;
	z-index: 0;
	top: 50%;
	right: max(var(--wp--preset--spacing--gouttiere, 4vw), calc((100vw - var(--wp--style--global--wide-size, 1200px)) / 2));
	width: min(28vw, 400px);
	margin: 0;
	color: var(--pa-ink);
	--pa-astre: var(--pa-accent);
	opacity: var(--astre-o, 0.14);
	transform: translateY(calc(-50% + var(--astre-y, 0px)));
	pointer-events: none;
}
.pa-astre svg { display: block; width: 100%; height: auto; overflow: visible; }
.pa-astre figcaption {
	max-width: 32ch;
	margin: 0.25rem auto 0;
	text-align: center;
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--pa-ink-soft);
}
.pa-astre__nom {
	display: block;
	margin-bottom: 0.3rem;
	font-family: var(--pa-titres);
	font-style: italic;
	font-size: 1.3rem;
	color: var(--pa-ink);
}
/* Astra ombre les figures des articles : pas celle-ci. */
body.pa-site .pa-astre { box-shadow: none; background: none; }
@media (max-width: 899px) { .pa-astre { display: none; } }

/* Accueil : la phrase claire, juste sous le logo. */
body.pa-site .entry-content .pa-phrase-claire { max-width: 38ch; }

/* =====================================================================
   Intégration avec le socle Air Pro (remplace l'intégration Astra)
   ===================================================================== */

/* Le ciel est derrière tout : le corps de page est transparent. */
html.pa-sky-on body,
html.pa-sky-on .wp-site-blocks { background: transparent; }
html.pa-sky-on { background: var(--sky-top); }
body.pa-site { color: var(--pa-ink); }

/* Contenu : les sections pleine largeur vont bord à bord ; un contenu ordinaire a ses marges. */
.pa-principal { margin-block: 0; }
.pa-principal > .entry-content > .alignfull { margin-block: 0; }
body:not(.pa-full) .pa-principal {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--gouttiere);
}
.pa-entete-contenu { margin-bottom: var(--wp--preset--spacing--40); }
.pa-entete-contenu .wp-block-post-featured-image { margin-top: var(--wp--preset--spacing--40); }
.pa-pied-contenu {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--pa-ink-faint);
	font-family: var(--pa-mono);
	font-size: var(--wp--preset--font-size--etiquette);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.pa-pied-contenu a { text-decoration: none; }
.pa-liste .wp-block-post-title a { text-decoration: none; }
.pa-liste .wp-block-post-date { font-family: var(--pa-mono); font-size: var(--wp--preset--font-size--etiquette); color: var(--pa-ink-soft); }
.pa-principal-introuvable .pa-introuvable { padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--gouttiere); text-align: center; }

/* En-tête : collant (option Air Pro « ap-collant »), translucide sur le ciel, encre suivant la luminosité.
   Sélecteur renforcé : plus fort que le fond uni que le socle donne aux en-têtes collants. */
.ap-entete.ap-collant.pa-entete:not(.has-background) {
	padding: 0.85rem var(--wp--preset--spacing--gouttiere);
	background: color-mix(in oklab, var(--sky-top, #eef0f6) 55%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	border-bottom: 1px solid var(--pa-ink-faint);
	color: var(--pa-ink);
	transition: border-color 0.6s ease;
}
.pa-entete .wp-block-site-title { margin: 0; }
.pa-entete .wp-block-site-title a,
.pa-entete .wp-block-site-title a:hover { color: var(--pa-ink); text-decoration: none; }

.pa-entete .pa-nav { gap: 0.25rem 1.6rem; }
.pa-entete .pa-nav .wp-block-navigation-item__content {
	font-family: var(--pa-mono);
	font-size: var(--wp--preset--font-size--etiquette);
	font-stretch: 87.5%;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pa-ink-soft);
	text-decoration: none;
	transition: color 0.3s;
}
.pa-entete .pa-nav .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.pa-entete .pa-nav .current-menu-item > .wp-block-navigation-item__content,
.pa-entete .pa-nav .pa-lang-current > .wp-block-navigation-item__content { color: var(--pa-ink); }
.pa-entete .pa-nav .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--pa-accent);
	text-underline-offset: 0.6em;
}
/* Sélecteur de langue : séparé du menu par un filet, entrées serrées. */
.pa-entete .pa-nav .pa-lang + .pa-lang { margin-left: -1.1rem; }
.pa-entete .pa-nav .pa-lang-first { padding-left: 1.6rem; border-left: 1px solid var(--pa-ink-faint); }

/* Menu mobile (☰ de WordPress) : bouton à l'encre du ciel, panneau couleur du ciel. */
.pa-entete .wp-block-navigation__responsive-container-open,
.pa-entete .wp-block-navigation__responsive-container-close { color: var(--pa-ink); }
.pa-entete .wp-block-navigation__responsive-container.is-menu-open {
	background: color-mix(in oklab, var(--sky-top, #eef0f6) 94%, transparent);
	color: var(--pa-ink);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--gouttiere);
}
.pa-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1.4rem; }
.pa-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 0.85rem; }
.pa-entete .wp-block-navigation__responsive-container.is-menu-open .pa-lang + .pa-lang { margin-left: 0; }
.pa-entete .wp-block-navigation__responsive-container.is-menu-open .pa-lang-first {
	padding: 1.4rem 0 0; border-left: 0; border-top: 1px solid var(--pa-ink-faint);
}
.pa-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container:has(.pa-lang) { row-gap: 1.4rem; }

/* Pied de page (bloc synchronisé de la langue). */
.pa-site-footer > .alignfull { margin: 0; }

/* Typographie : titres en Literata légère, liens à l'encre de la section. */
body.pa-site :where(h1, h2, h3, h4, h5, h6) { font-weight: 400; color: inherit; }
:where(body.pa-site .entry-content) a:where(:not(.wp-element-button)) { color: inherit; }
body.pa-site .pa-accent { color: var(--pa-accent); }
body.pa-site .pa-doux { color: var(--pa-ink-soft); }
body.pa-site .is-style-pa-angle { font-family: var(--pa-mono); font-weight: 200; font-stretch: 75%; }
body.pa-site .is-style-pa-surtitre a,
body.pa-site .pa-ligne-essai a,
body.pa-site .is-style-pa-liens a { text-decoration: none; }
body.pa-site .wp-block-button.is-style-pa-discret .wp-block-button__link {
	font-family: var(--wp--preset--font-family--texte);
	font-size: var(--wp--preset--font-size--petit);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}
body.pa-site :is(.is-style-pa-carnet, .is-style-pa-liens, .is-style-pa-references, .pa-liste-essais) { padding-left: 0; }
