/*
Theme Name: Jade Rossi
Theme URI: https://jaderossi.com
Author: NETFORCEPLUS
Description: Thème sur mesure du site de la photographe Jade Rossi — liste de projets, séries (photos seules ou diptyques), plein écran, bilingue FR/EN avec Polylang. Nécessite l'extension Secure Custom Fields.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jade-rossi
*/

/* ==========================================================================
   Variables
   ========================================================================== */

:root {
	--jr-bg: #ffffff;
	--jr-fg: #1b1a18;
	--jr-muted: #67625a;
	--jr-line: #e6e3de;
	--jr-fs-bg: #3c3c3c;
	--jr-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
	--jr-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
	--jr-header: 88px;
	--jr-footer: 56px;
	--jr-pad: 64px;
	--jr-flash-ms: 450ms;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--jr-bg);
	color: var(--jr-fg);
	font-family: var(--jr-sans);
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
}

a:hover {
	opacity: .7;
}

button {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

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

.lien-evitement {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--jr-fg);
	color: var(--jr-bg);
	text-decoration: none;
}

.lien-evitement:focus {
	top: 16px;
}

.bouton-icone {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
	text-decoration: none;
}

.bouton-icone:hover {
	opacity: .6;
}

.bouton,
.formulaire button[type="submit"],
.formulaire input[type="submit"] {
	display: inline-block;
	padding: 14px 36px;
	border: 0;
	border-radius: 0;
	background: var(--jr-fg);
	color: var(--jr-bg);
	font-family: var(--jr-sans);
	font-size: 13px;
	letter-spacing: .18em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}

.bouton:hover,
.formulaire button[type="submit"]:hover,
.formulaire input[type="submit"]:hover {
	opacity: .85;
}

.titre-page {
	margin: 0 0 20px;
	font-family: var(--jr-serif);
	font-weight: 400;
	font-size: 52px;
	line-height: 1.05;
}

.texte-riche {
	font-size: 16px;
	line-height: 1.6;
	font-weight: 300;
}

.texte-riche > :first-child {
	margin-top: 0;
}

.texte-riche p {
	margin: 0 0 1em;
}

.texte-riche a {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.vide {
	margin: auto;
	padding: 64px 24px;
	text-align: center;
	color: var(--jr-muted);
}

/* Défilement sans barre (liste d'accueil) */
.sans-barre {
	scrollbar-width: none;
	overscroll-behavior: contain;
}

.sans-barre::-webkit-scrollbar {
	display: none;
}

/* Barre de défilement fine (texte des projets) */
.barre-fine {
	scrollbar-width: thin;
	scrollbar-color: rgba(128, 128, 128, .35) transparent;
	overscroll-behavior: contain;
}

.barre-fine::-webkit-scrollbar {
	width: 6px;
}

.barre-fine::-webkit-scrollbar-track {
	background: transparent;
}

.barre-fine::-webkit-scrollbar-thumb {
	background: rgba(128, 128, 128, .3);
	border-radius: 3px;
}

.barre-fine:hover::-webkit-scrollbar-thumb {
	background: rgba(128, 128, 128, .6);
}

/* ==========================================================================
   En-tête
   ========================================================================== */

.entete {
	height: var(--jr-header);
	flex-shrink: 0;
	padding: 0 var(--jr-pad);
	display: flex;
	align-items: center;
	gap: 48px;
	border-bottom: 1px solid var(--jr-line);
	background: var(--jr-bg);
}

.marque {
	font-family: var(--jr-serif);
	font-size: 30px;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.nav {
	flex-grow: 1;
}

.nav__liste {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 36px;
	font-size: 14px;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.nav__liste a {
	display: inline-block;
	padding: 12px 0;
	border-bottom: 1px solid transparent;
	text-decoration: none;
}

.nav__liste .current-menu-item > a,
.nav__liste .current_page_item > a {
	border-bottom-color: currentColor;
}

.nav__fermer,
.nav__pied,
.outils__mobile {
	display: none;
}

.outils {
	display: flex;
	align-items: center;
	gap: 4px;
}

.langues {
	margin: 0 0 0 8px;
	padding: 0;
	list-style: none;
	display: flex;
	align-items: center;
	font-size: 13px;
	letter-spacing: .12em;
}

.langues li + li::before {
	content: "/";
	color: var(--jr-muted);
}

.langues a {
	display: inline-block;
	padding: 12px 6px;
	text-decoration: none;
	opacity: .45;
}

.langues a.is-current {
	opacity: 1;
}

/* ==========================================================================
   Zone principale
   ========================================================================== */

.principal {
	flex-grow: 1;
	min-height: 0;
	position: relative;
	display: flex;
	flex-direction: column;
}

.principal > * {
	flex-grow: 1;
}

/* ==========================================================================
   Accueil
   ========================================================================== */

.accueil {
	display: grid;
	grid-template-columns: 420px minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: 64px;
	padding: 48px var(--jr-pad);
	min-height: 0;
}

.accueil__colonne {
	position: relative;
	min-height: 0;
}

.accueil__liste {
	height: 100%;
	overflow-y: auto;
}

.accueil__projets {
	min-height: 100%;
	margin: 0;
	padding: 8px 0 72px;
	list-style: none;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
}

.accueil__projet {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 6px 0;
	text-decoration: none;
	opacity: .4;
	transition: opacity .25s ease;
}

.accueil__projet.is-active,
.accueil__projet:hover {
	opacity: 1;
}

.accueil__titre {
	font-family: var(--jr-serif);
	font-size: 44px;
	line-height: 1.1;
}

.accueil__annee {
	font-size: 13px;
	letter-spacing: .12em;
}

.accueil__suite {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 120px;
	display: flex;
	align-items: flex-end;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--jr-bg) 72%);
	pointer-events: none;
}

.accueil__suite[hidden] {
	display: none;
}

.accueil__suite-bouton {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 0;
	border: 0;
	background: none;
	color: var(--jr-muted);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
}

.accueil__couvertures {
	position: relative;
	min-height: 0;
}

.accueil__couverture {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s;
}

.accueil__couverture.is-active {
	opacity: 1;
	visibility: visible;
}

.accueil__couverture:hover {
	opacity: 1;
}

.accueil__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cartes {
	display: none;
}

/* ==========================================================================
   Projet
   ========================================================================== */

.projet {
	display: grid;
	grid-template-columns: 440px minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: 64px;
	padding: 48px var(--jr-pad);
	min-height: 0;
}

.projet__colonne {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: 0;
}

.projet__texte {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 20px;
}

.projet__entete {
	margin-bottom: 22px;
}

.projet__titre {
	margin: 0;
	font-family: var(--jr-serif);
	font-weight: 400;
	font-size: 52px;
	line-height: 1.05;
}

.projet__annee {
	margin: 8px 0 0;
	font-size: 13px;
	letter-spacing: .14em;
	color: var(--jr-muted);
}

.projet__presentation {
	margin-bottom: 22px;
}

.rubrique {
	margin: 0 0 22px;
}

.rubrique__titre {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--jr-muted);
}

.rubrique__ligne {
	margin: 0 0 4px;
	font-size: 15px;
	line-height: 1.5;
	white-space: pre-line;
}

.rubrique__ligne--texte {
	font-weight: 300;
}

.rubrique__ligne a {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.projet__action {
	margin: 0;
	flex-shrink: 0;
}

.projet__couverture {
	margin: 0;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.projet__couverture img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* ==========================================================================
   Série
   ========================================================================== */

.serie {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px 40px 24px;
	min-height: 0;
}

.serie__scene {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.serie__fleche {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
}

.serie__vues {
	position: relative;
	flex: 1 1 auto;
	height: 100%;
	min-width: 0;
}

.vue {
	position: absolute;
	inset: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 32px;
	visibility: hidden;
	opacity: 0;
}

.vue.is-active {
	visibility: visible;
	opacity: 1;
}

.vue__photo {
	flex: 1 1 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}

.vue--diptyque .vue__photo {
	flex-basis: calc(50% - 16px);
}

.vue--diptyque .vue__photo:first-child {
	justify-content: flex-end;
}

.vue--diptyque .vue__photo:last-child {
	justify-content: flex-start;
}

.vue__photo img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.serie__flash {
	position: absolute;
	inset: 0;
	background: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--jr-flash-ms) ease;
}

.serie__barre {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 var(--jr-pad);
	font-size: 13px;
	letter-spacing: .12em;
	color: var(--jr-muted);
}

.serie__retour {
	padding: 10px 0;
	text-decoration: none;
}

/* ==========================================================================
   Bio, Contact, pages simples
   ========================================================================== */

.bio {
	display: grid;
	grid-template-columns: 440px minmax(0, 620px);
	gap: 80px;
	align-items: center;
	padding: 64px 120px;
}

.bio__portrait {
	margin: 0;
}

.bio__portrait img {
	width: 100%;
}

.bio .texte-riche {
	font-size: 17px;
	line-height: 1.7;
}

.contact {
	display: grid;
	grid-template-columns: 380px minmax(0, 640px);
	gap: 96px;
	padding: 48px 120px;
	align-items: start;
}

.contact__intro p {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	font-weight: 300;
}

.page-simple {
	width: 100%;
	max-width: 760px;
	padding: 48px var(--jr-pad);
}

/* Champs de formulaire (Fluent Forms, Brevo…) */
.formulaire label {
	font-size: 13px;
	letter-spacing: .04em;
	font-weight: 400;
}

.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire input[type="tel"],
.formulaire input[type="url"],
.formulaire select,
.formulaire textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-family: var(--jr-sans);
	font-size: 15px;
	box-shadow: none;
}

.formulaire select option {
	color: var(--jr-fg);
	background: var(--jr-bg);
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

.pied {
	min-height: var(--jr-footer);
	flex-shrink: 0;
	padding: 0 var(--jr-pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	border-top: 1px solid var(--jr-line);
	font-size: 12px;
	letter-spacing: .06em;
	color: var(--jr-muted);
}

.pied__mention {
	margin: 0;
}

.pied a {
	text-decoration: none;
}

.pied__liste {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 24px;
}

/* ==========================================================================
   Fenêtre newsletter
   ========================================================================== */

.fenetre {
	width: min(480px, calc(100% - 32px));
	padding: 0;
	border: 0;
	background: var(--jr-bg);
	color: var(--jr-fg);
}

.fenetre::backdrop {
	background: rgba(10, 10, 10, .5);
}

.fenetre__boite {
	position: relative;
	padding: 40px;
}

.fenetre__fermer {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0;
}

.fenetre__titre {
	margin: 0 32px 18px 0;
	font-family: var(--jr-serif);
	font-weight: 400;
	font-size: 30px;
	line-height: 1.2;
}

.fenetre__mentions {
	margin: 18px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--jr-muted);
}

/* ==========================================================================
   Visionneuse plein écran
   ========================================================================== */

.visionneuse {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--jr-fs-bg);
}

.visionneuse::backdrop {
	background: var(--jr-fs-bg);
}

.visionneuse__zone {
	width: 100%;
	height: 100%;
	padding: 40px;
	border: 0;
	background: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
}

.visionneuse__image {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* ==========================================================================
   Ordinateur : accueil, projet et série occupent exactement la hauteur de l'écran
   ========================================================================== */

@media (min-width: 900px) and (min-height: 600px) {
	body.jr-cadre {
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}

	body.jr-cadre .principal {
		overflow: hidden;
	}
}

/* ==========================================================================
   Écrans intermédiaires
   ========================================================================== */

@media (min-width: 900px) and (max-width: 1200px) {
	:root {
		--jr-pad: 40px;
	}

	.entete {
		gap: 32px;
	}

	.accueil,
	.projet {
		grid-template-columns: 360px minmax(0, 1fr);
		gap: 40px;
	}

	.bio,
	.contact {
		padding-left: var(--jr-pad);
		padding-right: var(--jr-pad);
		gap: 48px;
	}
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 899px) {
	:root {
		--jr-header: 64px;
		--jr-pad: 24px;
	}

	.entete {
		position: sticky;
		top: 0;
		z-index: 20;
		padding: 0 12px 0 20px;
		gap: 4px;
	}

	.marque {
		flex-grow: 1;
		font-size: 24px;
	}

	.outils__bureau {
		display: none;
	}

	.outils__mobile {
		display: inline-flex;
	}

	/* Menu plein écran */
	.nav {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 50;
		padding: 10px 12px 32px 20px;
		background: var(--jr-bg);
		flex-direction: column;
	}

	body.menu-ouvert {
		overflow: hidden;
	}

	body.menu-ouvert .nav {
		display: flex;
	}

	.nav__fermer {
		display: inline-flex;
		align-self: flex-end;
		margin-bottom: 48px;
	}

	.nav__liste {
		flex-direction: column;
		gap: 12px;
		font-family: var(--jr-serif);
		font-size: 40px;
		letter-spacing: 0;
		text-transform: none;
	}

	.nav__liste a {
		padding: 4px 0;
	}

	.nav__pied {
		display: flex;
		align-items: center;
		gap: 16px;
		margin-top: auto;
	}

	.nav__pied .langues {
		margin: 0;
		font-size: 14px;
	}

	.nav__pied .langues li + li::before {
		content: none;
	}

	/* Accueil : cartes */
	.accueil {
		display: none;
	}

	.cartes {
		display: flex;
		flex-direction: column;
		gap: 32px;
		margin: 0;
		padding: 24px 24px 8px;
		list-style: none;
	}

	.carte {
		display: flex;
		flex-direction: column;
		gap: 10px;
		text-decoration: none;
	}

	.carte__image img {
		width: 100%;
		aspect-ratio: 3 / 2;
		object-fit: cover;
	}

	.carte__legende {
		display: flex;
		align-items: baseline;
		gap: 12px;
	}

	.carte__titre {
		font-family: var(--jr-serif);
		font-size: 30px;
		line-height: 1.15;
	}

	.carte__annee {
		font-size: 12px;
		letter-spacing: .12em;
		color: var(--jr-muted);
	}

	/* Projet */
	.projet {
		display: flex;
		flex-direction: column;
		gap: 20px;
		padding: 24px;
	}

	.projet__couverture {
		order: -1;
	}

	.projet__couverture img {
		width: 100%;
		max-height: none;
	}

	.projet__texte {
		overflow: visible;
		padding-right: 0;
	}

	.projet__titre {
		font-size: 40px;
	}

	.projet__action .bouton {
		display: block;
		width: 100%;
		text-align: center;
	}

	/* Série : photos les unes sous les autres */
	.serie {
		padding: 20px 24px;
	}

	.serie__barre {
		order: -1;
		padding: 0;
	}

	.serie__compteur,
	.serie__fleche,
	.serie__flash {
		display: none;
	}

	.serie__scene,
	.serie__vues {
		display: block;
		height: auto;
	}

	.vue,
	.vue.is-active {
		position: static;
		visibility: visible;
		opacity: 1;
		flex-direction: column;
		gap: 16px;
		margin-bottom: 16px;
	}

	.vue__photo,
	.vue--diptyque .vue__photo {
		width: 100%;
		height: auto;
		flex-basis: auto;
	}

	.vue__photo img {
		width: 100%;
		max-height: none;
	}

	/* Bio, contact */
	.titre-page {
		font-size: 40px;
	}

	.bio,
	.contact {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		padding: 24px;
	}

	.bio .texte-riche {
		font-size: 16px;
	}

	.page-simple {
		padding: 24px;
	}

	/* Pied */
	.pied {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin-top: 24px;
		padding: 20px 24px 28px;
		line-height: 1.5;
	}

	.pied__liste {
		gap: 18px;
	}

	.fenetre__boite {
		padding: 28px 24px;
	}

	.fenetre__titre {
		font-size: 26px;
	}

	.visionneuse__zone {
		padding: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0s !important;
		scroll-behavior: auto !important;
	}
}
