/* Rally Circle — styles partagés (front + éditeur).
 * Les valeurs viennent de theme.json. */

:root {
	--rc-gutter: var(--wp--preset--spacing--100, 64px);
	--rc-white: var(--wp--preset--color--blanc, #fff);
	--rc-text: var(--wp--preset--color--texte, #d9d5cf);
	--rc-gold: var(--wp--preset--color--or, #c9a45c);
	--rc-bg: var(--wp--preset--color--noir, #0f0f10);
	--rc-line: var(--wp--custom--border--ligne, 1px solid rgba(255, 255, 255, 0.1));
	--rc-wide: var(--wp--preset--font-family--raleway);
	--rc-sans: var(--wp--preset--font-family--nunito-sans);
	--rc-ease: var(--wp--custom--easing, cubic-bezier(0.2, 0.7, 0.2, 1));
	--rc-header-h: var(--wp--custom--header-height, 118px);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.rc-section,
.rc-section *,
.rc-section *::before,
.rc-section *::after,
.rc-header *,
.rc-footer {
	box-sizing: border-box;
}

:where(.rc-section) :where(h1, h2, h3, p, ul) {
	margin: 0;
	padding: 0;
}

:where(.rc-section) ul {
	list-style: none;
}

:where(.rc-section) img {
	display: block;
	max-width: 100%;
}

:where(.rc-section) a {
	color: inherit;
	text-decoration: none;
}

.rc-icon {
	flex: none;
	display: block;
}

/* Titres capitales espacées */
.rc-wide {
	font-family: var(--rc-wide);
	color: var(--rc-white);
	text-transform: uppercase;
}

/* Filet or */
.rc-gold-line {
	display: block;
	width: 40px;
	height: 2px;
	background: var(--rc-gold);
}

/* Libellé de section : texte + filet */
.rc-label {
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-family: var(--rc-wide);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	line-height: 1.2;
	color: var(--rc-white);
	text-transform: uppercase;
}

.rc-label--center {
	align-items: center;
}

.rc-lead {
	font-size: var(--wp--preset--font-size--lead);
	line-height: var(--wp--custom--line-height--lead);
	color: var(--rc-text);
}

/* Boutons */
.rc-btn-outline {
	display: inline-block;
	padding: 18px 44px;
	border: var(--wp--custom--border--cta, 1.5px solid #c9a45c);
	font-family: var(--rc-wide);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--bouton);
	line-height: 1.2;
	color: var(--rc-white);
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.rc-btn-outline:hover,
.rc-btn-outline:focus-visible {
	background: var(--rc-gold);
	color: var(--rc-bg);
}

.rc-btn-gold {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	align-self: flex-start;
	padding: 18px 32px;
	background: var(--wp--preset--gradient--or, linear-gradient(180deg, #d9b56a, #b8904a));
	font-family: var(--rc-wide);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--bouton);
	line-height: 1.2;
	color: var(--rc-bg);
	text-transform: uppercase;
	transition: filter 0.25s ease;
}

.rc-btn-gold:hover,
.rc-btn-gold:focus-visible {
	filter: brightness(1.1);
}

.rc-section a:focus-visible,
.rc-section [tabindex]:focus-visible,
.rc-header a:focus-visible,
.rc-header button:focus-visible,
.rc-footer a:focus-visible {
	outline: 1.5px solid var(--rc-gold);
	outline-offset: 3px;
}

/* Grain film sur les visuels basse définition */
.rc-grain::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.16;
	mix-blend-mode: overlay;
	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 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Pages internes : laisser la place à l'en-tête fixe */
.rc-main--offset {
	padding-top: calc(var(--rc-header-h) + 48px);
	padding-bottom: 96px;
}

.rc-main--flush {
	padding: 0;
}

/*
 * Pages pleine largeur : pas d'espace (blockGap racine, 1.5rem) avant le
 * contenu ni avant le pied de page. L'en-tête étant en position fixe, cet
 * espace laissait une bande sombre au-dessus du hero.
 */
.wp-site-blocks > .rc-main--flush,
.wp-site-blocks > .rc-main--flush + .rc-site-footer {
	margin-block-start: 0;
}

/* Lien d'évitement */
.skip-link.screen-reader-text:focus {
	background: var(--rc-bg);
	color: var(--rc-white);
}

@media (max-width: 900px) {

	:root {
		--rc-header-h: 80px;
	}
}
