/*
	Theme Name: Essentiel
	Description: Offre Essentiel d'atelier f28 : un site d'une page sur le parent atelierf28.
	Template: atelierf28
	Text Domain: essentiel
	Domain Path: /languages
	Version: 1.0
	Last update : 25.11.26
*/

/* ================================================================
   CLIENT — la seule partie qui change d'un client à l'autre.
   Couleurs, police (fichier dans assets/fonts/, aussi préchargé
   dans functions.php). La page A4 du programme les lit ici.
================================================================ */
@font-face {
	font-family: 'Manrope';
	src: url('assets/fonts/Manrope-VariableFont_wght.woff2') format('woff2');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--color-main: #26302c;      /* texte */
	--color-dark: #1e2824;      /* fond sombre, barre du menu, pied de page */
	--color-primary: #2f5d50;   /* titres, liens, boutons — 4.5:1 au moins sur blanc */
	--color-secondary: #e2a93b; /* accent : survol des boutons, surtitres sur fond sombre */
	--color-lightgray: #eef2ee; /* fond clair */
	--color-light: #ffffff;
	--typo-title: 'Manrope', system-ui, sans-serif;
	--typo-main: 'Manrope', system-ui, sans-serif;
}
/* ================================================================
   FIN DU BLOC CLIENT
================================================================ */


/* === VARIABLES === */
:root {
	--color-ink: color-mix(in srgb, var(--color-primary) 78%, #000);
	--color-focus: var(--color-primary);
	--color-on-dark: color-mix(in srgb, var(--color-secondary) 75%, var(--color-light));
	--fw-title-bold: 800;
	--fw-title-extrabold: 800;
	--letter-spacing-md: 0;
	--fs-title-xxl: clamp(2.3rem, 6.5vw, 4.6rem);
	--fs-title-xl: clamp(1.6rem, 3.4vw, 2.5rem);
	--fs-title-lg: clamp(1.3rem, 2.3vw, 1.8rem);
	--fs-title-md: clamp(1.1rem, 1.6vw, 1.3rem);
	--fs-xl: var(--fs-md);
	--fs-lg: var(--fs-md);
	--fs-md: 1rem;
	--fs-sm: 0.9rem;
	--fs-xs: var(--fs-sm);
	--fs-xxs: var(--fs-sm);
	--width-logo-header: clamp(160px, 18vw, 240px);
	--width-logo-header-small: 120px;
	--width-logo-footer: clamp(140px, 14vw, 180px);
	--br-md: 0.4rem;
	--br-lg: 0.8rem;
	--scroll-offset: 66px;
}

@media (width >= 1024px) {
	:root {
		--fs-md: 1.1rem;
		--fs-sm: 1rem;
	}
}

/* === TYPOGRAPHY === */
body { font-weight: var(--fw-regular); }
h1,
.h1-title,
h2 {
	line-height: 1.08;
	letter-spacing: -0.02em;
}
h2,
h3 { color: var(--color-primary); }
:is(.bg-dark, .bg-primary) :is(h2, h3) { color: var(--color-light); }
strong { font-weight: var(--fw-bold); }
.surtitle {
	font-size: var(--fs-md);
	font-weight: var(--fw-bold);
	text-transform: none;
	color: var(--color-ink);
}
:is(.bg-dark, .bg-primary) .surtitle { color: var(--color-on-dark); }
main :is(p, li) a:not(.button-link) {
	color: var(--color-ink);
	font-weight: var(--fw-bold);
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.2em;
}
main :is(p, li) a:not(.button-link):hover { color: var(--color-main); }
:is(.bg-dark, .bg-primary) :is(p, li) a:not(.button-link) { color: var(--color-on-dark); }
:is(.bg-dark, .bg-primary) :is(p, li) a:not(.button-link):hover { color: var(--color-light); }

/* === HEADER & MENU === */
.header.smallscroll {
	background-color: var(--color-dark);
	padding-block: var(--padding-xs);
}
.home .header:not(.smallscroll) .header-logo.lbig { display: block; }
.smallscroll .menu-toggle,
.menu-toggle:hover { background-color: transparent; }
.menu-toggle.active { background-color: var(--color-primary); }
div.menu-wrap { background-color: var(--color-dark); }
nav.main-menu ul.menu li a { color: var(--color-light); }
nav.main-menu ul.menu li a:hover { color: var(--color-on-dark); }

@media (width >= 1024px) {
	div.menu-wrap { background-color: transparent; }
	nav.main-menu ul.menu { gap: clamp(1.25rem, 2.2vw, 2.25rem); }
	nav.main-menu ul li a {
		font-size: clamp(1rem, 1.15vw, 1.2rem);
		font-weight: var(--fw-bold);
	}
}

/* === HERO === */
.home section.hero .hero-static::after,
.home section.hero .swiper-slide::after {
	background-color: transparent;
	background-image: linear-gradient(to bottom, rgb(20 24 28 / 0.7) 0%, rgb(20 24 28 / 0.4) 50%, rgb(20 24 28 / 0.3) 100%);
}
.tagline :is(h1, .h1-title) {
	max-width: 16ch;
	margin-inline: auto;
}

/* === BUTTONS === */
a.button-link,
button.button-link,
.gform_wrapper .gform_button {
	padding: 0.8em 1.4em;
	background-color: var(--color-primary);
	border-radius: var(--br-md);
	color: var(--color-light);
	font-family: var(--typo-main);
	font-size: var(--fs-md);
	font-weight: var(--fw-bold);
	letter-spacing: 0;
	text-transform: none;
	box-shadow: 0 2px 6px rgb(20 24 28 / 0.16), 0 1px 2px rgb(20 24 28 / 0.12);
}
.button-container { overflow: visible; }
a.button-link::after,
button.button-link::after { content: none; }
a.button-link:hover,
button.button-link:hover,
.gform_wrapper .gform_button:hover {
	background-color: var(--color-secondary);
	color: var(--color-dark);
}
:is(.bg-dark, .bg-primary) a.button-link,
:is(.bg-dark, .bg-primary) a.button-link:is(:focus, :active) {
	background-color: var(--color-secondary);
	color: var(--color-dark);
}
:is(.bg-dark, .bg-primary) a.button-link * { color: var(--color-dark); }
:is(.bg-dark, .bg-primary) a.button-link:hover { background-color: var(--color-light); }

/* === PARALLAX === */
section.media-visual.parallax.with-content.has-img { box-shadow: inset 0 0 0 100vmax rgb(20 24 28 / 0.45); }
section.media-visual.parallax .bloc-wrap .inner p {
	max-width: 34ch;
	margin-inline: auto;
	font-size: clamp(1.3rem, 2.6vw, 2rem);
	font-weight: var(--fw-semibold);
	line-height: 1.35;
}
section.media-visual.parallax .bloc-wrap .inner a.button-link {
	padding: 0.9em 1.8em;
	background-color: var(--color-secondary);
	font-size: var(--fs-title-md);
	font-weight: var(--fw-extrabold);
}
section.media-visual.parallax.has-img .bloc-wrap .inner a.button-link,
section.media-visual.parallax.has-img .bloc-wrap .inner a.button-link * { color: var(--color-dark); }
section.media-visual.parallax .bloc-wrap .inner a.button-link:hover { background-color: var(--color-light); }

/* === SORTIES === */
/* The [programme] shortcode (mu-plugins/custom_shortcode.php) */
.text-content ul.essentiel-sorties {
	margin: var(--margin-md) 0 0;
	padding: 0;
	container-type: inline-size;
}
.text-content ul.essentiel-sorties li.essentiel-sortie {
	display: grid;
	gap: 0.15rem var(--padding-md);
	padding: var(--padding-sm) 0;
}
.text-content ul.essentiel-sorties li.essentiel-sortie:not(:first-child) {
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.text-content ul.essentiel-sorties li.essentiel-sortie::before { content: none; }
.essentiel-sortie p { margin: 0; }
.essentiel-sortie-date,
.essentiel-sortie-title { font-weight: var(--fw-bold); }
.essentiel-sortie-date { color: var(--color-ink); }
:is(.bg-dark, .bg-primary) .essentiel-sortie-date { color: var(--color-on-dark); }
.essentiel-sortie.is-full :is(.essentiel-sortie-date, .essentiel-sortie-title, .essentiel-sortie-detail) { opacity: 0.6; }
.essentiel-sortie-full {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.1em 0.6em;
	border-radius: 1em;
	background-color: var(--color-dark);
	color: var(--color-light);
	font-size: 0.75em;
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 0.15em;
}
.text-content .essentiel-programme-link { margin-top: var(--margin-md); }
main > section:has(.essentiel-sorties.is-empty) { display: none; }

@container (width >= 34rem) {
	.text-content ul.essentiel-sorties li.essentiel-sortie { grid-template-columns: minmax(9rem, 16rem) 1fr; }
}

/* === LOGOS === */
/* Partners and labels: a Columns block in picto mode, logos without title or text.
   SVG logos keep their shape; a PNG in picto mode is the 150 px thumbnail, cropped square. */
section.layout-columns .column-box:not(:has(:is(h3, h4, .column-text, p))) .column-img.picto img {
	width: auto;
	max-width: 100%;
	height: clamp(48px, 6vw, 72px);
	object-fit: contain;
}

/* === FOOTER === */
footer h4 {
	color: var(--color-light);
	font-size: var(--fs-md);
	font-weight: var(--fw-bold);
}
footer p { color: var(--color-light); }
footer a,
footer p a { color: var(--color-on-dark); }
footer p a:hover { color: var(--color-light); }
footer .footer-item:is(.add, .credits) p { color: color-mix(in srgb, var(--color-light) 72%, var(--color-dark)); }
footer .columns .wrap { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
footer:not(.is-centered) .columns .footer-item:last-of-type {
	align-items: flex-start;
	text-align: left;
}
footer a { overflow-wrap: anywhere; }

/* === DEMO === */
/* inc/demo.php, essentiel.atelierf28.ch only */
.essentiel-demo {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 999;
	max-width: min(19rem, calc(100% - 6rem));
	padding: 0.5rem 0.8rem;
	border-radius: var(--br-md);
	background-color: var(--color-light);
	box-shadow: 0 4px 18px rgb(20 24 28 / 0.22);
	font-size: 0.8rem;
	line-height: 1.35;
}
.essentiel-demo p { margin: 0; color: var(--color-main); }
body:has(.essentiel-demo) footer { padding-bottom: 6rem; }
.essentiel-demo a {
	color: var(--color-ink);
	font-weight: var(--fw-bold);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
