/* Compléments à theme.css pour la version statique (remplace plugins WordPress) */

/* Menu : défilement natif à la place de mCustomScrollbar */
@media (min-width: 1025px) {
	.main-navigation > div { overflow-y: auto; }
	.main-navigation .nav-menu { display: inline-block; vertical-align: middle; width: 100%; }
}

/* Vignettes sans fiche projet : pas de curseur main */
.grid-wrapper a[aria-disabled="true"] { cursor: default; }

/* Bouton retour en haut (icône SVG au lieu de la police icomoon) */
.back-to-top i { display: inline-flex; align-items: center; justify-content: center; }
.back-to-top svg { display: block; }

/* Accordéons de la page Bio (ex-plugin WC Shortcodes) */
.wc-shortcodes-toggle { margin-bottom: 20px; }
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger {
	display: block; position: relative; padding: 0; margin: 3px 0 0;
	border: 1px solid #ccc; outline: 0;
}
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger:first-child { margin-top: 0; }
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger a {
	display: block; position: relative; padding: 10px 20px 10px 40px; cursor: pointer;
}
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger a:before {
	content: "+"; position: absolute; left: 0; top: 0; bottom: 0; width: 40px;
	padding: 10px 0; text-align: center; font-weight: 400;
}
.wc-shortcodes-toggle .wc-shortcodes-toggle-trigger.active a:before { content: "\2212"; }
.wc-shortcodes-toggle .wc-shortcodes-toggle-container {
	display: none; overflow: hidden; padding: 20px; border: 1px solid #ccc; border-top: 0;
}
.wc-shortcodes-toggle .wc-shortcodes-toggle-container *:last-child { margin-bottom: 0; }

/* Vidéos Vimeo : pleine largeur, proportions conservées */
.entry-content iframe { display: block; width: 100%; max-width: 100%; height: auto; border: 0; margin: 1.5em auto; }

/* Galerie photo (remplace RoyalSlider) */
.yc-gallery { margin: 2em 0; }
.yc-gallery__main { position: relative; margin: 0; background: #fff; text-align: center; }
.yc-gallery__main img { display: block; width: 100%; height: 500px; object-fit: contain; margin: 0 auto; }
.yc-gallery__main figcaption { font-size: 11px; color: #808080; text-align: left; padding: 8px 0 0; min-height: 1.5em; }
.yc-gallery__nav {
	position: absolute; top: 250px; transform: translateY(-50%);
	width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
	background: rgba(255,255,255,.85); color: #000; font-size: 30px; line-height: 40px; cursor: pointer;
	opacity: 0; transition: opacity .3s;
}
.yc-gallery__main:hover .yc-gallery__nav, .yc-gallery__nav:focus-visible { opacity: 1; }
.yc-gallery__prev { left: 10px; }
.yc-gallery__next { right: 10px; }
.yc-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.yc-gallery__thumb { border: 0; padding: 0; background: none; cursor: pointer; opacity: .45; transition: opacity .3s; }
.yc-gallery__thumb:hover, .yc-gallery__thumb.is-active { opacity: 1; }
.yc-gallery__thumb img { display: block; width: 72px; height: 54px; object-fit: cover; }
@media (max-width: 767px) {
	.yc-gallery__main img { height: 280px; }
	.yc-gallery__nav { top: 140px; opacity: 1; }
}
@media (hover: none) { .yc-gallery__nav { opacity: 1; } }
.yc-gallery__nav:hover, .yc-gallery__nav:focus { background: #fff; color: #000; border: 0; }

/* Menu mobile / tablette : centrage vertical de la liste.
   Le thème centrait la liste via l'enveloppe de mCustomScrollbar (supprimée dans la version statique)
   et une astuce inline-block sensible aux espaces du HTML ; centrage en flexbox à la place. */
@media screen and (max-width: 1024px) {
	.main-navigation > div {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.main-navigation > div:before { display: none; }
	.main-navigation > div > .nav-menu {
		width: 100%;
		max-height: 82%;
		overflow-y: auto;
	}
}

/* ---------- Galeries : grille (768 px et plus) + plein écran ---------- */
/* Les miniatures sont des boutons : on neutralise les styles de bouton du thème */
.yc-gallery__thumb, .yc-gallery__thumb:hover, .yc-gallery__thumb:focus, .yc-gallery__thumb:active {
	height: auto; border: 0; border-radius: 0; background: none; line-height: 0; transform: none;
}
.yc-gallery__main img { cursor: zoom-in; }

@media screen and (min-width: 768px) {
	.yc-gallery__main { display: none; }
	.yc-gallery__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 0; }
	.yc-gallery__thumbs:has(> :nth-child(2):last-child),
	.yc-gallery__thumbs:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.yc-gallery__thumbs:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
	.yc-gallery__thumb { display: block; width: 100%; overflow: hidden; opacity: 1; cursor: zoom-in; }
	.yc-gallery__thumb img { width: 100%; height: auto; aspect-ratio: var(--yc-ratio, 3 / 2); object-fit: cover; transition: transform .4s ease; }
	.yc-gallery__thumb:hover img, .yc-gallery__thumb:focus-visible img { transform: scale(1.03); }
	.yc-gallery__thumb:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
}

html.yc-lightbox-open { overflow: hidden; }
.yc-lightbox {
	position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
	padding: 56px 80px 48px; background: #0e0e0e;
}
.yc-lightbox[hidden] { display: none; }
.yc-lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.yc-lightbox__img {
	display: block; width: auto; height: auto; object-fit: contain; cursor: pointer;
	max-width: calc(100vw - 160px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
}
.yc-lightbox__cap { color: #b5b5b5; font-size: 12px; line-height: 1.4; margin-top: 12px; text-align: center; min-height: 1.4em; }
.yc-lightbox__count { position: absolute; top: 20px; left: 0; right: 0; margin: 0; text-align: center; color: #9a9a9a; font-size: 12px; letter-spacing: .1em; }
.yc-lightbox button {
	position: absolute; display: flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: #fff; font-size: 40px; font-weight: 300; line-height: 1;
	opacity: .75; cursor: pointer; transition: opacity .2s, background-color .2s;
}
.yc-lightbox button:hover, .yc-lightbox button:focus { opacity: 1; background: rgba(255, 255, 255, .12); color: #fff; }
.yc-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.yc-lightbox button svg { display: block; width: 26px; height: 26px; flex: none; pointer-events: none; }
.yc-lightbox__close svg { width: 24px; height: 24px; }
.yc-lightbox__close, .yc-lightbox__close:active { top: 8px; right: 12px; font-size: 34px; transform: none; }
.yc-lightbox__prev, .yc-lightbox__next,
.yc-lightbox__prev:active, .yc-lightbox__next:active { top: 50%; transform: translateY(-50%); }
.yc-lightbox__prev { left: 12px; }
.yc-lightbox__next { right: 12px; }
@media screen and (max-width: 767px) {
	.yc-lightbox { padding: 52px 0 72px; }
	.yc-lightbox__img { max-width: 100vw; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
	.yc-lightbox__prev, .yc-lightbox__next,
	.yc-lightbox__prev:active, .yc-lightbox__next:active { top: auto; bottom: 8px; transform: none; }
	.yc-lightbox__prev { left: 16px; }
	.yc-lightbox__next { right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .yc-gallery__thumb img { transition: none; } }
