/*
Theme Name: Guimov
Theme URI: https://guimov.fr
Author: Guimov
Description: Thème portfolio sur mesure pour Guimov — photographie animalière, macro, paysages et voyage. Fond sombre, une couleur d'accent par thème, galerie filtrable par série.
Version: 1.7.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guimov
*/

/* Polices hébergées sur le site (pas d'appel à Google Fonts) */
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 500 600;
	font-display: swap;
	src: url('/wp-content/uploads/fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url('/wp-content/uploads/fonts/inter-latin.woff2') format('woff2');
}

:root {
	--g-fond: #121412;
	--g-fond-2: #1B1E1B;
	--g-bloc: #262A26;
	--g-trait: #2E332E;
	--g-trait-fort: #454B45;
	--g-texte: #ECE7DD;
	--g-texte-2: #D8D2C6;
	--g-texte-3: #A8A398;
	--g-animalier: #C9A063;
	--g-nature: #8FB07E;
	--g-voyage: #82A9C4;
	--g-titre: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--g-corps: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--g-largeur: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--g-fond);
	color: var(--g-texte);
	font-family: var(--g-corps);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
main img, .g-visionneuse img { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }

a { color: var(--g-texte); }
a:hover { color: var(--g-animalier); }

:focus-visible { outline: 2px solid var(--g-animalier); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.g-conteneur { max-width: var(--g-largeur); margin: 0 auto; padding: 0 32px; }

.g-surtitre {
	margin: 0;
	font-size: 13px;
	letter-spacing: 3px;
	text-transform: uppercase;
}

.g-titre-section {
	margin: 0;
	font-family: var(--g-titre);
	font-weight: 500;
	font-size: 56px;
	line-height: 1.1;
}

.g-bouton {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 2px;
	text-decoration: none;
	font-weight: 600;
	background: var(--g-texte);
	color: var(--g-fond);
	border: 1px solid var(--g-texte);
}
.g-bouton:hover { background: transparent; color: var(--g-texte); }
.g-bouton--contour { background: transparent; color: var(--g-texte); font-weight: 500; }
.g-bouton--contour:hover { background: var(--g-texte); color: var(--g-fond); }

/* En-tête */
.g-entete {
	max-width: var(--g-largeur);
	margin: 0 auto;
	padding: 22px 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.g-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--g-titre);
	font-size: 32px;
	font-weight: 600;
	letter-spacing: 1px;
	text-decoration: none;
	color: var(--g-texte);
}
.g-logo__symbole { width: 40px; height: 40px; flex: none; }
.g-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	font-size: 13px;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.g-nav a { text-decoration: none; }

/* Grande image d'accueil */
.g-hero {
	position: relative;
	height: 760px;
	max-height: 92vh;
	min-height: 520px;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
}
.g-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.g-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18,20,18,0) 45%, rgba(18,20,18,0.92) 100%);
}
.g-hero__contenu {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-bottom: 72px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.g-hero__surtitre { color: var(--g-animalier); }
.g-hero__titre {
	margin: 0;
	font-family: var(--g-titre);
	font-weight: 500;
	font-size: 84px;
	line-height: 1;
}
.g-hero__texte { margin: 0; max-width: 620px; font-size: 19px; color: var(--g-texte-2); }
.g-hero__boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* En-tête des pages de thème et de série */
.g-hero--page { height: 620px; max-height: 74vh; min-height: 440px; }
.g-hero--page .g-hero__contenu { padding-bottom: 56px; gap: 14px; }
.g-hero--page .g-hero__titre { font-size: 76px; }

/* Vignettes des thèmes */
.g-themes {
	padding-top: 96px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.g-carte {
	position: relative;
	height: 440px;
	overflow: hidden;
	border-radius: 4px;
	text-decoration: none;
	display: flex;
	align-items: flex-end;
	background: var(--g-bloc);
}
.g-carte img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.g-carte:hover img { transform: scale(1.04); }
.g-carte::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18,20,18,0) 40%, rgba(18,20,18,0.9) 100%);
}
.g-carte__texte {
	position: relative;
	z-index: 1;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}
.g-carte__trait { width: 40px; height: 3px; }
.g-carte__nom { font-family: var(--g-titre); font-size: 38px; line-height: 1.1; color: var(--g-texte); }
.g-carte__series { font-size: 14px; }

/* Portfolio */
.g-portfolio { padding-top: 112px; display: flex; flex-direction: column; gap: 32px; }
.g-portfolio__entete { display: flex; flex-direction: column; gap: 8px; }
.g-portfolio__intro { margin: 0; max-width: 640px; font-size: 18px; color: #CFC9BD; font-style: italic; }

.g-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.g-filtre {
	min-height: 44px;
	padding: 10px 20px;
	background: transparent;
	color: var(--g-texte);
	border: 1px solid var(--g-trait-fort);
	border-radius: 22px;
	font: 500 14px var(--g-corps);
	cursor: pointer;
}
.g-filtre:hover { border-color: var(--g-texte); }
.g-filtre[aria-pressed="true"] {
	background: var(--couleur, var(--g-texte));
	border-color: var(--couleur, var(--g-texte));
	color: var(--g-fond);
	font-weight: 600;
}

.g-grille { columns: 3 320px; column-gap: 20px; }
.g-photo { break-inside: avoid; margin: 0 0 28px; }
.g-photo[hidden] { display: none; }
.g-photo__bouton {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: var(--g-bloc);
	border-radius: 3px;
	overflow: hidden;
	cursor: zoom-in;
}
.g-photo__bouton img { display: block; width: 100%; height: auto; }
.g-photo figcaption { padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.g-photo__titre { font-family: var(--g-titre); font-size: 21px; line-height: 1.2; }
.g-photo__legende { font-size: 13px; }
/* Mise en page justifiée (activée par le script) : rangées pleines, même hauteur par rangée */
.g-grille.est-justifiee { columns: auto; display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 28px; }
.g-grille.est-justifiee .g-photo { margin: 0; flex: none; min-width: 0; }
.g-grille.est-justifiee .g-photo__bouton img { height: 100%; object-fit: cover; }
.g-vide { color: var(--g-texte-3); }

/* À propos */
.g-apropos { padding-top: 112px; display: flex; gap: 64px; align-items: center; }
.g-apropos__image, .g-apropos__texte { flex: 1 1 0; min-width: 0; }
.g-apropos__image img { display: block; width: 100%; height: 560px; object-fit: cover; border-radius: 4px; }
.g-apropos__vide {
	height: 560px;
	background: var(--g-bloc);
	border: 1px dashed #4A504A;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	font-size: 13px;
	letter-spacing: 2px;
	color: var(--g-texte-3);
}
.g-apropos__texte { display: flex; flex-direction: column; gap: 20px; }
.g-apropos__contenu p { margin: 0 0 20px; color: var(--g-texte-2); font-size: 18px; }
.g-apropos__materiel { margin: 0; color: var(--g-texte-3); font-size: 14px; letter-spacing: 1px; }

/* Tirages */
.g-tirages { padding-top: 112px; }
.g-tirages__bloc {
	background: var(--g-fond-2);
	border: 1px solid var(--g-trait);
	border-radius: 4px;
	padding: 56px;
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: center;
	justify-content: space-between;
}
.g-tirages__texte { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.g-tirages__texte p { margin: 0; color: #CFC9BD; }
.g-tirages__titre { margin: 0; font-family: var(--g-titre); font-weight: 500; font-size: 44px; line-height: 1.1; }
.g-tirages .g-bouton { background: var(--g-animalier); border-color: var(--g-animalier); color: var(--g-fond); }
.g-tirages .g-bouton:hover { background: transparent; color: var(--g-animalier); }

/* Pied de page et section Contact */
.g-pied { padding-top: 112px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 72px; }
.g-contact { display: flex; flex-direction: column; align-items: center; text-align: center; }
.g-contact__titre { margin: 14px 0 0; font-family: var(--g-titre); font-weight: 500; font-size: 48px; line-height: 1.1; }
.g-contact__texte { margin: 18px 0 0; max-width: 520px; color: var(--g-texte-2); font-size: 16px; }
.g-contact__liens {
	margin-top: 44px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}
.g-contact__lien {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 280px;
	padding: 28px 32px 26px;
	border: 1px solid var(--g-trait-fort);
	border-radius: 16px;
	background: var(--g-fond-2);
	color: var(--g-texte);
	text-decoration: none;
	transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.g-contact__lien:hover,
.g-contact__lien:focus-visible {
	color: var(--g-texte);
	border-color: var(--g-animalier);
	background: var(--g-bloc);
	transform: translateY(-2px);
}
.g-contact__icone { width: 30px; height: 30px; margin-bottom: 8px; color: var(--g-animalier); }
.g-contact__libelle { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--g-texte-3); }
.g-contact__valeur { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.g-pied__bas {
	border-top: 1px solid var(--g-trait);
	padding-top: 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: var(--g-texte-3);
}
.g-pied__bas a { color: var(--g-texte-3); }
.g-pied > .g-conteneur { width: 100%; }
.g-contact__lien { width: 340px; }
.g-contact__valeur { white-space: nowrap; }
.g-pied__bas { justify-content: center; column-gap: 28px; text-align: center; }

/* Pages simples (mentions légales…) */
.g-page { padding-top: 64px; padding-bottom: 64px; max-width: 820px; }
.g-page h1 { font-family: var(--g-titre); font-weight: 500; font-size: 52px; line-height: 1.1; margin: 0 0 32px; }
.g-page h2, .g-page h3 { font-family: var(--g-titre); font-weight: 500; }
.g-page a { color: var(--g-animalier); }

/* Visionneuse plein écran */
.g-visionneuse {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(10, 11, 10, 0.96);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 72px 24px;
	gap: 14px;
}
.g-visionneuse[hidden] { display: none; }
.g-visionneuse img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; }
.g-visionneuse__legende { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.g-visionneuse button {
	position: absolute;
	width: 48px;
	height: 48px;
	border: 1px solid var(--g-trait-fort);
	border-radius: 50%;
	background: rgba(18,20,18,0.7);
	color: var(--g-texte);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.g-visionneuse button:hover { border-color: var(--g-texte); }
.g-visionneuse__fermer { top: 16px; right: 16px; }
.g-visionneuse__prec { left: 16px; top: 50%; transform: translateY(-50%); }
.g-visionneuse__suiv { right: 16px; top: 50%; transform: translateY(-50%); }

/* Bouton du menu (téléphone) */
.g-menu-bouton {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 1px solid var(--g-trait-fort);
	border-radius: 4px;
	color: var(--g-texte);
	cursor: pointer;
}
.g-menu-bouton svg { width: 22px; height: 22px; }
.g-menu-bouton .g-icone-fermer { display: none; }
.g-entete.est-ouvert .g-icone-ouvrir { display: none; }
.g-entete.est-ouvert .g-icone-fermer { display: block; }

/* Tablette */
@media (max-width: 1000px) {
	.g-carte { height: 320px; }
	.g-carte__nom { font-size: 30px; }
	.g-carte__texte { padding: 20px; }
	.g-apropos { gap: 40px; }
	.g-apropos__image img, .g-apropos__vide { height: 460px; }
	.g-hero__titre { font-size: 64px; }
	.g-hero--page .g-hero__titre { font-size: 58px; }
}

/* Petite tablette et téléphone */
@media (max-width: 760px) {
	.g-conteneur, .g-entete { padding-left: 20px; padding-right: 20px; }
	.g-entete { padding-top: 14px; padding-bottom: 14px; }
	.g-logo { font-size: 28px; gap: 10px; }
	.g-logo__symbole { width: 34px; height: 34px; }

	.g-menu-bouton { display: inline-flex; }
	.g-nav { display: none; width: 100%; }
	.g-entete.est-ouvert .g-nav { display: block; }
	.g-nav ul { flex-direction: column; gap: 0; font-size: 14px; }
	.g-nav a { display: block; padding: 14px 0; border-top: 1px solid var(--g-trait); }

	.g-hero { height: auto; min-height: 78vh; max-height: none; }
	.g-hero__contenu { padding-top: 140px; padding-bottom: 40px; gap: 14px; }
	.g-hero__titre { font-size: 44px; line-height: 1.05; }
	.g-hero__texte { font-size: 16px; }
	.g-hero--page { min-height: 58vh; }
	.g-hero--page .g-hero__contenu { padding-top: 120px; }
	.g-hero--page .g-hero__titre { font-size: 42px; }
	.g-surtitre { font-size: 11px; letter-spacing: 2px; }

	/* Vignettes des thèmes : défilement horizontal au doigt */
	.g-themes {
		display: flex;
		gap: 12px;
		padding-top: 48px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.g-themes::-webkit-scrollbar { display: none; }
	.g-carte { flex: 0 0 78%; height: 300px; scroll-snap-align: start; }

	.g-portfolio { padding-top: 72px; gap: 22px; }
	.g-titre-section { font-size: 40px; }
	.g-portfolio__intro { font-size: 16px; }

	/* Boutons des séries : une seule ligne qui défile */
	.g-filtres {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 -20px;
		padding: 0 20px 6px;
		scrollbar-width: none;
	}
	.g-filtres::-webkit-scrollbar { display: none; }
	.g-filtre { flex: 0 0 auto; }

	.g-grille { column-gap: 14px; }
	.g-photo { margin-bottom: 22px; }
	.g-grille.est-justifiee { row-gap: 22px; }
	.g-photo__titre { font-size: 19px; }

	.g-apropos { padding-top: 72px; flex-direction: column; gap: 28px; }
	.g-apropos__image, .g-apropos__texte { flex: none; width: 100%; }
	.g-apropos__image img, .g-apropos__vide { height: 380px; }
	.g-apropos__contenu p { font-size: 16px; }

	.g-tirages { padding-top: 72px; }
	.g-tirages__bloc { padding: 28px 22px; }
	.g-tirages__titre { font-size: 34px; }

	.g-pied { padding-top: 72px; padding-bottom: 32px; gap: 48px; }
	.g-contact__titre { font-size: 36px; }
	.g-contact__texte { font-size: 15px; }
	.g-contact__liens { margin-top: 32px; flex-direction: column; align-items: stretch; width: 100%; max-width: 380px; gap: 14px; }
	.g-contact__lien { width: auto; min-width: 0; padding: 22px 20px; }
	.g-contact__valeur { white-space: normal; }
	.g-pied__bas { justify-content: center; text-align: center; }

	.g-page { padding-top: 32px; }
	.g-page h1 { font-size: 38px; }

	.g-visionneuse { padding: 64px 12px 80px; }
	.g-visionneuse img { max-height: calc(100vh - 200px); }
	.g-visionneuse__prec, .g-visionneuse__suiv { top: auto; bottom: 16px; transform: none; }
}

/* Petits téléphones */
@media (max-width: 380px) {
	.g-hero__titre { font-size: 38px; }
	.g-titre-section { font-size: 34px; }
	.g-carte { flex-basis: 85%; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.g-carte img { transition: none; }
}
