/* ==========================================================================
   Thilelli — feuille de style
   Principe : beaucoup d'air, un trait fin, le rouge en ponctuation.
   Les motifs sont inspirés des tatouages kabyles traditionnels et
   appliqués en masques CSS : ils prennent la couleur du texte ou du rouge.
   ========================================================================== */

:root {
	--r: var(--wp--preset--color--rouge, #9E1F1B);
	--rv: var(--wp--preset--color--rouge-vif, #B7322C);
	--encre: var(--wp--preset--color--encre, #3A2A28);
	--nuit: var(--wp--preset--color--nuit, #2A1D1B);
	--sable: var(--wp--preset--color--sable, #E9E2D6);
	--ecru: var(--wp--preset--color--ecru, #F5F1EA);
	--blanc: var(--wp--preset--color--blanc, #FBF9F5);
	--line: color-mix(in srgb, var(--encre) 15%, transparent);
	--line-soft: color-mix(in srgb, var(--encre) 9%, transparent);
	--muted: color-mix(in srgb, var(--encre) 72%, var(--ecru));
	--ease: cubic-bezier(.2, .7, .1, 1);
	--serif: var(--wp--preset--font-family--cormorant, 'Cormorant Garamond', Georgia, serif);
	--sans-titre: var(--wp--preset--font-family--montserrat, Montserrat, sans-serif);
	--m: url(../img/motifs/);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
::selection { background: var(--r); color: var(--ecru); }
:focus-visible { outline: 1.5px solid var(--r); outline-offset: 3px; }
img { height: auto; }

/* Grain de papier très léger sur tout le site */
body::before {
	content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .16 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wp-site-blocks { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */

/* L'italique des titres bascule dans la Cormorant : c'est la signature. */
:is(h1, h2, h3, .wp-block-post-title) em {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -.01em;
	color: var(--r);
	font-size: 1.1em;
	line-height: 1;
}
.has-nuit-background-color :is(h1, h2, h3) em,
.has-encre-background-color :is(h1, h2, h3) em { color: color-mix(in srgb, var(--rv) 55%, var(--ecru)); }

.is-style-surtitre {
	font-family: var(--sans-titre);
	font-size: .72rem !important;
	font-weight: 600;
	letter-spacing: .26em;
	text-transform: uppercase;
	line-height: 1.5;
	color: var(--r);
	display: flex; align-items: center; gap: .9rem;
}
.is-style-surtitre::before { content: ""; width: 2.2rem; height: 1px; background: currentColor; flex: none; }
.is-style-surtitre.has-text-align-center { justify-content: center; }
.is-style-surtitre.has-text-align-center::after { content: ""; width: 2.2rem; height: 1px; background: currentColor; flex: none; }
.has-nuit-background-color .is-style-surtitre,
.has-encre-background-color .is-style-surtitre { color: color-mix(in srgb, var(--rv) 45%, var(--ecru)); }

.is-style-chapo {
	font-family: var(--serif);
	font-style: italic;
	font-size: clamp(1.35rem, 2.2vw, 1.65rem);
	line-height: 1.45;
	color: var(--encre);
}
.is-style-tifinagh, .th-tifinagh {
	font-family: var(--wp--preset--font-family--tifinagh);
	letter-spacing: .35em;
	color: var(--r);
}

.th-muted { color: var(--muted); }

/* --------------------------------------------------------------------------
   Motifs (masques)
   Ajouter la classe th-m-<nom> à n'importe quel bloc : le motif se place au-dessus.
   -------------------------------------------------------------------------- */
[class*="th-m-"]::before {
	content: ""; display: block;
	width: var(--mi, 2.6rem); height: var(--mi, 2.6rem);
	margin-bottom: 1.4rem;
	background: var(--mc, var(--r));
	-webkit-mask: var(--mu) center / contain no-repeat;
	        mask: var(--mu) center / contain no-repeat;
	transition: transform .8s var(--ease);
}
.th-m-losange   { --mu: url(../img/motifs/losange.svg); }
.th-m-chevrons  { --mu: url(../img/motifs/chevrons.svg); }
.th-m-palme     { --mu: url(../img/motifs/palme.svg); }
.th-m-croix     { --mu: url(../img/motifs/croix.svg); }
.th-m-points    { --mu: url(../img/motifs/points.svg); }
.th-m-triangles { --mu: url(../img/motifs/triangles.svg); }
.th-m-siyala    { --mu: url(../img/motifs/siyala.svg); }
.has-nuit-background-color [class*="th-m-"],
.has-encre-background-color [class*="th-m-"] { --mc: color-mix(in srgb, var(--rv) 50%, var(--ecru)); }
.has-text-align-center[class*="th-m-"]::before,
.is-content-justification-center[class*="th-m-"]::before { margin-inline: auto; }

/* Séparateurs */
.wp-block-separator { border: 0 !important; height: 1px; background: var(--line); opacity: 1; }
.wp-block-separator.is-style-losange,
.wp-block-separator.is-style-frise {
	height: 16px; width: 100%; max-width: 240px !important; margin-inline: auto !important;
	background: var(--r) !important; opacity: .8;
	-webkit-mask: url(../img/motifs/sep-losange.svg) center / 240px 16px no-repeat;
	        mask: url(../img/motifs/sep-losange.svg) center / 240px 16px no-repeat;
}
.wp-block-separator.is-style-frise {
	max-width: none !important; height: 14px; opacity: .55;
	-webkit-mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
	        mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
}
.th-frise {
	height: 14px; background: var(--r); opacity: .5;
	-webkit-mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
	        mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
}

/* Arche : pour les photos (bloc image > style « Arche ») et les groupes */
.is-style-arche img, .wp-block-group.is-style-arche { border-radius: 100vmax 100vmax 0 0; overflow: hidden; }
.is-style-arche img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.wp-element-button, .wp-block-button__link {
	transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: var(--encre); border: 1px solid var(--line); box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--r); color: var(--r); background: transparent; }
.wp-block-button.is-style-trait .wp-block-button__link {
	background: none; color: var(--encre); padding: .4rem 0; border-radius: 0;
	background-image: linear-gradient(var(--r), var(--r)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
}
.wp-block-button.is-style-trait .wp-block-button__link::after { content: " →"; color: var(--r); transition: margin .35s var(--ease); }
.wp-block-button.is-style-trait .wp-block-button__link:hover { color: var(--r); }
.wp-block-button.is-style-trait .wp-block-button__link:hover::after { margin-left: .35rem; }
.has-nuit-background-color .wp-block-button.is-style-trait .wp-block-button__link { color: var(--ecru); }

/* Lien fléché discret */
.th-lien a, a.th-lien {
	font-family: var(--sans-titre); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
	color: var(--encre); padding-bottom: .3rem; border-bottom: 1px solid var(--r);
	transition: color .3s var(--ease), padding .3s var(--ease);
}
.th-lien a:hover, a.th-lien:hover { color: var(--r); padding-right: .4rem; }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.th-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--ecru) 86%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	        backdrop-filter: blur(14px) saturate(1.2);
	transition: box-shadow .4s var(--ease);
}
.admin-bar .th-header { top: var(--wp-admin--admin-bar--height, 32px); }
.th-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.th-header__inner { padding-block: .9rem; }
.th-header .wp-block-site-logo img { width: 54px; height: 54px; transition: width .4s var(--ease), height .4s var(--ease); }
.th-header.is-scrolled .wp-block-site-logo img { width: 44px; height: 44px; }
.th-brand { gap: .9rem !important; }
.th-brand .wp-block-site-title a { color: var(--encre); }
.th-brand__sub { font-size: .7rem !important; margin: .1rem 0 0 !important; line-height: 1 !important; opacity: .9; }

.th-header .wp-block-navigation a { color: var(--encre); position: relative; padding-block: .35rem; }
.th-header .wp-block-navigation .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 50%; bottom: -2px; width: 5px; height: 5px;
	background: var(--r); transform: translateX(-50%) rotate(45deg) scale(0); transition: transform .35s var(--ease);
}
.th-header .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.th-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after { transform: translateX(-50%) rotate(45deg) scale(1); }
.th-header .wp-block-navigation__container { gap: clamp(1.1rem, 2.2vw, 2.2rem); }
.th-header .wp-block-buttons .wp-block-button__link { padding: .85rem 1.3rem; font-size: .7rem; }
.th-header .th-frise { opacity: .28; height: 12px; }

/* Menu mobile */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--ecru) !important; padding: 2rem clamp(1.25rem, 6vw, 3rem) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.4rem !important; font-size: 1.05rem; align-items: flex-start !important;
}
.wp-block-navigation__responsive-container-open svg, .wp-block-navigation__responsive-container-close svg { fill: var(--encre); }
@media (max-width: 781px) {
	.th-header .wp-block-buttons { display: none; }
	.th-brand__sub { display: none; }
}

/* --------------------------------------------------------------------------
   Héros
   -------------------------------------------------------------------------- */
.th-hero { position: relative; overflow: hidden; }
.th-hero__cols { align-items: center !important; gap: clamp(2rem, 6vw, 6rem) !important; }
.th-hero h1 { font-weight: 300; letter-spacing: -.035em; line-height: 1.02; margin-block: 1.6rem 1.8rem !important; }
.th-hero h1 strong { font-weight: 500; }
.th-hero__lede { max-width: 34rem; font-size: 1.08rem; color: var(--muted); }
.th-hero__lede .th-tifinagh { letter-spacing: .15em; font-size: .95em; white-space: nowrap; }
.th-hero__art { position: relative; }
.th-hero__art img { width: 100%; max-width: 440px; margin-inline: auto; display: block; }
.th-hero__art figcaption {
	text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.02rem !important;
	color: var(--muted); margin-top: 1.1rem; letter-spacing: 0;
}
.th-hero__tifinagh {
	position: absolute; top: 50%; right: clamp(-1.5rem, -1vw, 0rem); transform: translateY(-50%);
	writing-mode: vertical-rl; font-size: .85rem !important; opacity: .55; margin: 0 !important;
}
.th-hero__meta { border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 5.5rem) !important; padding-top: 1.4rem; }
.th-hero__meta p { font-family: var(--sans-titre); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.th-hero__meta p strong { color: var(--r); font-weight: 600; }
@media (max-width: 781px) {
	.th-hero__art img { max-width: 230px; }
	.th-hero__tifinagh { display: none; }
	.th-hero__meta { flex-direction: column; align-items: flex-start !important; gap: .6rem !important; }
}

/* --------------------------------------------------------------------------
   Azul — introduction
   -------------------------------------------------------------------------- */
.th-azul__mot {
	font-family: var(--serif); font-style: italic; font-weight: 400;
	font-size: clamp(4.5rem, 11vw, 9rem) !important; line-height: .9 !important; color: var(--r);
	margin: 0 !important; letter-spacing: -.02em;
}
.th-azul__texte { font-family: var(--sans-titre); font-weight: 300; font-size: clamp(1.35rem, 2.4vw, 1.95rem) !important; line-height: 1.45 !important; letter-spacing: -.01em; }
.th-azul__texte strong { font-weight: 500; }

/* --------------------------------------------------------------------------
   Portes d'entrée (grille)
   -------------------------------------------------------------------------- */
.th-portes { gap: 0 !important; border-top: 1px solid var(--line); }
.th-porte {
	padding: clamp(2rem, 3.5vw, 3rem) clamp(1.25rem, 2.5vw, 2.4rem) clamp(2.2rem, 3.5vw, 3rem) !important;
	border-bottom: 1px solid var(--line); position: relative; transition: background-color .5s var(--ease);
}
.th-porte:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.th-porte:hover { background: color-mix(in srgb, var(--sable) 55%, transparent); }
.th-porte:hover [class*="th-m-"]::before, .th-porte:hover[class*="th-m-"]::before { transform: rotate(45deg) scale(.9); }
.th-porte__num { font-family: var(--sans-titre); font-size: .7rem !important; letter-spacing: .2em; color: var(--muted); margin: 0 !important; position: absolute; top: clamp(2rem, 3.5vw, 3rem); right: clamp(1.25rem, 2.5vw, 2.4rem); }
.th-porte h3 { font-size: 1.35rem !important; font-weight: 500; margin-block: 0 .7rem !important; }
.th-porte p:not(.th-porte__num):not(.th-lien) { color: var(--muted); font-size: .96rem; line-height: 1.7; }
.th-porte .th-lien { margin-top: 1.4rem !important; }
@media (max-width: 1000px) {
	.th-portes { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.th-porte:not(:nth-child(3n)) { border-right: 0; }
	.th-porte:nth-child(odd) { border-right: 1px solid var(--line); }
}
@media (max-width: 640px) {
	.th-portes { grid-template-columns: 1fr !important; }
	.th-porte:nth-child(odd) { border-right: 0; }
}

/* --------------------------------------------------------------------------
   Le langage des signes (section sombre)
   -------------------------------------------------------------------------- */
.th-signes { position: relative; overflow: hidden; }
.th-signes, .th-signes p, .th-signes h2, .th-signes h3 { color: var(--ecru); }
.th-signes::after {
	content: ""; position: absolute; right: 3%; top: 10%; width: 90px; height: 450px; opacity: .07;
	background: var(--ecru);
	-webkit-mask: url(../img/motifs/siyala.svg) top center / 100% auto no-repeat;
	        mask: url(../img/motifs/siyala.svg) top center / 100% auto no-repeat;
	pointer-events: none;
}
.th-signes .th-muted, .th-signes .is-style-chapo { color: color-mix(in srgb, var(--ecru) 72%, var(--nuit)); }
.th-lexique { gap: 0 !important; border-top: 1px solid color-mix(in srgb, var(--ecru) 16%, transparent); }
.th-signe {
	padding: 2.2rem 1.4rem 1.2rem 0 !important; position: relative;
	--mi: 3.4rem;
}
.th-signe:not(:last-child)::after { content: ""; position: absolute; right: .7rem; top: 2.2rem; bottom: 1rem; width: 1px; background: color-mix(in srgb, var(--ecru) 12%, transparent); }
.th-signe h3 { font-family: var(--serif) !important; font-style: italic; font-weight: 400 !important; font-size: 1.7rem !important; letter-spacing: 0 !important; margin: 0 0 .5rem !important; }
.th-signe p { font-size: .9rem !important; line-height: 1.65; color: color-mix(in srgb, var(--ecru) 70%, var(--nuit)) !important; margin: 0 !important; }
.th-signe [class*="th-m-"]::before, .th-signe[class*="th-m-"]::before { transition: transform 1.2s var(--ease); }
.th-signe:hover[class*="th-m-"]::before { transform: rotate(180deg); }
.th-signes .th-note { font-family: var(--serif); font-style: italic; font-size: 1.1rem !important; color: color-mix(in srgb, var(--ecru) 60%, var(--nuit)) !important; }
@media (max-width: 1000px) {
	.th-lexique { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.th-signe::after { display: none; }
	.th-signe { border-bottom: 1px solid color-mix(in srgb, var(--ecru) 10%, transparent); padding-bottom: 2rem !important; }
}
@media (max-width: 520px) { .th-lexique { grid-template-columns: 1fr !important; } }

/* --------------------------------------------------------------------------
   Journal — cartes d'articles
   -------------------------------------------------------------------------- */
.th-cartes .wp-block-post-template { gap: clamp(1.5rem, 3vw, 2.6rem) !important; }
.th-carte { height: 100%; }
.th-carte__cover {
	position: relative; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 1.5rem !important;
	background-color: var(--sable);
	border-radius: 100vmax 100vmax 0 0;
}
/* Couverture de repli : un motif, quand l'article n'a pas d'image */
.th-carte__cover::before {
	content: ""; position: absolute; inset: 22% 32%; background: var(--r); opacity: .7;
	-webkit-mask: url(../img/motifs/siyala.svg) center / contain no-repeat;
	        mask: url(../img/motifs/siyala.svg) center / contain no-repeat;
	transition: transform 1.2s var(--ease);
}
.wp-block-post:nth-child(3n+2) .th-carte__cover::before { -webkit-mask-image: url(../img/motifs/losange.svg); mask-image: url(../img/motifs/losange.svg); inset: 34%; }
.wp-block-post:nth-child(3n+3) .th-carte__cover::before { -webkit-mask-image: url(../img/motifs/palme.svg); mask-image: url(../img/motifs/palme.svg); inset: 30%; }
.th-carte__cover .wp-block-post-featured-image { position: absolute; inset: 0; margin: 0 !important; z-index: 1; }
.th-carte__cover .wp-block-post-featured-image :is(a, img) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s var(--ease); }
.th-carte:hover .th-carte__cover img { transform: scale(1.04); }
.th-carte:hover .th-carte__cover::before { transform: scale(1.08); }
.th-carte .wp-block-post-terms a { color: var(--r); }
.th-carte .wp-block-post-title { font-size: 1.45rem !important; font-weight: 500 !important; line-height: 1.22 !important; margin-block: .6rem .7rem !important; }
.th-carte .wp-block-post-title a { color: var(--encre); background-image: linear-gradient(var(--r), var(--r)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .6s var(--ease); }
.th-carte:hover .wp-block-post-title a { background-size: 100% 1px; }
.th-carte .wp-block-post-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.th-carte .wp-block-post-excerpt__excerpt { margin: 0; }
.th-carte .wp-block-post-date { color: var(--muted); }

/* --------------------------------------------------------------------------
   Agenda
   -------------------------------------------------------------------------- */
.th-agenda { border-top: 1px solid var(--line); }
.th-evt {
	border-bottom: 1px solid var(--line); padding-block: 1.8rem !important;
	gap: clamp(1rem, 4vw, 3.5rem) !important; align-items: center !important;
	transition: padding .45s var(--ease), background-color .45s var(--ease);
}
.th-evt:hover { padding-inline: 1rem !important; background: color-mix(in srgb, var(--sable) 50%, transparent); }
.th-evt__date { min-width: 6.5rem; }
.th-evt__jour { font-family: var(--sans-titre); font-weight: 300; font-size: 3rem !important; line-height: 1 !important; margin: 0 !important; letter-spacing: -.04em; color: var(--r); }
.th-evt__mois { font-family: var(--sans-titre); font-size: .68rem !important; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin: .45rem 0 0 !important; color: var(--muted); }
.th-evt__corps { flex: 1; }
.th-evt__corps h3 { font-size: 1.35rem !important; margin: 0 0 .35rem !important; font-weight: 500; }
.th-evt__corps p { margin: 0 !important; color: var(--muted); font-size: .95rem; }
.th-evt__tag { font-family: var(--sans-titre); font-size: .66rem !important; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--r); border: 1px solid color-mix(in srgb, var(--r) 35%, transparent); padding: .45rem .8rem; margin: 0 !important; white-space: nowrap; }
@media (max-width: 700px) {
	.th-evt { flex-wrap: wrap !important; }
	.th-evt__corps { flex-basis: calc(100% - 8rem); }
	.th-evt__tag { margin-left: 7.5rem !important; }
}

/* --------------------------------------------------------------------------
   Manifeste
   -------------------------------------------------------------------------- */
.th-manifeste { text-align: center; }
.th-manifeste__siyala { width: 22px; height: 110px; margin: 0 auto 2.6rem !important; background: var(--r);
	-webkit-mask: url(../img/motifs/siyala.svg) center / contain no-repeat; mask: url(../img/motifs/siyala.svg) center / contain no-repeat; }
.th-manifeste blockquote, .th-manifeste__citation {
	font-family: var(--serif) !important; font-style: italic; font-weight: 400;
	font-size: clamp(1.9rem, 4.2vw, 3.3rem) !important; line-height: 1.22 !important; letter-spacing: -.01em;
	max-width: 22ch; margin-inline: auto !important; color: var(--encre);
}
.th-manifeste__signature { font-family: var(--sans-titre); font-size: .7rem !important; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------------------
   Adhérer
   -------------------------------------------------------------------------- */
.th-adherer__panneau { position: relative; overflow: hidden; }
.th-adherer__panneau::after {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--r); opacity: .35;
	-webkit-mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
	        mask: url(../img/motifs/frise.svg) left center / 64px 14px repeat-x;
	pointer-events: none;
}
.th-adherer__panneau > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.th-footer { position: relative; overflow: hidden; }
.th-footer, .th-footer p, .th-footer a, .th-footer h2, .th-footer h3 { color: color-mix(in srgb, var(--ecru) 82%, var(--nuit)); }
.th-footer a:hover { color: var(--ecru); }
.th-footer h3 { font-size: .7rem !important; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: color-mix(in srgb, var(--rv) 45%, var(--ecru)) !important; margin-bottom: 1.2rem !important; }
.th-footer__filigrane {
	position: absolute; left: 50%; bottom: -.15em; transform: translateX(-50%); white-space: nowrap; margin: 0 !important;
	font-family: var(--wp--preset--font-family--tifinagh); font-size: clamp(6rem, 20vw, 17rem) !important; line-height: 1 !important;
	letter-spacing: .08em; color: var(--ecru) !important; opacity: .035; pointer-events: none; user-select: none;
}
.th-footer .th-frise { background: var(--ecru); opacity: .14; }
.th-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .95rem; }
.th-footer__bas p { font-size: .78rem !important; opacity: .7; }
.th-footer .wp-block-site-logo img { filter: none; }
.th-footer .th-footer__azul { font-family: var(--serif); font-style: italic; font-size: 1.6rem !important; line-height: 1.3; color: var(--ecru) !important; }

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */
.th-article-tete { text-align: center; }
.th-article-tete .wp-block-post-title { font-weight: 300 !important; letter-spacing: -.03em; line-height: 1.06; max-width: 18ch; margin-inline: auto !important; }
.th-article-tete .wp-block-post-excerpt { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.45; color: var(--muted); max-width: 36rem; margin-inline: auto; }
.th-article-tete .wp-block-post-terms a { color: var(--r); }
.th-article-meta { color: var(--muted); }
.th-article-meta > * + *::before { content: "◆"; font-size: .45rem; color: var(--r); margin-right: 1rem; vertical-align: .2em; }
.th-article-image img { width: 100%; max-height: 78vh; object-fit: cover; }

.th-prose { font-size: 1.1rem; line-height: 1.85; }
.th-prose > p:first-child:not(.is-style-chapo)::first-letter {
	font-family: var(--serif); font-weight: 500; float: left; font-size: 5.1em; line-height: .78;
	margin: .08em .12em 0 -.02em; color: var(--r);
}
.th-prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem) !important; font-weight: 400; margin-top: 3.2rem !important; }
.th-prose h3 { font-size: 1.35rem !important; margin-top: 2.4rem !important; }
.th-prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; text-decoration-color: color-mix(in srgb, var(--r) 40%, transparent); }
.th-prose blockquote.wp-block-quote {
	border-left: 1px solid var(--r); padding: .2rem 0 .2rem 2rem; margin-block: 2.6rem !important;
}
.th-prose blockquote.wp-block-quote cite { font-family: var(--sans-titre); font-style: normal; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.th-prose .wp-block-pullquote { border: 0; padding: 3rem 0; text-align: center; position: relative; }
.th-prose .wp-block-pullquote::before { content: ""; display: block; width: 36px; height: 36px; margin: 0 auto 1.6rem; background: var(--r);
	-webkit-mask: url(../img/motifs/losange.svg) center / contain no-repeat; mask: url(../img/motifs/losange.svg) center / contain no-repeat; }
.th-prose .wp-block-separator { margin-block: 3.4rem !important; }
.th-prose ul { padding-left: 1.2rem; }
.th-prose li::marker { color: var(--r); content: "◆  "; font-size: .6em; }
.th-prose figure figcaption { text-align: center; }
.th-prose .wp-block-image.alignwide, .th-prose .wp-block-image.alignfull { margin-block: 3rem; }

.th-encadre {
	background: var(--sable); padding: 2rem 2.2rem !important; position: relative; margin-block: 2.6rem !important;
}
.th-encadre::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--r); }
.th-encadre p { font-size: 1rem; }

/* Navigation entre articles */
.th-article-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.th-article-nav a { font-family: var(--sans-titre); font-weight: 500; color: var(--encre); }
.th-article-nav a:hover { color: var(--r); }

/* --------------------------------------------------------------------------
   Titre de page / archives
   -------------------------------------------------------------------------- */
.th-page-tete h1 { font-weight: 300; letter-spacing: -.03em; }
.th-page-tete .wp-block-term-description, .th-page-tete .th-muted { max-width: 38rem; }
.wp-block-query-pagination { font-family: var(--sans-titre); font-size: .8rem; letter-spacing: .12em; }
.wp-block-query-pagination a { color: var(--encre); }
.wp-block-query-pagination .current { color: var(--r); }

/* --------------------------------------------------------------------------
   Formulaires (recherche, commentaires)
   -------------------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea {
	background: var(--blanc); border: 1px solid var(--line); border-radius: 0; padding: .9rem 1rem; font: inherit; color: var(--encre);
	transition: border-color .3s var(--ease);
}
input:focus, textarea:focus { border-color: var(--r); outline: none; }
.wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; gap: .5rem; }

/* --------------------------------------------------------------------------
   Apparition au défilement (uniquement si JS actif et mouvement autorisé)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.js .th-reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
	.js .th-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

/* Éditeur : on montre tout */
.editor-styles-wrapper .th-reveal { opacity: 1 !important; transform: none !important; }
.editor-styles-wrapper::before, .block-editor-iframe__body::before { display: none; }

/* Liste à losanges */
.th-liste { list-style: none; padding: 0 !important; margin: 0; }
.th-liste li { padding: .75rem 0 .75rem 1.6rem; border-bottom: 1px solid var(--line-soft); position: relative; font-size: .98rem; }
.th-liste li::before { content: ""; position: absolute; left: .15rem; top: 1.28rem; width: 6px; height: 6px; border: 1px solid var(--r); transform: rotate(45deg); }

/* FAQ */
.th-faq { border-bottom: 1px solid var(--line); padding: 0 !important; margin: 0 !important; }
.th-faq:first-of-type { border-top: 1px solid var(--line); margin-top: 2.4rem !important; }
.th-faq summary { list-style: none; cursor: pointer; padding: 1.4rem 2.5rem 1.4rem 0; position: relative; font-family: var(--sans-titre); font-weight: 500; font-size: 1.1rem; }
.th-faq summary::-webkit-details-marker { display: none; }
.th-faq summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 9px; height: 9px; border: 1px solid var(--r); transform: translateY(-50%) rotate(45deg); transition: background-color .3s var(--ease); }
.th-faq[open] summary::after { background: var(--r); }
.th-faq p { color: var(--muted); padding-bottom: 1.4rem; margin: 0; max-width: 44rem; }

/* Décalages d'apparition et petite taille de motif */
.th-d1 { --d: .1s; } .th-d2 { --d: .2s; } .th-d3 { --d: .3s; } .th-d4 { --d: .4s; }
.th-mi-s { --mi: 1.8rem; }

/* --------------------------------------------------------------------------
   Illustrations « carnet de voyage »
   Le papier blanc du dessin se fond dans l'écru du site (multiply),
   et les bords s'évanouissent pour éviter l'effet « photo collée ».
   -------------------------------------------------------------------------- */
.th-illu img { mix-blend-mode: multiply; display: block; width: 100%; height: auto; }
.th-illu figcaption, .th-credit { font-family: var(--serif); font-style: italic; font-size: .92rem !important; color: var(--muted); text-align: center; margin-top: .8rem; }
.th-illu--fondu img {
	aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 45%;
	-webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 58%, transparent 100%);
	        mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 58%, transparent 100%);
}
.th-illu--arche img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 100vmax 100vmax 0 0; mix-blend-mode: multiply; }
.th-illu--arche { max-width: 340px; }
.th-bandeau .th-illu { margin-inline: auto; }
.th-prose .wp-block-image figcaption { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); }
@media (max-width: 781px) { .th-illu--arche { max-width: 260px; margin-inline: auto; } }

/* Articles des séries : appels de note et sources */
.th-prose sup.th-note { font-family: var(--sans-titre); font-size: .62em; font-weight: 600; color: var(--r); margin-left: .05em; }
.th-prose .th-sources { font-size: .9rem; line-height: 1.6; color: var(--muted); }
.th-prose h2 + .wp-block-list, .th-prose .th-sources + .wp-block-list { font-size: .95rem; }
.th-porte h3 a { color: inherit; }
.th-porte h3 a:hover { color: var(--r); }

/* --------------------------------------------------------------------------
   Motifs tracés au défilement (voir assets/js/thilelli.js)
   Sans JavaScript, les motifs restent affichés en masques CSS.
   -------------------------------------------------------------------------- */
.th-trace { display: block; overflow: visible; color: var(--mc, var(--r)); }
.th-trace path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.th-trace circle { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; }

.th-m-js::before { display: none !important; }
.th-trace--icone { width: var(--mi, 2.6rem); height: var(--mi, 2.6rem); margin-bottom: 1.4rem; transition: transform .8s var(--ease); }
.th-trace--icone path { stroke-width: 1.5; }
.has-text-align-center > .th-trace--icone, .is-content-justification-center > .th-trace--icone { margin-inline: auto; }
.th-porte:hover .th-trace--icone { transform: rotate(45deg) scale(.92); }
.th-signe .th-trace--icone { width: 3.4rem; height: 3.4rem; }
.th-signe:hover .th-trace--icone { transform: rotate(180deg); transition-duration: 1.2s; }

hr.th-sep-js { display: none !important; }
.th-trace--sep { width: 240px; max-width: 70%; height: 16px; margin: 3.2rem auto; opacity: .85; }
.th-trace--sep path { stroke-width: 1.1; }

.th-siyala-js { background: none !important; -webkit-mask: none !important; mask: none !important; }
.th-trace--siyala { width: 100%; height: 100%; }

/* Fil de lecture : colonne de motifs discrète, à gauche, sur grand écran */
.th-fil { position: fixed; left: clamp(10px, 1.6vw, 26px); top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; opacity: .55; }
.th-fil .th-trace--fil { width: 14px; height: auto; }
.th-fil .th-trace--fil[viewBox="0 0 48 48"] { width: 16px; height: 16px; }
.th-fil .th-trace--fil[viewBox="0 0 24 120"] { height: 70px; }
.th-fil path { stroke-width: 1.2; }
@media (max-width: 1180px) { .th-fil { display: none; } }

/* Grands motifs décoratifs tracés au défilement */
.th-signes::after { display: none; }
.th-trace--deco { position: absolute; pointer-events: none; z-index: 0; }
.th-trace--deco path { stroke-width: 1; }
.th-trace--deco-droite { right: 4%; top: 12%; width: 70px; height: 350px; color: var(--ecru); opacity: .14; }
.th-trace--deco-coin { right: -60px; bottom: -60px; width: 280px; height: 280px; color: var(--r); opacity: .1; }
.th-trace--deco-footer { right: 6%; top: 18%; width: 140px; height: 140px; color: var(--ecru); opacity: .08; }
.th-signes > *:not(.th-trace), .th-footer > *:not(.th-trace):not(.th-footer__filigrane) { position: relative; z-index: 1; }
@media (max-width: 781px) { .th-trace--deco-droite { display: none; } }

/* Cartes « portes » illustrées */
.th-porte__img { margin: calc(-1 * clamp(1rem, 2vw, 1.6rem)) calc(-1 * clamp(.4rem, 1vw, .8rem)) 1.2rem !important; }
.th-porte__img img { aspect-ratio: 4 / 3; object-fit: cover; mix-blend-mode: multiply; transition: transform 1.4s var(--ease);
	-webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 60%, transparent 100%); }
.th-porte:hover .th-porte__img img { transform: scale(1.04); }
.th-porte h3[class*="th-m-"] { display: flex; align-items: center; gap: .8rem; }
.th-porte h3 .th-trace--icone { width: 1.9rem; height: 1.9rem; margin: 0; flex: none; }
.th-porte h3[class*="th-m-"]::before { width: 1.9rem; height: 1.9rem; margin: 0; flex: none; }
.th-porte__num { z-index: 2; }

/* Photos et galeries des actualités */
.th-prose .wp-block-image img, .th-prose .wp-block-gallery img { border-radius: 2px; }
.th-prose .wp-block-gallery { margin-block: 2.4rem !important; gap: .8rem !important; }
.th-prose .wp-block-gallery.is-cropped .wp-block-image img { aspect-ratio: 4 / 3; }
.th-prose .th-illu img { mix-blend-mode: multiply; border-radius: 0; }
.th-article-image.th-illu img, .th-carte__cover .th-illu img { mix-blend-mode: multiply; }

/* Les dessins (tout sauf les actualités photo) se fondent dans le papier */
body.single-post:not(.in-cat-actualites) .th-article-image img { mix-blend-mode: multiply; }
.th-cartes .wp-block-post:not(.category-actualites) .th-carte__cover img { mix-blend-mode: multiply; }
