/*
Theme Name: Greg Orechowa
Theme URI: https://cornillet.com
Author: Damien Cornillet
Author URI: https://cornillet.com
Description: Thème sur mesure, minimaliste, pour Greg Orechowa, sculpteur fondeur. Catalogue d'œuvres avec fiche technique et diaporama, formulaire de contact intégré, compatible Elementor (version gratuite).
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: orechowa
*/

/* ==========================================================================
   Charte graphique (d'après les maquettes)
   ========================================================================== */
:root {
	--og-fond: #fdfdfa;
	--og-texte: #1a1a18;
	--og-trait: #c5c6c6;
	--og-accent: #bfc0b5;
	--og-doux: #6f6f69;
	--og-police: 'Gilroy', 'Urbanist', 'Helvetica Neue', Arial, sans-serif;
	--og-largeur: 1000px;
	--og-marge: clamp(20px, 5vw, 48px);
	--og-ecart-col: clamp(20px, 8.5vw, 86px);
	--og-ecart-lig: clamp(36px, 6vw, 64px);
}

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

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

body {
	margin: 0;
	background: var(--og-fond);
	color: var(--og-texte);
	font-family: var(--og-police);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

a { color: inherit; text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: .6; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 1px solid var(--og-texte); outline-offset: 4px; }

h1, h2, h3, h4, h5, h6 { font-weight: 300; line-height: 1.25; margin: 0 0 .8em; }
strong, b { font-weight: 500; }

.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;
}
.og-skip:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	padding: 10px 16px; top: 10px; left: 10px; z-index: 1000;
	background: var(--og-texte); color: var(--og-fond);
}

/* ==========================================================================
   En-tête
   ========================================================================== */
.og-entete {
	padding: clamp(28px, 5vw, 44px) var(--og-marge) 0;
	text-align: center;
}

.og-logo { margin: 0; font-size: inherit; font-weight: inherit; line-height: 1; }
.og-logo a { display: inline-flex; flex-direction: column; align-items: center; }
.og-logo a:hover { opacity: 1; }

.og-monogram {
	width: clamp(40px, 5vw, 52px);
	height: auto;
	color: var(--og-accent);
	margin-bottom: clamp(14px, 2vw, 20px);
}
.og-logo__image { max-height: 70px; width: auto; margin-bottom: 16px; }

.og-logo__nom {
	font-size: clamp(22px, 3.3vw, 34px);
	font-weight: 300;
	letter-spacing: .2em;
	text-transform: uppercase;
	margin-right: -.2em; /* compense l'espacement final */
}

.og-logo__sous-titre {
	margin-top: 10px;
	font-size: clamp(9px, 1vw, 11px);
	letter-spacing: .38em;
	text-transform: uppercase;
	margin-right: -.38em;
	color: var(--og-texte);
	opacity: .75;
}

/* Menu */
.og-nav { margin-top: clamp(28px, 4vw, 40px); }

.og-nav__liste {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}
.og-nav__liste li { display: flex; align-items: center; }
.og-nav__liste li + li::before {
	content: '';
	width: 1px; height: 22px;
	background: var(--og-accent);
}
.og-nav__liste a {
	display: block;
	padding: 2px clamp(12px, 2vw, 20px);
	font-size: 15px;
	letter-spacing: .06em;
}
.og-nav__liste .current-menu-item > a,
.og-nav__liste .current_page_item > a,
.og-nav__liste .current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-color: var(--og-accent);
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

.og-nav__bouton {
	display: none;
	background: none; border: 0; cursor: pointer;
	font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
	padding: 8px 12px;
}

@media (max-width: 560px) {
	.og-nav__bouton { display: inline-block; }
	.og-nav__liste { display: none; flex-direction: column; gap: 6px; padding-top: 12px; }
	.og-nav__liste li + li::before { display: none; }
	.og-menu-ouvert .og-nav__liste { display: flex; }
	.og-nav__liste a { padding: 6px 12px; font-size: 16px; }
}

/* ==========================================================================
   Contenu
   ========================================================================== */
.og-contenu {
	flex: 1;
	width: 100%;
	padding: clamp(40px, 6vw, 64px) 0 clamp(60px, 8vw, 100px);
}

.og-oeuvres,
.og-page,
.og-fiche {
	width: 100%;
	max-width: calc(var(--og-largeur) + 2 * var(--og-marge));
	margin: 0 auto;
	padding: 0 var(--og-marge);
}

.og-page--elementor { max-width: none; padding: 0; }
.og-pleine-largeur { width: 100%; }

.og-titre-page { font-size: 22px; letter-spacing: .12em; text-transform: uppercase; text-align: center; }

.og-texte { font-size: 15px; line-height: 1.8; }
.og-texte > :first-child { margin-top: 0; }
.og-texte a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--og-accent); }

.og-vide { text-align: center; color: var(--og-doux); font-size: 14px; }

/* ==========================================================================
   Grille des œuvres
   ========================================================================== */
.og-grille {
	--og-cols: 3;
	list-style: none;
	margin: 0 auto; padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--og-cols), minmax(0, 1fr));
	column-gap: var(--og-ecart-col);
	row-gap: var(--og-ecart-lig);
}

.og-carte__lien { display: block; text-align: center; }
.og-carte__lien:hover { opacity: 1; }

.og-carte__image {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--og-trait);
	overflow: hidden;
	background: var(--og-fond);
}
.og-carte__image img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .4s ease;
}
.og-carte__lien:hover .og-carte__image img { transform: scale(1.035); }

.og-carte__statut {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 6px;
	background: rgba(253, 253, 250, .88);
	font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
}

.og-carte__nom,
.og-carte__matiere { display: block; font-size: 13px; line-height: 1.45; }
.og-carte__nom { margin-top: 12px; }
.og-carte__lien:hover .og-carte__nom { text-decoration: underline; text-decoration-color: var(--og-accent); text-underline-offset: 4px; }

@media (max-width: 900px) {
	.og-grille { --og-cols: 2 !important; }
}
@media (max-width: 460px) {
	.og-grille { --og-cols: 1 !important; }
	.og-oeuvres { max-width: 380px; }
}

/* ==========================================================================
   Fiche œuvre
   ========================================================================== */
.og-fiche {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(28px, 6vw, 64px);
	align-items: start;
	max-width: calc(940px + 2 * var(--og-marge));
}

.og-diaporama { position: relative; }

.og-diaporama__piste {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border: 1px solid var(--og-trait);
	aspect-ratio: 1 / 1;
	background: var(--og-fond);
}
.og-diaporama__piste::-webkit-scrollbar { display: none; }

.og-diaporama__vue {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: start;
	display: flex;
	align-items: center;
	justify-content: center;
}
.og-diaporama__vue a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.og-diaporama__vue a:hover { opacity: 1; }
.og-diaporama__vue img { width: 100%; height: 100%; object-fit: cover; }

.og-diaporama:has(.og-diaporama__points) { margin-bottom: 30px; }
.og-diaporama__points {
	position: absolute;
	top: 100%; left: 0; right: 0;
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 16px;
}

/* Flèches (fiche et plein écran) */
.og-fleche {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 42px; height: 42px;
	margin-top: -21px;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(253, 253, 250, .82);
	color: var(--og-texte);
	cursor: pointer;
	transition: opacity .25s ease, background .2s ease;
}
.og-fleche svg { width: 20px; height: 20px; }
.og-fleche:hover { background: var(--og-fond); }
.og-fleche:disabled { opacity: 0; pointer-events: none; }
.og-fleche--prec { left: 12px; }
.og-fleche--suiv { right: 12px; }
.og-fleche--prec svg { margin-left: -2px; }
.og-fleche--suiv svg { margin-right: -2px; }
@media (hover: hover) {
	.og-diaporama .og-fleche:not(:disabled) { opacity: .7; }
	.og-diaporama:hover .og-fleche:not(:disabled),
	.og-diaporama .og-fleche:focus-visible { opacity: 1; }
}
@media (max-width: 560px) {
	.og-fleche { width: 34px; height: 34px; margin-top: -17px; }
	.og-fleche--prec { left: 6px; }
	.og-fleche--suiv { right: 6px; }
}
.og-diaporama__points button {
	width: 7px; height: 7px;
	padding: 0;
	border: 0; border-radius: 50%;
	background: var(--og-texte);
	opacity: .25;
	cursor: pointer;
	transition: opacity .2s ease, transform .2s ease;
}
.og-diaporama__points button[aria-current="true"] { opacity: 1; }
.og-diaporama__points button:hover { opacity: .7; }

.og-fiche__infos { font-size: 14px; line-height: 1.6; padding-top: 2px; }

.og-fiche__titre {
	font-size: 15px;
	font-weight: 400;
	letter-spacing: .04em;
	margin: 0 0 14px;
}
.og-fiche__date { margin: 0 0 14px; }

.og-fiche__liste { margin: 0; }
.og-fiche__liste > div { margin: 0 0 14px; }
.og-fiche__liste dt,
.og-fiche__liste dd { display: inline; margin: 0; }
.og-fiche__liste dd p { margin: .35em 0 0; }
.og-fiche__description dt,
.og-fiche__description dd { display: block; }
.og-fiche__description dd { line-height: 1.75; }

.og-fiche__actions { display: flex; gap: 22px; margin: 0 0 18px; }
.og-lien-action {
	background: none;
	border: 0;
	border-bottom: 1px solid transparent;
	padding: 0 0 2px;
	cursor: pointer;
	font-size: 13px;
	letter-spacing: .14em;
	text-transform: uppercase;
	transition: border-color .2s ease;
}
.og-lien-action:hover { border-bottom-color: var(--og-texte); }

.og-fiche__statut {
	margin: 0 0 18px;
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--og-doux);
}

.og-fiche__question { margin: 4px 0 0; }
.og-lien-question {
	background: none; border: 0; padding: 0; cursor: pointer;
	font-size: 14px;
	text-decoration: underline;
	text-decoration-color: var(--og-accent);
	text-underline-offset: 4px;
}
.og-lien-question:hover { text-decoration-color: var(--og-texte); }

.og-fiche__nav { margin-top: 40px; font-size: 12px; letter-spacing: .08em; color: var(--og-doux); }

@media (max-width: 760px) {
	.og-fiche { grid-template-columns: 1fr; max-width: 560px; }
}

/* ==========================================================================
   Formulaires
   ========================================================================== */
.og-cadre {
	border: 1px solid var(--og-trait);
	padding: clamp(18px, 2.6vw, 28px) clamp(16px, 2.8vw, 28px) clamp(16px, 2vw, 22px);
	max-width: 840px;
	margin: 0 auto;
	scroll-margin-top: 40px;
}

.og-form { margin: 0; }
.og-form p { margin: 0; }
.og-field { margin-bottom: 10px !important; }

.og-form input[type="email"],
.og-form input[type="text"],
.og-form textarea {
	width: 100%;
	border: 1px solid var(--og-trait);
	border-radius: 0;
	background: transparent;
	color: var(--og-texte);
	font: inherit;
	font-size: 13px;
	font-weight: 400;
	padding: 12px 14px;
	appearance: none;
	transition: border-color .2s ease;
}
.og-form textarea { min-height: 170px; resize: vertical; line-height: 1.6; }
.og-form ::placeholder { color: var(--og-texte); opacity: .85; }
.og-form input:focus,
.og-form textarea:focus { outline: none; border-color: var(--og-texte); }

.og-form__objet {
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin-bottom: 14px !important;
}

.og-form__pied { display: flex; justify-content: center; margin-top: 6px; }

.og-bouton {
	min-width: min(100%, 250px);
	padding: 9px 28px;
	border: 1px solid var(--og-texte);
	border-radius: 0;
	background: var(--og-texte);
	color: var(--og-fond);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .04em;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.og-bouton:hover { background: transparent; color: var(--og-texte); }
.og-bouton:disabled { opacity: .5; cursor: wait; }

.og-form__rgpd { margin-top: 12px !important; text-align: center; font-size: 11px; color: var(--og-doux); }

.og-form__statut p { margin-top: 12px; text-align: center; font-size: 13px; }
.og-ok { color: #3c5a3a; }
.og-erreur { color: #8a2b22; }

.og-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Page Contact */
.og-contact { max-width: 840px; margin: 0 auto; }

.og-coordonnees {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 18px 28px;
	padding: 0 clamp(0px, 3vw, 28px);
	margin: 0 0 clamp(20px, 3vw, 28px);
	font-size: 13px;
	line-height: 1.5;
}
.og-coordonnees p { margin: 0; }
.og-coordonnees__nom { font-weight: 400; }

@media (max-width: 600px) {
	.og-coordonnees { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Fenêtres (question, zoom)
   ========================================================================== */
.og-fenetre,
.og-zoom {
	border: 0;
	padding: 0;
	background: var(--og-fond);
	color: var(--og-texte);
	max-width: min(720px, calc(100vw - 32px));
	width: 100%;
}
.og-fenetre::backdrop { background: rgba(26, 26, 24, .45); }
.og-fenetre .og-cadre { border: 0; padding: clamp(36px, 5vw, 48px) clamp(18px, 4vw, 36px) clamp(20px, 3vw, 28px); }
.og-fenetre[open] { animation: og-apparition .25s ease; }
.og-fenetre {
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Page figée derrière une fenêtre ouverte */
html.og-fige { overflow: hidden; }

/* Mobile : la fenêtre devient une page plein écran qui défile */
@media (max-width: 600px) {
	.og-fenetre {
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		height: 100dvh;
		max-height: 100dvh;
		margin: 0;
		inset: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.og-fenetre[open] { animation: og-montee .25s ease; }
	.og-fenetre .og-cadre { padding: 64px 20px 28px; max-width: none; }
	.og-fenetre .og-fenetre__fermer {
		position: fixed;
		top: 10px; right: 10px;
		width: 44px; height: 44px;
		background: var(--og-fond);
		border-radius: 50%;
	}
	.og-fenetre .og-form textarea { min-height: 130px; }
	.og-fenetre .og-bouton { width: 100%; padding: 13px 20px; font-size: 14px; }
}

/* Champs à 16 px sur mobile : évite le zoom automatique d'iOS au toucher d'un champ */
@media (max-width: 760px) {
	.og-form input[type="email"],
	.og-form input[type="text"],
	.og-form textarea { font-size: 16px; }
}

@keyframes og-montee { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.og-fenetre__fermer {
	position: absolute; top: 6px; right: 8px;
	width: 36px; height: 36px;
	background: none; border: 0; cursor: pointer;
	font-size: 26px; font-weight: 300; line-height: 1;
	z-index: 2;
}

.og-zoom {
	position: fixed;
	inset: 0;
	width: 100vw; height: 100vh; height: 100dvh;
	max-width: none; max-height: none;
	margin: 0;
	background: var(--og-fond);
	overflow: hidden;
}
.og-zoom::backdrop { background: var(--og-fond); }
.og-zoom[open] { animation: og-fondu .2s ease; }
.og-zoom__piste {
	display: flex;
	width: 100%; height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	outline: none;
}
.og-zoom__piste::-webkit-scrollbar { display: none; }
.og-zoom__vue {
	flex: 0 0 100%;
	height: 100%;
	margin: 0;
	scroll-snap-align: center;
	display: flex; align-items: center; justify-content: center;
	padding: clamp(48px, 7vh, 72px) clamp(12px, 7vw, 96px);
}
.og-zoom__vue img {
	max-width: 100%; max-height: 100%;
	width: auto; height: auto;
	object-fit: contain;
}
.og-zoom .og-fleche { background: transparent; width: 56px; height: 56px; margin-top: -28px; }
.og-zoom .og-fleche svg { width: 30px; height: 30px; }
.og-zoom .og-fleche:hover { background: rgba(26, 26, 24, .05); }
.og-zoom .og-fleche--prec { left: clamp(4px, 2vw, 24px); }
.og-zoom .og-fleche--suiv { right: clamp(4px, 2vw, 24px); }
.og-zoom .og-fenetre__fermer { position: absolute; top: 14px; right: 18px; font-size: 32px; }
.og-zoom__compteur {
	position: absolute; left: 0; right: 0; bottom: 18px;
	margin: 0;
	text-align: center;
	font-size: 12px; letter-spacing: .2em;
	color: var(--og-doux);
}

@keyframes og-fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes og-apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

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

/* ==========================================================================
   Pied de page
   ========================================================================== */
.og-pied {
	padding: 26px var(--og-marge) 34px;
	text-align: center;
	font-size: 11px;
	letter-spacing: .12em;
	color: var(--og-doux);
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 24px;
}
.og-pied p { margin: 0; }
.og-pied__menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }

/* ==========================================================================
   Elementor : le contenu hérite de la charte
   ========================================================================== */
.elementor-widget-text-editor,
.elementor-widget-heading .elementor-heading-title { font-family: var(--og-police); color: var(--og-texte); }
.elementor-widget-heading .elementor-heading-title { font-weight: 300; }
.og-page--elementor .elementor-section.elementor-section-boxed > .elementor-container,
.og-page--elementor .e-con-boxed > .e-con-inner { max-width: var(--og-largeur); }
.elementor-widget-shortcode .og-oeuvres,
.elementor-widget .og-grille { max-width: none; padding: 0; }
