/**
 * Theme Name:  La Montagne Volleyball
 * Description: Thème enfant Blocksy du club La Montagne Volleyball.
 * Author:      La Montagne Volleyball
 * Template:    blocksy
 * Version:     2.0.0
 * Text Domain: lmv
 */

/*
 * Police Alatsi (SIL Open Font License 1.1) hébergée sur le site plutôt que
 * chez Google Fonts : aucune adresse IP de visiteur transmise à Google.
 * L'appel distant de Blocksy est coupé dans functions.php.
 */
@font-face {
	font-family: "Alatsi";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/alatsi-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Alatsi";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/alatsi-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Palette (réglée dans Blocksy › Couleurs) :
 * 1 bleu #0091C4 · 2 vert #A3D10B · 3 gris · 4 blanc · 5–8 fonds sombres.
 */

:root {
	--lmv-blue: var(--theme-palette-color-1, #0091c4);
	--lmv-green: var(--theme-palette-color-2, #a3d10b);
	--lmv-surface: var(--theme-palette-color-6, #292929);
	--lmv-surface-2: var(--theme-palette-color-5, #303030);
	--lmv-text: #d4d4d4;
	--lmv-muted: #9a9a9a;
	--lmv-line: rgba(255, 255, 255, 0.08);
	--lmv-radius: 14px;

	/* Texte courant plus lisible que le gris par défaut sur fond sombre. */
	--theme-text-color: var(--lmv-text);
}

/*
 * Menu principal : au survol comme sur la page active, l'élément est
 * surligné en vert, son texte doit donc être sombre pour rester lisible.
 */
[data-header] .ct-header [data-id="menu"] > ul > li > a {
	--theme-link-initial-color: #e8e8e8;
	--theme-link-hover-color: #111;
	--theme-link-active-color: #111;
}

/* Sous-menus : fond sombre (blanc par défaut, texte illisible). */
[data-header] .ct-header [data-id="menu"] .sub-menu {
	--dropdown-background-color: #141414;
	background-color: #141414;
	border: 1px solid var(--lmv-line);
}

[data-header] .ct-header [data-id="menu"] .sub-menu .ct-menu-link {
	--theme-link-initial-color: #e8e8e8;
	--theme-link-hover-color: var(--lmv-green);
	--theme-link-active-color: var(--lmv-green);
	font-size: 14px;
}

/* Logo trop petit par défaut dans l'en-tête mobile. */
[data-header] .ct-header [data-device="mobile"] [data-id="logo"] .site-logo-container {
	--logo-max-height: 46px;
}

/* Titres de page (bandeau Blocksy) : moins massifs, plus lisibles. */
.hero-section .page-title {
	font-size: clamp(2.2rem, 6vw, 3.6rem);
	line-height: 1.1;
}

.entry-content > * + h2 {
	margin-top: 2.2em;
}

/* Respiration entre les grandes sections d'une page. */
.entry-content > .lmv-section {
	margin-top: clamp(3rem, 8vw, 5.5rem);
}

/* --------------------------------------------------------------------------
 * Accroche au-dessus d'un titre
 * ------------------------------------------------------------------------ */

.lmv-kicker {
	margin-bottom: 0.4em !important;
	color: var(--lmv-green);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
 * Bandeau d'accueil
 * ------------------------------------------------------------------------ */

/* L'en-tête est transparent et superposé au bandeau sur l'accueil. */
.wp-block-cover.lmv-hero {
	padding-top: clamp(7.5rem, 14vw, 9rem);
}

.lmv-hero h1 {
	margin-bottom: 0.3em;
	color: #fff;
	font-size: clamp(2.6rem, 8vw, 5.5rem);
	line-height: 1;
}

.lmv-hero h1 span {
	color: var(--lmv-blue);
}

.lmv-hero p:not(.lmv-kicker) {
	max-width: 34em;
	color: #e8e8e8;
	font-size: 1.15rem;
}

.lmv-hero .wp-block-image img {
	filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

@media (max-width: 781px) {
	.lmv-hero .wp-block-image {
		max-width: 60%;
		margin-inline: auto;
	}
}

/* --------------------------------------------------------------------------
 * Style de groupe « Carte »
 * ------------------------------------------------------------------------ */

.is-style-lmv-card {
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--lmv-line);
	border-radius: var(--lmv-radius);
	background: var(--lmv-surface);
}

.is-style-lmv-card > :first-child {
	margin-top: 0;
}

.is-style-lmv-card > :last-child {
	margin-bottom: 0;
}

.is-style-lmv-card h3 {
	margin-bottom: 0.4em;
	font-size: 1.35rem;
}

/* Dans une rangée de colonnes, les cartes prennent toutes la même hauteur. */
.wp-block-column > .is-style-lmv-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Le bouton d'une carte se cale en bas, pour aligner les cartes voisines. */
.wp-block-column > .is-style-lmv-card > .wp-block-buttons:last-child {
	margin-top: auto;
	padding-top: 1em;
}

/* --------------------------------------------------------------------------
 * Style de groupe « Bandeau vert »
 * ------------------------------------------------------------------------ */

.is-style-lmv-banner {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: var(--lmv-radius);
	background: linear-gradient(120deg, var(--lmv-green), #7fb800);
	color: #13240a;
}

.is-style-lmv-banner :is(h2, h3, p) {
	color: inherit;
}

.is-style-lmv-banner .wp-block-button__link {
	background: #13240a;
	color: #fff;
}

.is-style-lmv-banner .wp-block-button__link:hover {
	background: #fff;
	color: #13240a;
}

/* --------------------------------------------------------------------------
 * Chiffres clés
 * ------------------------------------------------------------------------ */

.lmv-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 1rem;
}

.lmv-stats > * {
	margin: 0 !important;
	padding: 1.25rem 1rem;
	border-radius: var(--lmv-radius);
	background: var(--lmv-surface);
	color: var(--lmv-muted);
	text-align: center;
}

.lmv-stats strong {
	display: block;
	color: var(--lmv-blue);
	font-size: clamp(2rem, 5vw, 2.8rem);
	line-height: 1.1;
}

/* --------------------------------------------------------------------------
 * Style de liste « Étapes »
 * ------------------------------------------------------------------------ */

.is-style-lmv-steps {
	padding: 0;
	counter-reset: lmv-step;
	list-style: none;
}

.is-style-lmv-steps > li {
	position: relative;
	min-height: 2.5rem;
	margin-bottom: 1.25rem;
	padding-left: 3.5rem;
	counter-increment: lmv-step;
}

.is-style-lmv-steps > li::before {
	content: counter(lmv-step);
	position: absolute;
	top: -0.2rem;
	left: 0;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--lmv-blue);
	color: #fff;
	font-weight: 700;
}

.is-style-lmv-steps > li strong:first-child {
	display: block;
	color: #fff;
}

/* --------------------------------------------------------------------------
 * Infos pratiques (liste « libellé : valeur »)
 * ------------------------------------------------------------------------ */

.lmv-infos {
	padding: 0;
	list-style: none;
}

.lmv-infos li {
	padding: 0.7em 0;
	border-bottom: 1px solid var(--lmv-line);
}

.lmv-infos li strong:first-child {
	display: block;
	color: var(--lmv-muted);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
 * Blocs FFvolley dans les cartes
 * ------------------------------------------------------------------------ */

.is-style-lmv-card .lmv-match:last-child {
	border-bottom: 0;
}

.lmv-match__team {
	color: #fff;
}

/* --------------------------------------------------------------------------
 * Réinscription : message au-dessus du formulaire prérempli
 * ------------------------------------------------------------------------ */

.lmv-renewal-notice {
	padding: 1em 1.25em;
	border-left: 4px solid var(--lmv-green);
	border-radius: 8px;
	background: rgba(163, 209, 11, 0.1);
	color: #fff;
}

/* --------------------------------------------------------------------------
 * Galeries : coins arrondis
 * ------------------------------------------------------------------------ */

.wp-block-gallery.has-nested-images figure.wp-block-image img,
.wp-block-image.is-style-rounded-soft img {
	border-radius: 10px;
}

/* Galeries « vignettes » : petits carrés réguliers, agrandis au clic. */
.wp-block-gallery.lmv-gallery {
	--wp--style--unstable-gallery-gap: 8px;
	gap: 8px;
}

.wp-block-gallery.lmv-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 1;
	height: auto;
	object-fit: cover;
}

@media (max-width: 599px) {
	.wp-block-gallery.lmv-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: calc(33.333% - 8px * 2 / 3);
	}
}

/* --------------------------------------------------------------------------
 * Pied de page
 * ------------------------------------------------------------------------ */

.ct-footer {
	border-top: 1px solid var(--lmv-line);
}

.ct-footer .widget-title,
.ct-footer h2,
.ct-footer h3 {
	color: #fff;
	font-size: 1rem;
}

.ct-footer p,
.ct-footer li {
	font-size: 0.92rem;
}
