/*
Theme Name: Gallery Grimaldi Art
Theme URI: https://grimaldi.art
Author: Magali Grimaldi
Author URI: https://magaligrimaldi.fr
Description: Thème sur mesure de Gallery Grimaldi Art, galerie de Nadège Grimaldi, artiste peintre. Sobre, blanc et noir : la couleur vient des œuvres.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gallery-grimaldi
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 3px; }
::selection { background: var(--wp--preset--color--contrast); color: #fff; }

.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; background: #fff; padding: 12px 16px; z-index: 100000; }

/* ---------- Styles de blocs ---------- */
.is-style-surtitre {
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: 11px !important;
	line-height: 16px !important;
	font-weight: 500 !important;
	letter-spacing: .18em !important;
	text-transform: uppercase;
	font-style: normal !important;
}
.is-style-chapo { font-size: var(--wp--preset--font-size--large); line-height: 1.7; color: var(--wp--preset--color--muted); }
.has-contrast-background-color .is-style-chapo, .wp-block-cover .is-style-chapo { color: inherit; }

.wp-block-button.is-style-contour .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-contour .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: #fff; }
.wp-block-button.is-style-lien .wp-block-button__link {
	background: transparent;
	border: 0;
	border-bottom: 1px solid currentColor;
	padding: 6px 0 8px;
	color: inherit;
	transition: letter-spacing .3s, opacity .3s;
}
.wp-block-button.is-style-lien .wp-block-button__link:hover { background: transparent; letter-spacing: .17em; opacity: .75; }
.wp-block-button__link { transition: background .3s, color .3s, border-color .3s, transform .3s, box-shadow .3s; }
.wp-block-button:not(.is-style-lien) .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17, 17, 17, .14); }
.wp-block-cover .wp-block-button.is-style-contour .wp-block-button__link,
.has-contrast-background-color .wp-block-button.is-style-contour .wp-block-button__link { color: #fff; border-color: #fff; }
.wp-block-cover .wp-block-button.is-style-contour .wp-block-button__link:hover,
.has-contrast-background-color .wp-block-button.is-style-contour .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--contrast); }

/* ---------- En-tête ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
.gga-header {
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(140%) blur(6px);
	border-bottom: 1px solid rgba(17, 17, 17, .1);
}
.gga-header .wp-block-site-logo img, .gga-logo img { height: 36px; width: auto; display: block; }
.gga-header .wp-block-navigation a { text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; transition: border-color .25s; }
.gga-header .wp-block-navigation a:hover,
.gga-header .wp-block-navigation .current-menu-item > a,
.gga-header .wp-block-navigation .current-menu-ancestor > a { border-bottom-color: currentColor; }
.gga-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line) !important; padding: 8px 0; min-width: 220px !important; }
.gga-header .wp-block-navigation__submenu-container a { padding: 8px 18px !important; border: 0 !important; }
.gga-header .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--soft); }
.gga-outils { gap: 14px !important; }
.gga-outils a { text-decoration: none; }
.gga-outils .wp-block-search__button { background: transparent !important; color: var(--wp--preset--color--contrast) !important; border: 0 !important; padding: 8px !important; box-shadow: none !important; transform: none !important; }
.gga-outils .wp-block-search__button svg { width: 22px; height: 22px; fill: currentColor; }
.gga-outils .wp-block-search__input { border: 1px solid var(--wp--preset--color--line); font-size: 14px; }
.gga-outils .wp-block-search__label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.gga-outils .wp-block-woocommerce-mini-cart .wc-block-mini-cart__badge { background: var(--wp--preset--color--contrast); color: #fff; }
@media (max-width: 900px) {
	.gga-header .wp-block-site-logo img, .gga-logo img { height: 26px; }
	.gga-outils .gga-cache-mobile { display: none; }
}

/* ---------- Pied de page ---------- */
.gga-footer a { color: inherit; text-decoration: none; }
.gga-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.gga-footer .gga-footer__col ul { list-style: none; margin: 0; padding: 0; }
.gga-footer .gga-footer__col li { margin: 0 0 10px; }
.gga-footer .gga-logo img { height: 34px; }
.gga-footer .is-style-surtitre { color: var(--wp--preset--color--on-dark); }

/* ---------- Images : zoom au survol ---------- */
.gga-zoom, .wp-block-post-featured-image, .gga-carte .wp-block-image { overflow: hidden; }
.gga-zoom img, .wp-block-post-featured-image img, .gga-carte .wp-block-image img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.gga-zoom:hover img, a:hover > .wp-block-post-featured-image img, .wp-block-post-featured-image a:hover img, .gga-carte:hover .wp-block-image img { transform: scale(1.04); }
.wp-block-cover.gga-zoom:hover .wp-block-cover__image-background { transform: scale(1.04); }
.wp-block-cover.gga-zoom .wp-block-cover__image-background { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }

/* ---------- Grille d'œuvres ---------- */
.gga-oeuvres .wp-block-post { position: relative; }
.gga-oeuvres .wp-block-post-featured-image { margin: 0; position: relative; }
.gga-oeuvres .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.gga-oeuvres .wp-block-post-title a { text-decoration: none; transition: color .3s; }
.gga-oeuvres .wp-block-post:hover .wp-block-post-title a { color: var(--wp--preset--color--muted); }
.gga-oeuvres .gga-statut--badge { top: 12px; right: 12px; }
.gga-oeuvres .gga-carte__media { position: relative; }

/* ---------- Bandeau pleine largeur ---------- */
.gga-bandeau { min-height: clamp(360px, 44vw, 640px) !important; }
.gga-legende { display: inline-block; background: rgba(255, 255, 255, .92); color: var(--wp--preset--color--contrast); padding: 6px 10px; font-size: 12px; }

/* ---------- Réassurance ---------- */
.gga-reassurance { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.gga-reassurance p { margin: 0; }

/* ---------- Agenda ---------- */
.gga-agenda .wp-block-post { border-top: 1px solid var(--wp--preset--color--line); padding-top: 20px; }
.gga-agenda .wp-block-post-title a { text-decoration: none; }

/* ---------- Fiche œuvre ---------- */
.gga-fiche-oeuvre .wp-block-post-title { margin-top: 0; }
@media (min-width: 900px) {
	.gga-fiche-oeuvre__infos { position: sticky; top: 110px; align-self: flex-start; }
}

/* ---------- Fil d'Ariane ---------- */
.gga-ariane { font-size: 12px; color: var(--wp--preset--color--muted); }
.gga-ariane a { color: inherit; text-decoration: none; }
.gga-ariane a:hover { text-decoration: underline; }

/* ---------- WooCommerce ---------- */
.wc-block-components-product-price, .wp-block-woocommerce-product-price { font-weight: 400; }
.wc-block-grid__product-image img, .wp-block-woocommerce-product-image img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.wc-block-grid__product:hover img, .wp-block-woocommerce-product-image:hover img { transform: scale(1.04); }
.wp-block-woocommerce-product-image { overflow: hidden; }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { font-size: 12px; color: var(--wp--preset--color--muted); }
.wc-block-components-button:not(.is-link), .wp-block-button.wc-block-components-product-button .wp-block-button__link {
	border-radius: 0 !important;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: 12px !important;
	font-weight: 500;
}
.wp-block-woocommerce-product-collection .wp-block-post-title a { text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.gga-empile-mobile { flex-direction: column !important; }
	.gga-masque-mobile { display: none !important; }
}

/* Étiquettes de série sous les vignettes */
:root :where(.wp-block-post-terms a) { color: var(--wp--preset--color--muted); text-decoration: none; }
:root :where(.wp-block-post-terms a:hover) { color: var(--wp--preset--color--contrast); text-decoration: underline; text-underline-offset: 3px; }

/* En-tête : menu sur une seule ligne, menu burger sous 1100 px */
.gga-header .wp-block-navigation__container { flex-wrap: nowrap; }
.gga-header .wp-block-navigation a { white-space: nowrap; }
@media (max-width: 1360px) {
	.gga-header .wp-block-navigation__container { gap: 22px !important; }
}
@media (max-width: 1100px) {
	.gga-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.gga-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
/* Sélecteur flottant de TranslatePress : remplacé par le sélecteur FR / EN de l'en-tête */
#trp-floater-ls, .trp-floating-switcher { display: none !important; }
/* Bloc « Mon compte » ajouté automatiquement par WooCommerce : déjà présent dans l'en-tête */
.gga-header .wp-block-woocommerce-customer-account:not(.gga-cache-mobile) { display: none; }

/* Grilles d'œuvres et d'articles : colonnes fixes (indépendant de la version de WordPress) */
.wp-block-post-template.is-layout-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.wp-block-post-template.is-layout-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 1000px) {
	.wp-block-post-template.is-layout-grid.columns-3,
	.wp-block-post-template.is-layout-grid.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
	.wp-block-post-template.is-layout-grid.columns-3,
	.wp-block-post-template.is-layout-grid.columns-4 { grid-template-columns: 1fr !important; }
}

/* Image d'une actualité : affichée entière, sans recadrage ni agrandissement (affiches) */
.gga-image-article { text-align: center; }
.gga-image-article img { width: auto !important; max-width: 100%; height: auto !important; max-height: 85vh; margin-inline: auto; object-fit: contain !important; }

/* Boutons WooCommerce : texte toujours lisible */
.wc-block-components-product-button__button.wp-element-button,
.wp-block-button__link.add_to_cart_button { background: transparent !important; color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--wp--preset--color--contrast) !important; }
.wc-block-components-product-button__button.wp-element-button:hover,
.wp-block-button__link.add_to_cart_button:hover { background: var(--wp--preset--color--contrast) !important; color: #fff !important; }
.single_add_to_cart_button, .wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .woocommerce a.button, .woocommerce button.button { background: var(--wp--preset--color--contrast) !important; color: #fff !important; border-color: var(--wp--preset--color--contrast) !important; }
.single_add_to_cart_button:hover, .wc-block-components-button:not(.is-link):hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: #333 !important; color: #fff !important; }
.wc-block-components-button:not(.is-link) .wc-block-components-button__text { color: #fff !important; }
