/* Thème enfant Artefacts : tout le CSS propre au site. Couleurs : variables globales Astra. */
:root {
	--artefacts-ink: var(--ast-global-color-0, #20293f);
	--artefacts-gold: var(--ast-global-color-1, #d8b75a);
}

/* Surfaces du navigateur aux couleurs du site. */
::selection { background: var(--artefacts-gold); color: var(--artefacts-ink); }
input, textarea { caret-color: var(--artefacts-ink); }

/* Tuiles de jeux reliées : focus visible, curseur explicite. */
.artefacts-game-tile { display: block; border-radius: 8px; }
.artefacts-game-tile:hover img { transform: translateY(-2px); transition: transform .15s ease-out; }
@media (prefers-reduced-motion: reduce) { .artefacts-game-tile:hover img { transform: none; } }

/* Catégorie vide. */
.artefacts-empty { max-width: 40rem; margin: 2rem auto; text-align: center; font-size: 1.0625rem; }

/* Réassurance (fiche produit, sous le bouton de commande) : surface teintée or, sans liseré latéral. */
.artefacts-reassurance {
	margin: 1.25rem 0;
	padding: 1rem 1.125rem;
	border: 1px solid color-mix(in srgb, var(--artefacts-gold) 45%, transparent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--artefacts-gold) 9%, #fff);
	font-size: 1rem;
	line-height: 1.5;
}
.artefacts-reassurance p { margin: 0 0 .5rem; }
.artefacts-reassurance p:last-child { margin-bottom: 0; }

/* Texte foncé sur les fonds or (contraste ~7,5:1 au lieu de 1,9:1). */
.artefacts-on-gold .uagb-buttons-repeater,
.artefacts-on-gold .uagb-button__link,
.artefacts-on-gold .uagb-button__icon svg { color: var(--artefacts-ink) !important; fill: var(--artefacts-ink) !important; }

/* Focus visible sur fond clair comme sur fond foncé : anneau bleu nuit + halo or. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--artefacts-ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--artefacts-gold);
}

/* Cibles tactiles d'au moins 44 px. */
.woocommerce .button,
.woocommerce button.button,
.single_add_to_cart_button,
.wp-block-button__link,
.uagb-buttons-repeater,
.ast-button { min-height: 44px; }
/* Panier de l'en-tête : zone cliquable de 44 × 44 px autour de l'icône. */
.ast-header-woo-cart .cart-container { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

/* Pas de défilement horizontal (carrousel Spectra trop large sur mobile). */
html { overflow-x: clip; }
.wp-block-uagb-slider { overflow: hidden; }

/* Caractéristiques de la fiche produit. */
.artefacts-specs {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: .375rem 1.25rem;
	margin: 1.25rem 0;
	padding: 1rem 0;
	border-block: 1px solid color-mix(in srgb, var(--artefacts-ink) 15%, transparent);
	font-size: 1rem;
}
.artefacts-specs dt { font-weight: 600; color: var(--artefacts-ink); }
.artefacts-specs dd { margin: 0; }
/* Date de sortie à venir : à la place du bouton d'achat (texte bleu nuit sur or pâle, comme la réassurance). */
.artefacts-release {
	display: inline-block;
	margin: 0 0 1.25rem;
	padding: .625rem 1rem;
	border: 1px solid color-mix(in srgb, var(--artefacts-gold) 45%, transparent);
	border-radius: 4px;
	background: color-mix(in srgb, var(--artefacts-gold) 9%, #fff);
	color: var(--artefacts-ink);
	font-weight: 600;
}
.artefacts-release--loop { display: block; width: fit-content; margin: .375rem auto 0; padding: .125rem .5rem; font-size: .8125rem; white-space: nowrap; }

/* Accueil : section « Nos jeux » sous le carrousel. */
/* Même largeur que les sections Spectra de l'accueil (1184 px, 20 px de marge en mobile). */
.artefacts-home-games { width: min(100% - 40px, 1184px); margin-inline: auto; padding-block: clamp(2rem, 5vw, 3.5rem); }
.artefacts-home-games__title { margin: 0 0 1.25rem; }
.artefacts-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.75rem, 2vw, 1.25rem); }
@media (min-width: 768px) { .artefacts-games { grid-template-columns: repeat(4, 1fr); } }
.artefacts-games figure { margin: 0; }

/* Boutique : tuiles de jeux sur 2 colonnes en mobile (blocs Spectra de la page 16734 ; Spectra place les enfants
   dans un conteneur intermédiaire .uagb-container-inner-blocks-wrap). */
@media (max-width: 767px) {
	.uagb-block-dc71e539 > .uagb-container-inner-blocks-wrap,
	.uagb-block-ec37c4e8 > .uagb-container-inner-blocks-wrap,
	.uagb-block-dc71e539:not(:has(> .uagb-container-inner-blocks-wrap)),
	.uagb-block-ec37c4e8:not(:has(> .uagb-container-inner-blocks-wrap)) { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
	.uagb-block-dc71e539 .wp-block-uagb-container, .uagb-block-ec37c4e8 .wp-block-uagb-container { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
}
.artefacts-archive-title { margin: 0 0 1rem; }

/* Fil d'Ariane de la boutique (inc/breadcrumb.php) : discret, au-dessus du titre. Sur téléphone, une ligne, sans
   « Accueil » ni l'élément courant (déjà le titre juste en dessous). */
.artefacts-breadcrumb { margin: 0 0 .75rem; font-size: .875rem; line-height: 1.5; color: color-mix(in srgb, var(--artefacts-ink) 78%, transparent); }
.artefacts-breadcrumb a { color: inherit; text-decoration: none; }
.artefacts-breadcrumb a:hover, .artefacts-breadcrumb a:focus-visible { color: var(--artefacts-ink); text-decoration: underline; text-underline-offset: 3px; }
.artefacts-crumb-sep { padding: 0 .15rem; }
.single-product .artefacts-breadcrumb { margin-bottom: 1.25rem; }
@media (max-width: 767px) {
	.artefacts-breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.artefacts-crumb--home, .artefacts-crumb--home + .artefacts-crumb-sep,
	.artefacts-crumb--current, .artefacts-crumb-sep:has(+ .artefacts-crumb--current) { display: none; }
}


/* Bandeau cookies : boutons sur une ligne pour réduire sa hauteur sur mobile. */
@media (max-width: 768px) {
	.cmplz-cookiebanner .cmplz-buttons { flex-direction: row !important; flex-wrap: wrap; gap: .5rem; }
	/* La feuille Complianz est chargée après la nôtre : largeur et flex forcés. */
	.cmplz-cookiebanner .cmplz-buttons .cmplz-btn { flex: 1 1 28% !important; width: auto !important; min-height: 44px; margin: 0 !important; padding-inline: .5rem; }
	.cmplz-cookiebanner .cmplz-message { font-size: 14px; line-height: 1.45; }
}

/* Accueil : titre principal discret, centré sous le carrousel (Merriweather des titres, taille de sous-titre). */
.artefacts-home-title {
	width: min(100% - 40px, 1184px);
	margin: clamp(2rem, 5vw, 3rem) auto 0;
	font-size: clamp(1.25rem, 1.05rem + .9vw, 1.625rem);
	line-height: 1.35;
	text-align: center;
	text-wrap: balance;
	color: var(--artefacts-ink);
}

/* Pied de page : adresse sous les horaires, même alignement. */
.artefacts-footer-address { text-align: center; }
.artefacts-footer-address h3 { margin-bottom: 1.25rem; }
.artefacts-footer-address address { margin: 0 0 .5rem; font-style: normal; }
.artefacts-footer-address p { margin: 0; }

/* Paiement : champs d'adresse masqués quand le retrait est choisi (assets/js/checkout-address.js). */
.artefacts-hidden { display: none !important; }

/* Navigation de la boutique : entrées (jeux, accessoires, figurines, marques : autant de colonnes que d'entrées) et filtre à gauche. */
.artefacts-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem; margin: 0 0 2rem; }
.artefacts-entries h3, .artefacts-filter h2 { font-size: 1rem; margin: 0 0 .5rem; color: #20293f; }
/* Titres de section de la page Boutique (tuiles, « Plus de rubriques ») : même style, centrés. */
.artefacts-tiles h2, .artefacts-entries > h2 { grid-column: 1 / -1; font-size: 1.5rem; text-align: center; margin: 2.5rem 0 1.25rem; }
/* Tuiles Accessoires / Marques (inc/shop-tiles.php) : même format que les 8 jeux, 4 par ligne (2 sur téléphone),
   dernière ligne centrée. */
.artefacts-tiles ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.artefacts-tiles li { flex: 0 0 calc((100% - 3 * 1.25rem) / 4); }
.artefacts-tiles img { display: block; width: 100%; height: auto; }
@media (max-width: 767px) {
	.artefacts-tiles ul { gap: .75rem; }
	.artefacts-tiles li { flex-basis: calc((100% - .75rem) / 2); }
}
.artefacts-entries ul, .artefacts-filter ul { list-style: none; margin: 0; padding: 0; }
.artefacts-entries li a, .artefacts-filter li a { display: inline-block; padding: .35rem 0; min-height: 44px; line-height: 2; }
.artefacts-filter { margin-bottom: 2rem; }
.artefacts-filter a[aria-current="true"] { font-weight: 700; text-decoration: underline; }
.artefacts-filter span { opacity: .7; }
@media (max-width: 767px) { .artefacts-entries { grid-template-columns: 1fr; gap: 1rem; } }

/* Recherche de produits dans l'en-tête (staging/config/63-header-search.php). */
.ast-header-search .search-field { min-height: 44px; font-size: 1rem; }
/* Ordinateur : le champ suit le logo et s'adapte à la place laissée par le menu, qui reste sur une ligne.
   Recalé le 16/11 pour 5 entrées de menu (« Classements Ligues » au premier niveau, choix de Julien) : avec 380 px de
   champ, le panier sortait de l'écran sous 1 366 px. Mesuré de 922 à 1 920 px : panier visible, menu sur une ligne. */
#ast-desktop-header .ast-header-search { margin-left: 2rem; }
#ast-desktop-header .ast-header-search .search-form { width: clamp(160px, 100vw - 1060px, 380px); }
#ast-desktop-header .main-header-menu { flex-wrap: nowrap; }
#ast-desktop-header .main-header-menu > .menu-item > .menu-link { white-space: nowrap; }
@media (max-width: 1200px) {
	#ast-desktop-header .ast-header-search { margin-left: 1rem; }
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link { padding-left: .7em; padding-right: .7em; }
}
@media (max-width: 1023px) {
	#ast-desktop-header .ast-header-search { margin-left: .5rem; }
	#ast-desktop-header .ast-header-search .search-form { width: clamp(105px, 100vw - 840px, 130px); }
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link { padding-left: .4em; padding-right: .4em; }
}
/* Mobile : barre pleine largeur sous la ligne logo / compte / panier. */
.ast-mobile-header-wrap .ast-below-header-bar .ast-header-search,
.ast-mobile-header-wrap .ast-below-header-bar .ast-search-menu-icon,
.ast-mobile-header-wrap .ast-below-header-bar .search-form { flex: 1 1 auto; width: 100%; }
.ast-mobile-header-wrap .ast-below-header-bar .search-field { width: 100%; }

/* Paiement (« sans distraction » d'Astra Pro) : bandeau bleu nuit derrière le logo, comme sur le reste du site. */
.woocommerce-checkout.distraction-free #masthead .main-header-bar { background-color: var(--ast-global-color-0); border-bottom: 0; }

/* Listes de produits : vignettes carrées, photo entière centrée (les photos Dolibarr ont des formats variés). */
.astra-shop-thumbnail-wrap img.attachment-woocommerce_thumbnail { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: contain; background: #fff; }
/* Tri des listes : le libellé ne touche pas le chevron du menu déroulant. */
.woocommerce-ordering select.orderby { padding-right: 2.5rem; }
/* Paiement : mention « votre email et votre panier sont enregistrés… » (relance de panier) lisible, lien « Non merci » visible. */
#wcf_cf_gdpr_message_block { display: block; margin: .375rem 0 1rem; line-height: 1.45; color: var(--artefacts-ink); }
#wcf_cf_gdpr_message_block span { font-size: .875rem !important; } /* l'extension pose « xx-small » en ligne */
#wcf_cf_gdpr_message_block a { text-decoration: underline; white-space: nowrap; }

/* Menu (artefacts-menu-bold) : titres principaux en gras, sur ordinateur et dans le menu mobile ; sous-menus inchangés
   (appel du 30/10). */
.main-header-menu > .menu-item > .menu-link { font-weight: 700; }

/* Boutique (artefacts-sidebar-gap) : le contenu central était collé au trait de la colonne de gauche (0 px, contre 60 px
   côté colonne). Même espace des deux côtés du trait, sur ordinateur seulement (sur téléphone : bouton « Filtrer »). */
@media (min-width: 922px) {
	.ast-left-sidebar #primary { padding-left: 60px; }
}

/* Code promo au paiement : le lien qui ouvre le champ ressemblait à du texte ordinaire (retour de Julien du 05/11). */
#ast-coupon-trigger {
	cursor: pointer;
	font-weight: 600;
	text-decoration: underline;
}

/* Rétractation par email (page /retractation/, staging/config/73-withdrawal.php). */
.artefacts-withdrawal-mail { margin: 1.5rem 0; }

/* Boutique, colonne de gauche (artefacts-sidebar-cats, 17/11) : la liste brute des catégories devient un menu lisible.
   Rubriques en gras séparées d'un filet, sous-rubriques plus légères sous un filet or. La recherche de la colonne est
   masquée : elle doublait celle de l'en-tête (et son champ était coupé). */
.ast-woo-sidebar-widget.widget_search { display: none; }
.wc-block-product-categories-list { list-style: none; margin: 0; padding: 0; }
.wc-block-product-categories-list--depth-0 > .wc-block-product-categories-list-item {
	padding: .625rem 0;
	border-bottom: 1px solid color-mix(in srgb, var(--artefacts-ink) 12%, transparent);
}
.wc-block-product-categories-list--depth-0 > .wc-block-product-categories-list-item:first-child { padding-top: 0; }
.wc-block-product-categories-list--depth-0 > .wc-block-product-categories-list-item:last-child { border-bottom: 0; }
.wc-block-product-categories-list--depth-0 > .wc-block-product-categories-list-item > a {
	display: block;
	font-weight: 700;
	color: var(--artefacts-ink);
	letter-spacing: .01em;
}
.wc-block-product-categories-list--depth-1 {
	margin: .375rem 0 .125rem .125rem;
	padding-left: .75rem;
	border-left: 2px solid color-mix(in srgb, var(--artefacts-gold) 55%, transparent);
}
.wc-block-product-categories-list--depth-1 a,
.wc-block-product-categories-list--depth-2 a {
	display: block;
	padding: .1875rem 0;
	font-size: .9375rem;
	color: color-mix(in srgb, var(--artefacts-ink) 78%, #fff);
	text-decoration: none;
}
.wc-block-product-categories-list--depth-2 { padding-left: .75rem; }
.wc-block-product-categories-list--depth-2 a { font-size: .875rem; }
.wc-block-product-categories-list-item a:hover,
.wc-block-product-categories-list-item a:focus-visible { color: #8c730e; text-decoration: underline; text-underline-offset: 3px; }
