/*
Theme Name: Folio Photographe
Description: Thème portfolio minimaliste : intro et diaporama de photos, menu latéral à sous-menus avec ordre personnalisable, projets photo et vidéo (YouTube, Instagram), couleurs, police et logo personnalisables.
Version: 1.30.0
Requires at least: 6.2
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: folio
*/

/* ---------- Polices embarquées (choix dans Apparence > Personnaliser) ---------- */
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("assets/fonts/baskerville.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("assets/fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("assets/fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("assets/fonts/spacemono.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Variables (surchargées par Apparence > Personnaliser) ---------- */
:root {
	--bg: #ffffff;
	--fg: #111111;
	--muted: #b4b4b4;
	--line: #ececec;
	--faint: var(--muted);
	--glow: #e4c39d;
	--glow-soft: rgba(228, 195, 157, .55);
	--font: "Cormorant Garamond", Garamond, "Times New Roman", serif;
	--fw: 400;
	--fs: 17px;
	--panel-w: clamp(250px, 22vw, 380px);
	--offset: 0px;
	--ease: cubic-bezier(.2, .6, .2, 1);
	--safe-t: env(safe-area-inset-top, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-l: env(safe-area-inset-left, 0px);
	--safe-r: env(safe-area-inset-right, 0px);
	--vpad: calc(126px + var(--safe-t) + var(--safe-b));
}
@supports (color: color-mix(in srgb, red, blue)) {
	:root { --faint: color-mix(in srgb, var(--muted) 55%, var(--bg)); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
	margin: 0; background: var(--bg); color: var(--fg);
	font-family: var(--font); font-weight: var(--fw);
	font-size: clamp(calc(var(--fs) - 2px), 1.2vw, calc(var(--fs) + 2px));
	font-variant-numeric: lining-nums;
	line-height: 1.4; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; margin: 0; padding: 8px 12px; clip: auto; background: var(--bg); z-index: 100000; }

/* Protection des photos : pas de glisser-déposer, pas de menu tactile « enregistrer » */
.protect img { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.protect .slide img, .protect .grid-item img, .protect .video-thumb, .protect .ed img { pointer-events: none; }

/* ---------- Curseur : petit point, ou texte sur les photos ---------- */
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 10001; pointer-events: none; opacity: 0; color: var(--fg); transition: opacity .2s; }
.cursor.is-on { opacity: 1; }
.cursor.is-on.is-hidden { opacity: 0; }
.cursor-dot { position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; transition: opacity .1s; }
.cursor-label { position: absolute; left: 0; top: 0; transform: translate(8px, -50%); width: max-content; max-width: min(30em, 60vw); font-size: 1.05em; line-height: 1.25; opacity: 0; transition: opacity .15s; }
.cursor.has-label .cursor-label { opacity: 1; }
.cursor.has-label .cursor-dot { opacity: 0; }
.cursor.flip .cursor-label { left: auto; right: 0; transform: translate(-8px, -50%); text-align: right; }
.cursor.on-photo { color: #fff; }
.cursor.on-photo .cursor-label { text-shadow: 0 0 14px rgba(0, 0, 0, .35); }
.cursor.on-photo .cursor-dot { box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
/* Vignettes : le texte s'adapte au fond (noir sur blanc, clair sur photo sombre). */
.cursor.blend { color: #fff; mix-blend-mode: difference; }

/* ---------- En-tête ---------- */
.site-header {
	position: fixed; top: 0; left: 0; right: var(--offset); z-index: 20;
	display: flex; justify-content: center; padding: calc(22px + var(--safe-t)) max(24px, var(--safe-r)) 0 max(24px, var(--safe-l));
	transition: right .5s var(--ease); pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-title { font-size: .95em; font-weight: var(--fw); letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.site-logo { position: relative; display: grid; place-items: center; max-width: 100%; line-height: 0; }
.site-logo img { grid-area: 1 / 1; display: block; width: auto; height: var(--hlogo-fit, var(--hlogo-h, 34px)); max-width: 100%; object-fit: contain; }
/* Recoloration automatique des logos (fournis en blanc) selon le fond du site. */
.site-logo.logo-black img { filter: brightness(0); }
.site-logo.logo-white img { filter: brightness(0) invert(1); }
/* Effet pixel : les deux logos occupent la même place (la zone de survol ne bouge pas). */
.site-logo .logo-b { visibility: hidden; }
.site-logo.is-hover .logo-a { visibility: hidden; }
.site-logo.is-hover .logo-b { visibility: visible; }
.site-logo .logo-canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.site-logo.is-anim .logo-canvas { display: block; }
.site-logo.is-anim img { visibility: hidden; }
/* Vibration brève du logo (flash de Guillaume Dubois) */
@keyframes logo-vibrate {
	0%, 100% { transform: translate(0, 0); }
	10% { transform: translate(calc(var(--hlogo-h, 34px) * -.05), calc(var(--hlogo-h, 34px) * .015)); }
	20% { transform: translate(calc(var(--hlogo-h, 34px) * .05), calc(var(--hlogo-h, 34px) * -.03)); }
	30% { transform: translate(calc(var(--hlogo-h, 34px) * -.03), calc(var(--hlogo-h, 34px) * -.015)); }
	40% { transform: translate(calc(var(--hlogo-h, 34px) * .035), calc(var(--hlogo-h, 34px) * .03)); }
	50% { transform: translate(calc(var(--hlogo-h, 34px) * -.05), 0); }
	60% { transform: translate(calc(var(--hlogo-h, 34px) * .05), calc(var(--hlogo-h, 34px) * .015)); }
	70% { transform: translate(calc(var(--hlogo-h, 34px) * -.015), calc(var(--hlogo-h, 34px) * -.03)); }
	80% { transform: translate(calc(var(--hlogo-h, 34px) * .03), calc(var(--hlogo-h, 34px) * .015)); }
	90% { transform: translate(calc(var(--hlogo-h, 34px) * -.03), 0); }
}
.site-logo.is-vibrate { animation: logo-vibrate .42s linear 1; }
.menu-btn { position: absolute; right: calc(20px + var(--safe-r)); top: calc(12px + var(--safe-t)); padding: 10px 8px; letter-spacing: .04em; }

/* ---------- Menu latéral (compact) ---------- */
body.panel-open { --offset: var(--panel-w); }
.panel-open .menu-btn { display: none; }
.panel {
	position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel-w); z-index: 30;
	display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line);
	font-size: .82em;
	transform: translateX(100%); visibility: hidden;
	transition: transform .5s var(--ease), visibility 0s .5s;
}
.panel-open .panel { transform: none; visibility: visible; transition: transform .5s var(--ease); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: calc(20px + var(--safe-t)) calc(16px + var(--safe-r)) 0 26px; }
.panel-tabs { display: flex; flex-wrap: wrap; gap: .3em 1.5em; }
.panel-tab { letter-spacing: .01em; }
.panel-tab[aria-selected="true"] { text-decoration: underline; text-underline-offset: .24em; text-decoration-thickness: 1px; }
.panel-tab:not([aria-selected="true"]):hover { color: var(--muted); }
.panel-close { font-size: 1.5em; line-height: 1; color: var(--muted); padding: 4px 10px; }
.panel-close:hover { color: var(--fg); }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 40px calc(20px + var(--safe-r)) 24px 26px; }
.pane[hidden] { display: none; }

.works { list-style: none; margin: 0; padding: 0; }
.works[hidden] { display: none; }
.works a { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: .24em 0; }
.works .name, .works .count { text-underline-offset: .22em; text-decoration-thickness: 1px; }
.works .tag { margin-left: .8em; color: var(--muted); }
.works .count { color: var(--faint); font-size: .9em; }
/* Survol : le titre passe en gris. Projet en cours : souligné. */
.works .name, .works .count { transition: color .2s; }
.works a:hover .name { color: var(--muted); }
.works a:hover .count { color: var(--faint); }
.works a.is-current .name, .works a.is-current .count { text-decoration: underline; text-decoration-color: var(--fg); }
.works a.is-current .name, .works a.is-current:hover .name { color: var(--fg); }
.works a.is-current .count { color: var(--fg); }

/* Sous-menus par catégorie */
.works-ungrouped { margin-bottom: 1.6em; }
.works-group + .works-group { margin-top: 1.3em; }
.group-toggle { display: block; width: 100%; text-align: left; margin: 0 0 .35em; padding: .35em 0; color: var(--muted); font-size: .8em; letter-spacing: .14em; text-transform: uppercase; transition: color .2s; }
.group-toggle:hover, .group-toggle[aria-expanded="true"] { color: var(--fg); }
.group-toggle[aria-expanded="true"] 
.pane-content { max-width: 34em; overflow-wrap: anywhere; }
.pane-content iframe, .pane-content video { max-width: 100%; }
.pane-content table { display: block; max-width: 100%; overflow-x: auto; }
.pane-content p { margin: 0 0 1em; }
.pane-content a { text-decoration: underline; text-underline-offset: .2em; }
.pane-content h1, .pane-content h2, .pane-content h3 { font-weight: var(--fw); font-size: 1em; margin: 1.6em 0 .5em; }
.pane-content img { height: auto; }
.pane-empty { color: var(--muted); }

/* Aperçu au survol d'un projet : la photo de couverture apparaît à côté du texte survolé, à gauche du menu */
.hover-preview { position: fixed; right: calc(var(--offset) + 28px); top: 50%; z-index: 25; max-width: calc((100vw - var(--offset) - 80px) / 2); transform: translateY(-50%); pointer-events: none; opacity: 0; transition: opacity .2s, right .5s var(--ease); }
.hover-preview.is-in { opacity: 1; transition: opacity .2s, top .18s ease, right .5s var(--ease); }
.hover-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 23vh; }

/* Logo en bas du menu, avec un halo simple derrière */
.panel-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 26px calc(48px + var(--safe-b)); }
/* Logo : uniquement sur l'onglet Projets. Bouton Contact : uniquement sur l'onglet Bio (page). */
.panel:not([data-tab="works"]) .panel-logo { display: none; }
.panel:not([data-tab="page"]) .panel-contact { display: none; }
.panel[data-tab="page"] .panel-foot { padding-bottom: calc(28px + var(--safe-b)); }
.panel-contact { display: inline-block; padding: .35em 1.2em; font-size: .9em; border: 1px solid var(--line); letter-spacing: .06em; transition: border-color .2s, color .2s; }
.panel-contact:hover, .panel-contact:focus-visible { border-color: var(--fg); }
/* Filets du menu très discrets */
@supports (color: color-mix(in srgb, red, blue)) {
	.panel { border-left-color: color-mix(in srgb, var(--line) 40%, transparent); }
	.panel-contact { border-color: color-mix(in srgb, var(--line) 60%, transparent); }
	.panel-contact:hover, .panel-contact:focus-visible { border-color: var(--fg); }
}
.panel-logo { position: relative; display: block; width: clamp(130px, 62%, 220px); }
.panel-logo img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 0 3px var(--glow)) drop-shadow(0 0 8px var(--glow-soft)); }
/* Lueur derrière le logo : elle suit la souris dans toutes les directions (--gx / --gy pilotés par le JS), sur une course courte. */
.logo-glow {
	position: absolute; inset: -35% -8%; z-index: 0; pointer-events: none; opacity: .5; filter: blur(7px);
	background: radial-gradient(circle 55px at var(--gx, 50%) var(--gy, 50%), var(--glow) 0%, var(--glow-soft) 38%, transparent 100%);
}

/* ---------- Accueil : diaporama + logo centré ---------- */
.stage { position: fixed; top: 0; bottom: 0; left: 0; right: var(--offset); pointer-events: none; transition: right .5s var(--ease); }
.ss-layer { position: absolute; inset: 0; z-index: 0; }
/* Deux images superposées : la nouvelle apparaît en fondu par-dessus l'ancienne. */
.ss { pointer-events: auto; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; height: auto; max-width: 60%; max-height: 72vh; opacity: 0; }
.ss.is-in { opacity: 1; transition: opacity var(--fade, 150ms) linear; }
.ss:not([src]) { display: none; }
/* Message affiché à l'administrateur tant qu'aucune photo n'est choisie. */
.stage-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 10%; text-align: center; color: var(--muted); }

.home-toggle {
	position: fixed; bottom: calc(14px + var(--safe-b)); left: 0; right: var(--offset); z-index: 20;
	display: flex; justify-content: center; align-items: center; gap: .9em; transition: right .5s var(--ease);
}
.home-toggle button { padding: 8px 6px; }
.home-toggle span { color: var(--muted); }
.home-toggle button[aria-pressed="false"] { color: var(--muted); }
.home-toggle button:hover { color: var(--fg); }
.toggle-count { margin-left: .3em; font-variant-numeric: lining-nums; }

.js .viewer-grid li { opacity: 0; transition: opacity 1.1s ease; }
.js .viewer-grid li.is-in { opacity: 1; }

/* ---------- Page projet : visionneuse ---------- */
.viewer { position: fixed; top: 0; bottom: 0; left: 0; right: var(--offset); transition: right .5s var(--ease); touch-action: pan-y; }
.viewer-stage { position: absolute; top: calc(70px + var(--safe-t)); bottom: calc(56px + var(--safe-b)); left: 6%; right: 6%; display: flex; align-items: center; justify-content: center; }
.slide { display: none; max-width: 100%; max-height: 100%; }
.slide.is-active { display: block; }
.slide-photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - var(--vpad)); object-fit: contain; }

.slide-video { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - var(--vpad)) * 16 / 9)); background: var(--fg); }
.slide-video.is-vertical { aspect-ratio: 9 / 16; width: min(100%, calc((100vh - var(--vpad)) * 9 / 16)); }
/* Instagram : le lecteur ajoute son propre bandeau (~130 px), on garde la hauteur disponible. */
.slide-video.is-instagram { aspect-ratio: auto; height: calc(100vh - var(--vpad)); width: min(100%, max(240px, calc((100vh - var(--vpad) - 130px) * 9 / 16))); }
.slide-video.is-file { aspect-ratio: var(--vr, 1.7778); width: min(100%, calc((100vh - var(--vpad)) * var(--vr, 1.7778))); }
.video-player { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; background: #000; object-fit: contain; }
.slide-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.video-play { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.video-play[hidden] { display: none; }
.video-icon { position: relative; width: 76px; height: 76px; border-radius: 50%; background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .85); transition: transform .25s var(--ease), background .25s; }
.video-icon::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-36%, -50%); border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; }
.video-play:hover .video-icon, .video-play:focus-visible .video-icon { transform: scale(1.08); background: rgba(0, 0, 0, .55); }


/* Flèches de la visionneuse : fines, rondes, qui se remplissent au survol */
.v-arrow {
	position: absolute; top: 50%; z-index: 6; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; color: var(--fg);
	border: 1px solid var(--muted); isolation: isolate; overflow: hidden;
	transition: color .3s var(--ease), transform .3s var(--ease), opacity .3s;
}
.v-arrow[hidden] { display: none; }
.v-arrow::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: var(--bg); opacity: .55; transition: opacity .3s var(--ease), background .3s var(--ease); }
@supports (backdrop-filter: blur(6px)) { .v-arrow::before { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } }
.v-arrow svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.v-prev { left: clamp(12px, 2vw, 28px); }
.v-prev svg { transform: scaleX(-1); }
.v-next { right: clamp(12px, 2vw, 28px); }
.v-arrow:hover, .v-arrow:focus-visible { border-color: var(--fg); }
.v-arrow:hover::before, .v-arrow:focus-visible::before { background: var(--fg); opacity: 1; }
.v-arrow:hover, .v-arrow:focus-visible { color: var(--bg); }
.v-next:hover svg, .v-next:focus-visible svg { transform: translateX(3px); }
.v-prev:hover svg, .v-prev:focus-visible svg { transform: scaleX(-1) translateX(3px); }
.v-arrow:active { transform: scale(.93); }
.viewer.is-grid .v-arrow { display: none; }
@media (max-width: 800px) {
	.v-arrow { width: 32px; height: 32px; margin-top: -16px; }
	.v-arrow svg { width: 14px; height: 14px; }
	.v-prev { left: 8px; }
	.v-next { right: 8px; }
}
@media (hover: none) { .v-arrow::before { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .v-arrow, .v-arrow svg, .v-arrow::before { transition: none; } }

/* Menu du bas de la page projet : Photo — Vidéo — Vignettes */
.viewer-grid { display: none; position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(64px + var(--safe-t)) max(18px, var(--safe-r)) calc(64px + var(--safe-b)) max(18px, var(--safe-l)); }
.viewer.is-grid .viewer-grid { display: block; }
.viewer.is-grid .viewer-stage { display: none; }
.viewer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 12px; }
.viewer-grid { --grid-h: 26vh; }
.grid-item { display: block; width: calc(var(--grid-h) * 1.5); height: var(--grid-h); max-width: 100%; transition: opacity .25s; }
.grid-item.is-portrait { width: calc(var(--grid-h) * 2 / 3); }
/* Format standard : chaque vignette est recadrée en 3:2 (horizontal) ou 2:3 (vertical). */
.grid-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.grid-video { position: relative; display: block; width: 100%; height: 100%; background: var(--fg); overflow: hidden; }
.grid-video img, .grid-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grid-video .video-icon { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); }
.grid-video .video-icon::before { border-width: 8px 0 8px 13px; }
.grid-item:hover .video-icon { background: rgba(0, 0, 0, .55); }
@media (hover: hover) { .viewer-grid ul:hover .grid-item:not(:hover) { opacity: .55; } }
/* Le nom du site et le menu restent lisibles quand la grille défile dessous. */
.viewer-grid-on .site-header { background: linear-gradient(to bottom, var(--bg) 60%, transparent); padding-bottom: 24px; }
.viewer.is-grid .viewer-toggle { bottom: 0; padding: 30px 0 calc(14px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 55%, transparent); }

/* ---------- Pages classiques ---------- */
.page-main { padding: calc(110px + var(--safe-t)) 8% 90px; margin-right: var(--offset); max-width: 52em; transition: margin-right .5s var(--ease); }
.entry-title { font-weight: var(--fw); font-size: 1.4em; margin: 0 0 1em; }
.entry-content p { margin: 0 0 1em; }
.entry-content a { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Intro : défilé de photos ---------- */
#intro {
	display: none; position: fixed; inset: 0; z-index: 10000; background: var(--bg);
	align-items: center; justify-content: center; transition: opacity .45s ease;
}
.intro-on #intro { display: flex; }
.intro-on body { overflow: hidden; }
#intro.is-out { opacity: 0; pointer-events: none; }
#intro img { width: auto; height: auto; max-width: 78vw; max-height: 80vh; }


/* ---------- Livret éditorial : page projet aux couleurs du site ---------- */
/* Par défaut : fond, couleurs et police du site. Les pages « fond sombre / blanc » restent possibles page par page. */
body.is-editorial { --ed-tf: var(--font); --ed-bf: var(--font); }
body.is-editorial.ed-mixed .site-header, body.is-editorial.ed-mixed .menu-btn { mix-blend-mode: difference; color: #fff; }
.ed { margin-right: var(--offset); transition: margin-right .5s var(--ease); font-family: var(--ed-bf); font-weight: 400; line-height: 1.6; background: var(--bg); color: var(--fg); }
.ed-page {
	position: relative; container-type: inline-size; overflow: hidden;
	--ed-text-fs: max(15px, calc(var(--ed-b, 18) * 1px));
	--ed-title-fs: max(2.2rem, min(calc(var(--ed-t, 72) / 10 * 1vw), 7.5rem));
	--ed-rule: var(--line);
}
@supports (font-size: 1cqi) { .ed-page { --ed-title-fs: max(2.2rem, min(calc(var(--ed-t, 72) / 10 * 1cqi), 7.5rem)); } }
.ed-page.is-base { background: var(--bg); color: var(--fg); }
.ed-page.is-dark { background: #171717; color: #fff; --ed-rule: rgba(255, 255, 255, .25); --muted: rgba(255, 255, 255, .6); }
.ed-page.is-light { background: #fff; color: #171717; --ed-rule: rgba(0, 0, 0, .2); --muted: rgba(0, 0, 0, .55); }
.ed.has-grain .ed-page.is-dark::before {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: url("assets/img/grain.png") repeat; background-size: 512px 512px; opacity: .5;
}
.ed-page > * { position: relative; z-index: 1; }
.ed-page img { display: block; width: 100%; height: auto; object-fit: contain; }
.ed-page figure { margin: 0; }
.ed-page p { margin: 0 0 1.1em; }
.ed-page p:last-child { margin-bottom: 0; }
.ed-page strong { font-weight: 600; }
.ed-page a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; transition: opacity .25s; }
.ed-page a:hover { opacity: .6; }
.ed-empty, .ed-hint { padding: 120px 24px; text-align: center; color: var(--muted); }
.ed-hint { padding: 24px; }
.ed-wrap { width: min(100%, 1080px); margin: 0 auto; padding: clamp(56px, 10vh, 110px) clamp(20px, 5vw, 56px); }
.ed-progress { position: fixed; top: 0; left: 0; right: var(--offset); height: 1px; z-index: 30; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; transition: right .5s var(--ease); }
body.ed-mixed .ed-progress { background: #fff; mix-blend-mode: difference; }

/* Ouverture : grande photo encadrée sur le fond du site, titre dessous */
.ed-cover { padding: clamp(72px, 11vh, 120px) clamp(20px, 5vw, 56px) clamp(40px, 7vh, 80px); }
.ed-hero-img { width: min(100%, 1180px); margin: 0 auto; }
.ed-hero-par { display: flex; justify-content: center; }
.ed-hero-par img { width: auto; height: auto; max-width: 100%; max-height: 82svh; }
.ed-hero-body { width: min(100%, 1180px); margin: 0 auto; padding-top: clamp(24px, 5vh, 52px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2em 3em; }
.ed-hero-title { margin: 0; font-family: var(--ed-tf); font-size: max(2.2rem, min(calc(var(--ed-t, 72) / 10 * 1vw), 7.5rem)); font-weight: 300; line-height: 1; letter-spacing: -.01em; overflow-wrap: anywhere; }
@supports (font-size: 1cqi) { .ed-hero-title { font-size: max(2.2rem, min(calc(var(--ed-t, 72) / 10 * 1cqi), 7.5rem)); } }
.ed-hero-meta { text-align: right; font-size: max(14px, calc(var(--ed-text-fs) * .85)); color: var(--muted); letter-spacing: .02em; }
.ed-hero-meta p { margin: 0 0 .2em; }

/* Diptyques : paires de photos 2:3, légende discrète */
.ed-dips { display: flex; flex-direction: column; align-items: center; gap: clamp(32px, 6vh, 72px); padding: clamp(32px, 6vh, 72px) clamp(10px, 2.5vw, 32px); }
.ed-dip { width: 100%; max-width: 1600px; }
.ed-dip-imgs { display: flex; flex-direction: column; gap: clamp(10px, 2vw, 28px); }
/* Photos entières, jamais recadrées : chacune garde son format d'origine */
.ed-ph { position: relative; overflow: hidden; }
.ed-ph img { width: 100%; height: auto; transition: transform .9s var(--ease); }
.ed-dip .ed-ph { width: 100%; }
.ed-hero-img figcaption, .ed-dip figcaption { margin-top: .8em; font-size: max(14px, calc(var(--ed-text-fs) * .85)); font-style: italic; line-height: 1.4; color: var(--muted); }

/* Pages texte : titre léger, bandeau, blocs « petit titre | texte » */
.ed-title { margin: 0 0 clamp(24px, 5vh, 52px); font-family: var(--ed-tf); font-size: var(--ed-title-fs); font-weight: 300; line-height: 1.05; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ed-line { display: block; }
.ed-banner { margin: 0 0 clamp(20px, 4vh, 40px); }
.ed-banner .ed-ph img { max-height: 84svh; width: auto; max-width: 100%; margin: 0 auto; }
.ed-block { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr); gap: clamp(14px, 4vw, 56px); padding: clamp(22px, 4vh, 40px) 0; border-top: 1px solid var(--ed-rule); }
.ed-label { margin: 0; font-size: 14px; font-weight: 400; letter-spacing: .02em; color: var(--muted); line-height: 1.6; }
.ed-text { max-width: 44em; font-size: var(--ed-text-fs); line-height: 1.7; }
.ed-text.is-italic, .ed-text.is-italic p, .ed-text.is-italic em { font-style: italic; }
.ed-text.is-justify { text-align: justify; hyphens: auto; }

/* Page vidéo : horizontale ou verticale, miniature + bouton lecture */
.ed-vwrap { display: flex; flex-direction: column; align-items: center; }
.ed-vwrap .ed-title { align-self: flex-start; }
.ed-vid { position: relative; margin: 0 auto; width: min(100%, 1600px); aspect-ratio: var(--vr, 1.7778); background: #000; overflow: hidden; }
.ed-vid.is-tall { width: min(100%, calc((100svh - 120px) * var(--vr, .5625))); }
.ed-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ed-vid .video-thumb { object-fit: contain; }
.ed-vcap { margin: .9em 0 0; align-self: flex-start; font-size: max(14px, calc(var(--ed-text-fs) * .85)); font-style: italic; color: var(--muted); }
.ed-vid.is-tall ~ .ed-vcap { align-self: center; }

/* Animations au défilement, sobres (la classe « is-anim » est ajoutée par le script ; sans script, tout reste visible) */
.ed.is-anim [data-reveal="up"] { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.ed.is-anim [data-reveal="up"].is-in { opacity: 1; transform: none; }
.ed.is-anim .ed-line { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ed.is-anim .ed-line > span { display: block; transform: translateY(108%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 100ms); }
.ed.is-anim [data-reveal="lines"].is-in .ed-line > span { transform: none; }
.ed.is-anim [data-reveal="dip"] .ed-ph, .ed.is-anim [data-reveal="clip"] .ed-ph { opacity: 0; transition: opacity 1.1s ease; transition-delay: calc(var(--i, 0) * 140ms); }
.ed.is-anim [data-reveal="dip"] .ed-ph img, .ed.is-anim [data-reveal="clip"] .ed-ph img { transform: scale(1.06); transition: transform 1.6s var(--ease); transition-delay: calc(var(--i, 0) * 140ms); }
.ed.is-anim [data-reveal="dip"].is-in .ed-ph, .ed.is-anim [data-reveal="clip"].is-in .ed-ph { opacity: 1; }
.ed.is-anim [data-reveal="dip"].is-in .ed-ph img, .ed.is-anim [data-reveal="clip"].is-in .ed-ph img { transform: scale(1); }
.ed [data-reveal="dip"].is-in .ed-ph:hover img, .ed [data-reveal="clip"].is-in .ed-ph:hover img { transform: scale(1.03); transition: transform .9s var(--ease); transition-delay: 0s; }

/* Ouverture animée à l'arrivée */
@keyframes edHeroZoom { from { transform: scale(1.12); } to { transform: scale(1.04); } }
@keyframes edLineUp { from { transform: translateY(108%); } to { transform: none; } }
@keyframes edFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ed.is-anim .ed-hero-par img { animation: edFade 1.2s ease both; }
.ed.is-anim .ed-hero-title .ed-line { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ed.is-anim .ed-hero-title .ed-line > span { display: block; transform: translateY(108%); animation: edLineUp 1.1s var(--ease) forwards; animation-delay: calc(.25s + var(--i, 0) * .12s); }
.ed.is-anim .ed-hero-meta { opacity: 0; animation: edFade 1s ease .7s forwards; }

@media (prefers-reduced-motion: reduce) {
	.ed.is-anim [data-reveal], .ed.is-anim [data-reveal] * { transition: none !important; }
	.ed.is-anim .ed-hero-par img, .ed.is-anim .ed-hero-title .ed-line > span, .ed.is-anim .ed-hero-meta { animation: none !important; opacity: 1; transform: none; }
}

@media (max-width: 800px) {
	.ed-cover { padding-left: 14px; padding-right: 14px; }
	.ed-hero-meta { text-align: left; }
	.ed-block { grid-template-columns: 1fr; gap: 6px; }
	.ed-dips { padding-left: 12px; padding-right: 12px; }
}

/* ---------- Boutique de tirages (WooCommerce) ---------- */
.cart-link { position: absolute; right: calc(88px + var(--safe-r)); top: calc(12px + var(--safe-t)); padding: 10px 8px; letter-spacing: .04em; }
.cart-link[hidden] { display: none; }
.cart-count { display: inline-block; min-width: 1.5em; padding: 0 .35em; margin-left: .3em; border: 1px solid currentColor; border-radius: 1em; font-size: .8em; line-height: 1.5; text-align: center; }
.panel-open .cart-link { right: calc(20px + var(--safe-r)); }
.buy-wrap { margin: 2em 0 0; }
.buy-link { display: inline-block; padding: .6em 1.6em; border: 1px solid var(--fg); letter-spacing: .06em; transition: background .25s, color .25s; }
.buy-link:hover, .buy-link:focus-visible { background: var(--fg); color: var(--bg); }

.shop-main { max-width: none; padding-left: clamp(22px, 5vw, 72px); padding-right: clamp(22px, 5vw, 72px); font-size: .95em; }
.shop-main h1, .shop-main h2 { font-weight: var(--fw); letter-spacing: .02em; line-height: 1.15; }
.shop-main h1 { font-size: 1.9em; margin: 0 0 1em; }
.shop-main a:hover { color: var(--muted); }
.shop-main img { height: auto; max-width: 100%; }
.shop-main .woocommerce-products-header { display: none; }

/* Liste des tirages */
.shop-main ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px) clamp(16px, 2.5vw, 36px); align-items: start; }
.shop-main ul.products li.product { margin: 0; padding: 0; }
.shop-main ul.products li.product a { display: block; }
.shop-main ul.products li.product img { width: 100%; margin: 0 0 .8em; transition: opacity .3s; }
.shop-main ul.products li.product a:hover img { opacity: .85; }
.woocommerce-loop-product__title { margin: 0 0 .2em; font-size: 1em; font-weight: var(--fw); letter-spacing: .02em; }
.shop-main .price { display: block; color: var(--muted); }
.shop-main .price del { opacity: .6; }
.shop-main .price ins { text-decoration: none; color: var(--fg); }
.shop-main .onsale { display: none; }
.shop-main .woocommerce-pagination ul { display: flex; gap: .8em; list-style: none; padding: 0; margin: 3em 0 0; justify-content: center; }

/* Fiche d'un tirage */
.shop-main div.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.woocommerce-product-gallery { opacity: 1 !important; margin: 0; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { margin: 0 0 12px; }
.woocommerce-product-gallery__image img { width: 100%; }
.shop-main div.summary { position: sticky; top: calc(100px + var(--safe-t)); }
.shop-main div.summary .product_title { margin: 0 0 .3em; font-size: 1.7em; }
.shop-main div.summary .price { margin: 0 0 1.2em; font-size: 1.15em; color: var(--fg); }
.shop-main .woocommerce-product-details__short-description, .shop-main .product-desc { margin: 0 0 1.4em; line-height: 1.6; }
.shop-main .product-desc p { margin: 0 0 1em; }
.shop-main table.variations { border-collapse: collapse; margin: 0 0 1.2em; width: 100%; }
.shop-main table.variations th, .shop-main table.variations td { padding: .5em 0; text-align: left; vertical-align: middle; font-weight: var(--fw); }
.shop-main table.variations th { padding-right: 1em; color: var(--muted); }
.shop-main .reset_variations { display: inline-block; margin-left: .8em; font-size: .85em; color: var(--muted); }
.shop-main select, .shop-main input[type="text"], .shop-main input[type="email"], .shop-main input[type="tel"], .shop-main input[type="number"], .shop-main input[type="password"], .shop-main textarea {
	font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 0; padding: .55em .7em; max-width: 100%;
}
.shop-main select:focus, .shop-main input:focus, .shop-main textarea:focus { outline: 0; border-color: var(--fg); }
.shop-main .quantity { display: inline-block; margin-right: .8em; }
.shop-main .quantity input.qty { width: 4.5em; text-align: center; }
.shop-main .button, .shop-main button.button, .shop-main button[type="submit"], .shop-main input[type="submit"], .shop-main a.button {
	display: inline-block; padding: .65em 1.8em; font: inherit; letter-spacing: .06em; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); border-radius: 0; cursor: pointer; transition: background .25s, color .25s;
}
.shop-main .button:hover, .shop-main button.button:hover, .shop-main button[type="submit"]:hover, .shop-main a.button:hover { background: transparent; color: var(--fg); }
.shop-main .button.disabled, .shop-main .button:disabled { opacity: .4; pointer-events: none; }
.shop-main .stock { margin: 0 0 1em; color: var(--muted); }
.shop-main .out-of-stock { color: var(--muted); }

/* Panier, commande, compte, messages */
.shop-main .woocommerce-message, .shop-main .woocommerce-info, .shop-main .woocommerce-error { list-style: none; margin: 0 0 2em; padding: .9em 1.2em; border-left: 2px solid var(--fg); background: rgba(128, 128, 128, .08); }
.shop-main .woocommerce-error { border-left-color: #b32d2e; }
.shop-main .woocommerce-message .button { float: right; margin-left: 1em; padding: .3em 1em; }
.shop-main table.shop_table { width: 100%; border-collapse: collapse; margin: 0 0 2em; }
.shop-main table.shop_table th, .shop-main table.shop_table td { padding: .9em .6em; text-align: left; border-bottom: 1px solid var(--line); font-weight: var(--fw); vertical-align: middle; }
.shop-main table.shop_table img { width: 72px; }
.shop-main .cart_totals, .shop-main .woocommerce-checkout-review-order { max-width: 34em; }
.shop-main .wc-block-components-button:not(.is-link) { border-radius: 0; letter-spacing: .06em; }
.shop-main form .form-row { margin: 0 0 1em; }
.shop-main form .form-row label { display: block; margin-bottom: .3em; color: var(--muted); }
.shop-main .woocommerce-MyAccount-navigation ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4em 1.6em; padding: 0; margin: 0 0 2em; }
.shop-main .woocommerce-MyAccount-navigation .is-active a { text-decoration: underline; text-underline-offset: .24em; }

@media (max-width: 1000px) {
	.shop-main ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	.shop-main div.product { grid-template-columns: 1fr; }
	.shop-main div.summary { position: static; }
	.cart-link { right: calc(72px + var(--safe-r)); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 480px) {
	.shop-main ul.products { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@supports (height: 100dvh) {
	.slide-photo img { max-height: calc(100dvh - var(--vpad)); }
	.slide-video { width: min(100%, calc((100dvh - var(--vpad)) * 16 / 9)); }
	.slide-video.is-vertical { width: min(100%, calc((100dvh - var(--vpad)) * 9 / 16)); }
	.slide-video.is-file { width: min(100%, calc((100dvh - var(--vpad)) * var(--vr, 1.7778))); }
	.slide-video.is-instagram { height: calc(100dvh - var(--vpad)); width: min(100%, max(240px, calc((100dvh - var(--vpad) - 130px) * 9 / 16))); }
	#intro img { max-height: 80dvh; }
}

/* Tablette */
@media (max-width: 1100px) {
	:root { --panel-w: clamp(250px, 34vw, 330px); }
	.ss { max-width: 70%; }
	.viewer-stage { left: 4%; right: 4%; }
}

/* Mobile : le menu passe en plein écran */
@media (max-width: 800px) {
	.hover-preview { display: none; }
	.panel { width: 100%; border-left: 0; font-size: .95em; }
	body.panel-open { --offset: 0px; overflow: hidden; }
	.panel-head { padding-left: 22px; }
	.panel-body { padding-left: 22px; padding-top: 32px; }
	.panel-close { font-size: 2em; padding: 0 10px; }
	.site-header { padding-left: max(64px, calc(var(--safe-l) + 52px)); padding-right: max(64px, calc(var(--safe-r) + 52px)); }
	.ss { max-width: 92%; max-height: 68vh; }
		.viewer-stage { left: 3%; right: 3%; }
	.viewer-grid { --grid-h: 20vh; }
	.viewer-grid { padding-left: max(14px, var(--safe-l)); padding-right: max(14px, var(--safe-r)); }
	.page-main { padding-left: 22px; padding-right: 22px; }
	#intro img { max-width: 88vw; }
	.home-toggle { gap: .6em; }
}

@media (max-width: 600px) {
	.video-icon { width: 60px; height: 60px; }
	.video-icon::before { border-width: 10px 0 10px 17px; }
}

@media (max-width: 400px) {
}

/* Téléphone en paysage / écrans très bas */
@media (max-height: 520px) {
	.site-header { padding-top: calc(12px + var(--safe-t)); }
	:root { --vpad: calc(90px + var(--safe-t) + var(--safe-b)); }
	.viewer-stage { top: calc(50px + var(--safe-t)); bottom: calc(40px + var(--safe-b)); }
	.panel-body { padding-top: 28px; }
	.panel-logo { display: none; }
	.ss { max-height: 70vh; }
	.viewer-grid { --grid-h: 38vh; }
}

/* Écrans tactiles : cibles plus grandes (44 px minimum) et pas de survol « collant » */
@media (pointer: coarse) {
	.menu-btn, .panel-close, .home-toggle button { min-width: 44px; min-height: 44px; }
	.menu-btn { display: inline-flex; align-items: center; justify-content: center; }
	.works a { padding: .45em 0; }
	.panel-tab { padding: 6px 0; }
	.group-toggle { padding: .6em 0; }
}

@media (hover: none) {
	.works a:hover .name { color: inherit; }
	.works a:hover .count { color: var(--faint); }
	.panel-tab:not([aria-selected="true"]):hover { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
