/*
Theme Name: Goyalive
Theme URI: https://goyalive.com
Description: Thème enfant de Twenty Twenty-Five pour Goyalive, magazine des décisions automobiles. Palette, typographie, gabarits et compositions de la maquette d'accueil.
Author: Goyalive
Version: 1.17.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Template: twentytwentyfive
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: goyalive
Tags: block-theme, editorial, news, magazine
*/

/*
 * L'essentiel du design (couleurs, typographie, espacements, styles de blocs)
 * est déclaré dans theme.json. Ce fichier ne contient que les utilitaires que
 * theme.json ne sait pas exprimer : motifs, bordures composées, garde-fous
 * d'accessibilité tactile.
 */

:root {
	--gy-hachure: rgba(14, 91, 99, .07);
}

/* --- Surtitres de rubrique ------------------------------------------------ */

.gy-eyebrow {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 700;
	font-size: .6875rem;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.gy-eyebrow--sourdine {
	color: var(--wp--preset--color--texte-3);
}

/* --- Signatures, dates, mentions ----------------------------------------- */

.gy-meta,
.gy-meta p,
.gy-meta a,
.gy-signature,
.gy-signature * {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 500;
	font-size: .78rem;
	line-height: 1.45;
	color: var(--wp--preset--color--texte-3);
}

.gy-signature .wp-block-post-author-name a {
	color: var(--wp--preset--color--texte-2);
	font-weight: 600;
	text-decoration: none;
}

.gy-signature .wp-block-post-author-name a:hover {
	color: var(--wp--preset--color--accent);
}

/* --- Filets de structure -------------------------------------------------- */

.gy-titre-section {
	border-bottom: 2px solid var(--wp--preset--color--encre);
	padding-bottom: 1rem;
}

.gy-filet {
	border-bottom: 1px solid var(--wp--preset--color--filet);
	padding-bottom: 1.25rem;
}

.gy-carte {
	border: 1px solid var(--wp--preset--color--filet);
	background-color: var(--wp--preset--color--papier);
}

/* --- Emplacements visuels -------------------------------------------------
 * Aplat teinté à hachure diagonale : c'est un EMPLACEMENT PHOTO.
 * Remplacer par un bloc Image dès que la photo définitive est disponible.
 */

.gy-media {
	background-color: var(--wp--preset--color--teinte);
	background-image: repeating-linear-gradient(135deg, transparent 0 10px, var(--gy-hachure) 10px 11px);
	color: var(--wp--preset--color--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.gy-media svg {
	width: auto;
	height: 40%;
	max-height: 84px;
}

.gy-media--une svg {
	width: 70%;
	max-width: 520px;
	height: auto;
	max-height: none;
}

/* L'image mise en avant occupe tout l'emplacement quand elle existe ;
   sinon l'aplat hachuré reste visible et signale l'absence de visuel. */
.gy-media .wp-block-post-featured-image {
	width: 100%;
	height: 100%;
	margin: 0;
}

.gy-media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gy-ico {
	color: var(--wp--preset--color--accent);
	display: block;
}

/* --- Bloc affiliation ----------------------------------------------------- */

.gy-affiliation {
	border: 1px solid var(--wp--preset--color--filet-fort);
	background-color: var(--wp--preset--color--papier-2);
}

.gy-affiliation__mention {
	border-left: 1px solid var(--wp--preset--color--filet-fort);
	padding-left: 1.125rem;
	font-size: .85rem;
	line-height: 1.55;
	color: var(--wp--preset--color--texte-2);
}

.gy-affiliation__mention strong {
	color: var(--wp--preset--color--encre);
	font-weight: 600;
}

/* --- Grille des marques --------------------------------------------------- */

.gy-marques p {
	margin: 0;
}

.gy-marques a {
	display: block;
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 500;
	font-size: .9rem;
	color: var(--wp--preset--color--texte-2);
	text-decoration: none;
	padding: .7rem .25rem;
	border-bottom: 1px solid var(--wp--preset--color--filet);
}

.gy-marques a:hover {
	color: var(--wp--preset--color--accent);
}

/* --- Divers --------------------------------------------------------------- */

.gy-pastille {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--teinte-forte);
	color: var(--wp--preset--color--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 700;
	font-size: .94rem;
	flex: 0 0 auto;
}

.gy-numero {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 700;
	font-size: .8rem;
	color: var(--wp--preset--color--accent);
}

.gy-baseline {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 500;
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--texte-3);
}

/* --- Bandeaux de structure ------------------------------------------------ */

.gy-bar-haut {
	border-bottom: 1px solid var(--wp--preset--color--filet);
}

.gy-nav-bar {
	border-top: 1px solid var(--wp--preset--color--filet);
	border-bottom: 2px solid var(--wp--preset--color--encre);
}

.gy-bande {
	border-top: 1px solid var(--wp--preset--color--filet);
	border-bottom: 1px solid var(--wp--preset--color--filet);
}

.gy-bande-haut {
	border-top: 1px solid var(--wp--preset--color--filet);
}

/* --- Listes de liens (pied de page, colonnes de rubriques) ---------------- */

.gy-liens {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.gy-liens li {
	margin: 0 0 .55rem;
	font-size: .9375rem;
	line-height: 1.4;
}

/* --- En-tête d'archive ---------------------------------------------------- */

.gy-chapo,
.gy-chapo p {
	font-size: 1.1875rem;
	line-height: 1.56;
	color: var(--wp--preset--color--texte-2);
	max-width: 640px;
	margin: 0;
}

/* --- Pagination ----------------------------------------------------------- */

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 600;
	font-size: .875rem;
	border-top: 1px solid var(--wp--preset--color--filet);
	padding-top: 1.5rem;
}

.wp-block-query-pagination .page-numbers {
	padding: .4rem .55rem;
	color: var(--wp--preset--color--texte-2);
}

.wp-block-query-pagination .page-numbers.current {
	color: var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
}

/* --- Corps d'article ------------------------------------------------------ */

.wp-block-post-content p {
	margin: 0 0 1.15em;
}

.wp-block-post-content h2 {
	margin-top: 2.1em;
	margin-bottom: .6em;
}

.wp-block-post-content h3 {
	margin-top: 1.7em;
	margin-bottom: .5em;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
	margin: 0 0 1.15em;
	padding-left: 1.3em;
}

.wp-block-post-content li {
	margin-bottom: .4em;
}

/*
 * Les liens du corps d'article sont soulignés et colorés : un lien noyé dans
 * le texte n'a aucune valeur pour l'annonceur, et masquer un lien commercial
 * est exactement ce que les plateformes sanctionnent.
 */
.wp-block-post-content a:not(.wp-element-button) {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: .18em;
	text-decoration-thickness: 1px;
}

.wp-block-post-content a:not(.wp-element-button):hover {
	text-decoration-thickness: 2px;
}

/*
 * Les boutons gardent la couleur définie dans theme.json. Sans l'exclusion
 * ci-dessus, la règle des liens de corps d'article l'emporte sur la règle
 * :where() du thème et peint le texte du bouton en accent sur fond accent :
 * texte invisible. Défaut constaté le 31/08/2026 sur la carte produit.
 */
.wp-block-post-content .wp-element-button {
	color: var(--wp--preset--color--papier);
	text-decoration: none;
}

.wp-block-post-content blockquote {
	border-left: 2px solid var(--wp--preset--color--accent);
	padding-left: 1.25rem;
	margin: 1.8em 0;
	font-size: 1.1rem;
	line-height: 1.5;
	color: var(--wp--preset--color--texte-2);
}

.wp-block-post-content figure {
	margin: 1.8em 0;
}

/* --- Encadré auteur et navigation entre articles -------------------------- */

.wp-block-post-author__avatar img {
	border-radius: 50%;
	display: block;
	width: 64px;
	height: 64px;
	object-fit: cover;
}

/* Aucune photo définie : pas de cadre vide ni d'espace résiduel. */
.wp-block-post-author__avatar:empty {
	display: none;
}

.wp-block-post-author__byline {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--texte-3);
	margin-bottom: .3rem;
}

.wp-block-post-author__name {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: -.012em;
}

.wp-block-post-author__bio {
	font-size: .9375rem;
	line-height: 1.55;
	color: var(--wp--preset--color--texte-2);
	margin-top: .35rem;
}

.wp-block-post-navigation-link {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 600;
}

.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--texte-3);
	margin-bottom: .3rem;
}

/* --- Mobile : zones tactiles de 44 px minimum ----------------------------- */

@media (max-width: 781px) {

	.wp-block-button__link {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.gy-marques a {
		padding-block: .85rem;
	}

	.gy-media {
		min-height: 180px;
	}
}

/* --- Carte produit affiliée ----------------------------------------------
 * Structure imposée : deux colonnes wp:columns, image à gauche en
 * flex:0 0 45%, contenu à droite en flex:1 1 0;min-width:0.
 * Ne jamais mélanger une largeur en pixels et une largeur en pourcentage
 * entre les deux colonnes : le blanc résiduel n'apparaît qu'au-delà de
 * 1200 px de large et passe inaperçu sur écran étroit.
 */

.gy-product {
	border: 1px solid var(--wp--preset--color--filet-fort);
	background-color: var(--wp--preset--color--papier);
	padding: 26px 28px;
	margin: 32px 0;
}

.gy-product h3 {
	margin-top: 0;
}

.gy-product-img img {
	display: block;
	max-width: 100%;
	height: auto;
	background-color: var(--wp--preset--color--papier-2);
}

/* Vignette produit de l'accueil : hauteur commune et fond blanc.
 * Sans cette regle, l'aplat hachure de .gy-media reste visible au-dessus et
 * au-dessous des photos les plus basses, et les quatre cartes ne s'alignent
 * pas. object-fit: contain garde le produit entier quel que soit son format,
 * la ou cover le rognerait.
 */
.gy-product .gy-media {
	background-color: var(--wp--preset--color--papier);
	background-image: none;
	border-bottom: 1px solid var(--wp--preset--color--filet);
	height: 200px;
	padding: 16px;
}

.gy-product .gy-media .wp-block-image {
	width: 100%;
	height: 100%;
	margin: 0;
}

.gy-product .gy-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.gy-note {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: .8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--texte-3);
	margin: 0 0 .35rem;
}

.gy-pros,
.gy-cons {
	list-style-position: outside;
	padding-left: 1.2em;
	margin: 0;
}

.gy-pros li,
.gy-cons li {
	font-size: .9rem;
	line-height: 1.45;
	margin-bottom: .35rem;
	color: var(--wp--preset--color--texte-2);
}

.gy-pros li::marker {
	content: '\2713\00a0\00a0';
	color: #2E7D4F;
	font-weight: 700;
}

.gy-cons li::marker {
	content: '\2717\00a0\00a0';
	color: #B3261E;
	font-weight: 700;
}

.gy-btn-amazon .wp-block-button__link {
	width: 100%;
	text-align: center;
}

.gy-affil-note {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: .75rem;
	color: var(--wp--preset--color--texte-3);
	margin: .6rem 0 0;
}

/* Mention d'affiliation, à poser une fois par article avant la première carte */
.gy-affil {
	border-left: 3px solid var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--papier-2);
	padding: 14px 18px;
	margin: 28px 0;
}

.gy-affil p {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: .8125rem;
	line-height: 1.55;
	color: var(--wp--preset--color--texte-2);
}

@media (max-width: 781px) {

	.gy-product {
		padding: 20px 18px;
	}

	.gy-product-img {
		margin-bottom: 1rem;
	}
}

/* --- Corps d'article : aligné à gauche, pas centré ------------------------
 * Le bloc Contenu est en layout « default » à l'intérieur d'un groupe
 * alignwide. Il occupe donc le bord gauche de la zone large, au même aplomb
 * que le logo, le menu et le titre, au lieu d'être centré dans la page.
 */

.gy-corps > .wp-block-post-content {
	max-width: 880px;
}

.gy-corps > .wp-block-post-content > .alignwide,
.gy-corps > .wp-block-post-content > .alignfull {
	max-width: 100%;
}

/* Le logo remplace le titre du site : il porte déjà sa propre signature. */
.wp-block-site-logo img {
	height: auto;
}
