/*
Theme Name: Élagage Bideau
Theme URI: https://www.elagagebideau.fr/
Author: Hugo Jousseaume
Description: Thème autonome du site Élagage Bideau (élagage et soin des arbres en Vendée). Aucune extension de mise en page ni de lightbox requise.
Version: 1.0.3
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: elagage-bideau
*/

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	top: .5rem;
	left: .5rem;
	z-index: 1000;
	padding: .75rem 1rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 2px var(--wp--preset--color--secondary);
}

/* ─── En-tête ─── */
.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0 60px;
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
	padding: .5rem var(--wp--preset--spacing--30);
}
.site-logo { display: inline-block; line-height: 0; }
.site-header .site-logo__img { width: 300px; height: auto; }
.site-logo__text {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--secondary);
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5rem 60px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
}
.site-nav a:hover,
.site-nav .current-menu-item > a { text-decoration: underline; text-underline-offset: .25em; }
.site-nav a:focus-visible { text-decoration: underline dashed; }
.site-nav .menu-item--tel a { font-size: var(--wp--preset--font-size--small); }

/* ─── Contenu ─── */
.site-main { margin-top: var(--wp--preset--spacing--50); }

.entry-hero { margin: 0 0 var(--wp--preset--spacing--50); }
.entry-hero__img {
	display: block;
	width: 100%;
	height: 650px;
	object-fit: cover;
	object-position: 50% 80%;
}

.entry-title {
	margin: 0 0 var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--secondary);
	font-weight: 900;
	text-transform: uppercase;
}

.entry-content { padding-bottom: var(--wp--preset--spacing--50); }
.entry-content a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--secondary); }

/* Galeries : légendes lisibles et curseur d'agrandissement */
.wp-block-gallery a[href] img { cursor: zoom-in; }

/* ─── Pied de page ─── */
.site-footer {
	background: var(--wp--preset--color--tertiary);
	color: #000;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}
.site-footer__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem;
	align-items: start;
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
}
.site-footer__title {
	margin: 0 0 1rem;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
}
.site-footer p { margin: 0; }
.site-footer .site-logo__img { width: 100%; max-width: 300px; }
.site-footer__legal {
	max-width: var(--wp--style--global--wide-size);
	margin: 2rem auto 0 !important;
	font-size: var(--wp--preset--font-size--small);
}

/* ─── Mobile ─── */
@media (max-width: 781px) {
	.site-header__inner { gap: 0; }
	.site-header .site-logo__img { width: 240px; }
	.site-nav__list { gap: .25rem 1.5rem; }
	.site-nav a { font-size: var(--wp--preset--font-size--small); }
	.site-main { margin-top: var(--wp--preset--spacing--30); }
	.entry-hero__img { height: clamp(260px, 55vw, 420px); }
	.site-footer__inner { grid-template-columns: 1fr; }
	.site-footer__col--logo { text-align: center; }
}

/* ─── Lightbox ─── */
.eb-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, .92);
	color: #fff;
	overscroll-behavior: contain;
}
.eb-lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.eb-lightbox__stage {
	position: absolute;
	inset: 3.5rem 4rem 4.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
}
.eb-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	user-select: none;
	touch-action: pan-y;
}
.eb-lightbox__caption {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
}
.eb-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font: 400 1.75rem/1 sans-serif;
	cursor: pointer;
}
.eb-lightbox__btn:hover,
.eb-lightbox__btn:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.eb-lightbox__close { top: .75rem; right: .75rem; }
.eb-lightbox__prev { top: 50%; left: .5rem; transform: translateY(-50%); }
.eb-lightbox__next { top: 50%; right: .5rem; transform: translateY(-50%); }
.eb-lightbox__count { position: absolute; top: 1.25rem; left: 1rem; font-size: var(--wp--preset--font-size--small); opacity: .8; }
.eb-lightbox[data-single] .eb-lightbox__prev,
.eb-lightbox[data-single] .eb-lightbox__next,
.eb-lightbox[data-single] .eb-lightbox__count { display: none; }
@media (max-width: 781px) {
	.eb-lightbox__stage { inset: 3.5rem .5rem 4.5rem; }
	.eb-lightbox__prev, .eb-lightbox__next { top: auto; bottom: .75rem; transform: none; }
	.eb-lightbox__caption { bottom: 1.5rem; padding: 0 3.5rem; }
}
html.eb-lightbox-open { overflow: hidden; }
