/* Odduel site-wide widgets: language switcher, back to top beside the live chat, cookie consent. */

:root {
	--od-w-edge: var(--od-gutter, 20px);
	--od-w-bottom: max(20px, env(safe-area-inset-bottom));
	/* Width of the live chat's launcher: what stands beside the bottom right corner leaves it this much room */
	--od-w-launcher: 56px;
	--od-w-shadow: 0 24px 64px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ---------- Language switcher ---------- */
.od-lang { position: relative; display: inline-flex; align-items: center; }
.od-lang__toggle {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 44px; padding: 0 4px;
	font-size: var(--od-fs-b3); font-weight: 500; line-height: 1; color: var(--od-brand);
}
.od-lang__toggle svg { flex: none; width: 20px; height: 20px; }
.od-lang__menu {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 5;
	width: min(360px, calc(100vw - 2 * var(--od-gutter))); padding: 18px;
	background: var(--od-white); border: 1px solid var(--od-grey-200);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
	color: var(--od-black); transform-origin: top right;
	max-height: calc(100vh - var(--od-header-h) - 12px); max-height: calc(100dvh - var(--od-header-h) - 12px); overflow-y: auto; overscroll-behavior: contain;
}
.od-lang__menu:not([hidden]) { animation: od-lang-in 0.45s var(--od-ease); }
@keyframes od-lang-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } }
.od-lang__cap { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--od-fg-mute); }
.od-lang__cap::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--od-brand); }
.od-lang__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.od-lang__menu:not([hidden]) .od-lang__grid li { animation: od-lang-tile 0.5s var(--od-ease) backwards; }
.od-lang__grid li:nth-child(2) { animation-delay: 0.05s; }
.od-lang__grid li:nth-child(3) { animation-delay: 0.1s; }
.od-lang__grid li:nth-child(4) { animation-delay: 0.15s; }
.od-lang__grid li:nth-child(5) { animation-delay: 0.2s; }
.od-lang__grid li:nth-child(6) { animation-delay: 0.25s; }
@keyframes od-lang-tile { from { opacity: 0; transform: translateY(12px); } }
.od-lang__item {
	display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
	aspect-ratio: 1.25; padding: 14px; border: 1px solid var(--od-grey-200); color: var(--od-black);
	transition: border-color 0.3s var(--od-ease), transform 0.3s var(--od-ease), color 0.3s var(--od-ease);
}
.od-lang__item:not([aria-current="true"]):not([aria-disabled="true"]):hover { border-color: var(--od-black); transform: translateY(-2px); }
.od-lang__code { font-size: 44px; font-weight: 700; line-height: 0.9; letter-spacing: var(--od-track-display); }
.od-lang__name { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; line-height: 1.3; }
.od-lang__state { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--od-fg-mute); }
/* The current language: the deeper orange, so its small white text reads (5.10:1) */
.od-lang__item[aria-current="true"] { background: var(--od-brand-deep); border-color: var(--od-brand-deep); color: var(--od-white); }
.od-lang__item[aria-current="true"] .od-lang__state { color: var(--od-white); }
/* A language that is not open yet stays grey; only those who may preview it are shown its tile */
.od-lang__item--closed { color: var(--od-fg-mute); }
/* More than four languages: three tiles across in a wider card, so the card keeps to two rows.
   The tile's note moves beside the code, where the longest language name leaves it no room. */
.od-lang__menu--wide { width: min(528px, calc(100vw - 2 * var(--od-gutter))); }
.od-lang__menu--wide .od-lang__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.od-lang__menu--wide .od-lang__item { position: relative; }
.od-lang__menu--wide .od-lang__state { position: absolute; top: 16px; right: 14px; }
.od-lang__item:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 2px; }
/* One line under the language control for a visitor whose browser asks for another language the page exists in */
.od-lang__hint {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 4;
	display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 0; padding: 0 0 0 16px;
	background: var(--od-white); border: 1px solid var(--od-grey-200); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
	font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; color: var(--od-black); transform-origin: top right;
}
.od-lang__hint[hidden], .od-menu-open .od-lang__hint { display: none; }
/* The line hangs under the bar, so the bar's way out on scroll would leave its lower half in the window:
   it goes out with the bar and comes back with it. */
.od-lang__hint { transition: opacity 0.25s, visibility 0.25s; }
html.od-nav-off .od-lang__hint { opacity: 0; visibility: hidden; }
.od-lang__hint:not([hidden]) { animation: od-lang-in 0.45s var(--od-ease); }
.od-lang__hint a { display: inline-flex; align-items: center; min-height: 44px; color: var(--od-black); text-decoration: underline; text-decoration-color: var(--od-brand); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.od-lang__hint a:hover { color: var(--od-brand-deep); }
.od-lang__hint button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; color: var(--od-fg-mute); }
.od-lang__hint button:hover { color: var(--od-black); }
.od-lang__hint svg { width: 12px; height: 12px; }
.od-lang__hint a:focus-visible, .od-lang__hint button:focus-visible { outline: 2px solid var(--od-brand); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .od-lang__menu:not([hidden]), .od-lang__menu:not([hidden]) .od-lang__grid li, .od-lang__hint:not([hidden]) { animation: none; } }
/* Arriving from another language: nothing is drawn until the page stands where the visitor was (od-at is set
   by the first script of the head and taken off by widgets.js, or after 2.5 s whatever happens). The bar takes
   its state for that place at once, and a held section shows the item that was on stage without playing its
   way there */
html.od-at body { opacity: 0; }
html.od-at .od-nav[data-od-load], html.od-at-in .od-nav[data-od-load],
html.od-at [data-od-stage] *, html.od-at-in [data-od-stage] * { transition: none !important; }

/* ---------- WhatsApp launcher and back to top ---------- */
/* One black pill where the live chat's launcher stood (56 px high; 24 px from the right and 52 px from the foot
   on wide screens, 52 px high and 14 px plus the safe area on phones): the glyph, the words in the terminal
   type and the blinking block cursor of the section labels; orange under the pointer. The back-to-top button
   stands above it on the same right edge, 12 px apart. */
.od-wa {
	position: fixed; right: 24px; bottom: 52px; z-index: 92;
	display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
	background: var(--od-black); color: var(--od-white); text-decoration: none; white-space: nowrap;
	font-family: var(--od-mono); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	transition: background-color 0.2s, color 0.2s;
}
.od-wa svg { flex: none; width: 24px; height: 24px; display: block; }
.od-wa__cur { flex: none; width: 0.55em; height: 1.05em; margin-left: -6px; background: var(--od-brand); animation: od-lb-blink 1.05s steps(1) infinite; }
.od-wa:hover, .od-wa:focus-visible { background: var(--od-brand); color: var(--od-black); }
.od-wa:hover .od-wa__cur, .od-wa:focus-visible .od-wa__cur { background: var(--od-black); }
.od-wa:focus-visible { outline: 3px solid var(--od-black); outline-offset: 3px; }
.od-js .od-wa { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.25s var(--od-ease), transform 0.25s var(--od-ease), visibility 0s linear 0.25s, background-color 0.2s, color 0.2s; }
.od-js .od-wa.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.od-wa-card {
	position: fixed; right: 24px; bottom: 124px; z-index: 92; width: 300px;
	display: flex; align-items: flex-start; gap: 8px; padding: 18px 12px 18px 20px; border-radius: 6px;
	background: var(--od-black); color: var(--od-white); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	opacity: 0; transform: translateY(8px); transition: opacity 0.3s var(--od-ease), transform 0.3s var(--od-ease);
}
.od-wa-card[hidden] { display: none; }
.od-wa-card.is-visible { opacity: 1; transform: none; }
.od-wa-card__text { flex: 1 1 auto; font-family: var(--od-mono); font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--od-white); text-decoration: none; text-wrap: pretty; }
.od-wa-card__p { color: var(--od-brand); }
.od-wa-card__text:hover { color: var(--od-brand); }
.od-wa-card__close { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; margin: -8px -2px 0 0; border-radius: 50%; background: none; border: 0; color: #8c8c8c; }
.od-wa-card__close:hover { color: var(--od-white); }
.od-wa-card__close:focus-visible { outline: 2px solid var(--od-white); outline-offset: 0; }
.od-wa-card__close svg { width: 18px; height: 18px; }
.od-top {
	position: fixed; right: 24px; bottom: 120px; z-index: 91;
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: var(--od-white); color: var(--od-black); border: 1px solid var(--od-grey-200);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity 0.25s var(--od-ease), transform 0.25s var(--od-ease), visibility 0s linear 0.25s, border-color 0.2s, color 0.2s;
}
.od-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.od-top:hover { border-color: var(--od-brand); color: var(--od-brand); }
.od-top svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
	.od-wa { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 52px; padding: 0 18px 0 14px; font-size: 14px; }
	.od-wa svg { width: 22px; height: 22px; }
	.od-wa-card { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); width: min(270px, calc(100vw - 28px)); padding: 14px 8px 14px 16px; }
	.od-wa-card__text { font-size: 13px; }
	.od-top { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* ---------- Cookie consent ---------- */
.od-consent {
	position: fixed; left: var(--od-w-edge); bottom: var(--od-w-bottom); z-index: 90;
	display: flex; flex-direction: column; gap: 16px;
	width: 420px; max-width: calc(100vw - 2 * var(--od-w-edge) - var(--od-w-launcher) - 12px);
	padding: 20px; background: var(--od-white); color: var(--od-black);
	border: 1px solid var(--od-grey-200); box-shadow: var(--od-w-shadow);
}
.od-consent__text { font-size: var(--od-fs-b4); line-height: 1.6; color: var(--od-grey-600); }
.od-consent__text a { color: var(--od-black); font-weight: 500; text-decoration: underline; text-decoration-color: var(--od-brand); text-underline-offset: 0.25em; }
.od-consent__text a:hover { color: var(--od-brand-text); }
.od-consent__actions { display: flex; gap: 8px; }
.od-consent__button {
	flex: 1 1 0; min-height: 44px; padding: 8px 16px;
	background: var(--od-black); color: var(--od-white); border: 1px solid var(--od-black);
	font-size: var(--od-fs-b4); font-weight: 500; line-height: 1.5;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.od-consent__button:hover { background: var(--od-brand); border-color: var(--od-brand); }
.od-consent__button--ghost { background: transparent; color: var(--od-black); border-color: var(--od-grey-200); }
.od-consent__button--ghost:hover { background: transparent; border-color: var(--od-brand); color: var(--od-brand-text); }
.od-consent__button:focus-visible { outline-offset: 2px; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.od-consent { gap: 12px; padding: 14px; }
	.od-consent__button { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.od-top { transition: none; transform: none; }
	.od-wa, .od-js .od-wa, .od-wa-card { transition: none; transform: none; }
	.od-wa__cur { animation: none; }
}
@media print {
	.od-top, .od-consent, .od-wa, .od-wa-card { display: none !important; }
}

/* ---------- Touch and small screens ---------- */
.od-lang__cap { font-size: 12px; }
.od-lang__state { font-size: 11px; }
@media (max-width: 600px) {
	/* The language card spans the screen instead of hanging off the button */
	.od-lang { position: static; }
	.od-lang__menu { top: calc(var(--od-header-h) - 6px); left: var(--od-gutter); right: var(--od-gutter); width: auto; padding: 14px; }
	.od-lang__code { font-size: 38px; }
	/* The line stands in the bar, from the edge of the page to the language control (--od-lang-edge is set by the script), clear of the page */
	.od-lang__hint { top: 6px; left: var(--od-gutter); right: var(--od-lang-edge, 148px); min-height: calc(var(--od-header-h) - 12px); padding-left: 12px; font-size: 13px; line-height: 1.25; white-space: normal; transform-origin: top left; }
	.od-lang__hint a { text-underline-offset: 3px; }
	/* Six languages on a phone: two across, three rows of lower tiles */
	.od-lang__menu--wide .od-lang__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.od-lang__menu--wide .od-lang__item { aspect-ratio: auto; gap: 14px; padding: 12px 14px; }
	.od-lang__menu--wide .od-lang__state { top: 14px; }
}

/* ---------- Contrast themes: the round buttons keep an edge ---------- */
@media (forced-colors: active) {
	.od-top { border: 1px solid ButtonText; }
}

/* ---- Project photographs: keyboard focus shows a plain outline round the link (the hover brackets were removed on 15 Oct 2026). */
:is(.od-piece__link, .od-gal__link, .od-work-card__link):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- The film of a project's cover ----------
   A silent loop of the scene the cover shows, laid over the picture in a piece of the home page, a piece of the
   wall and a project card (inc/work.php, assets/js/cover-film.js). It is shown only once it plays, and follows what
   the picture does (the zoom under the pointer, the opening from the foot). The picture alone stands without
   scripts, with reduced motion and in print, and while a piece is carried into its case study. */
.od-piece__frame, .od-gal__frame { position: relative; }
.od-film { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--od-ease), scale 0.9s var(--od-ease), clip-path 1s var(--od-ease); }
.od-film.is-on { opacity: 1; }
.od-film.is-going { opacity: 0; transition-duration: 0.14s; }
.od-film.is-cut { opacity: 0; transition: none; }
.od-piece__link:hover .od-film, .od-piece__link:focus-visible .od-film, html.od-piece-out .od-piece.is-chosen .od-film, .od-gal__piece.is-lit .od-film { scale: 1.04; }
/* In a project card the picture is set larger and drifts with the scroll (motion.js writes its scale and its place on
   the picture): the script copies both to the film, frame by frame, so the two stay on each other. */
.od-media .od-film { transition: opacity 0.5s var(--od-ease), transform 0.8s var(--od-ease); }
a:hover > .od-media .od-film, a:focus-visible > .od-media .od-film { transform: scale(1.05); }
.od-pieces-live .od-piece.is-wait .od-film, .od-gal--live .od-gal__piece.is-wait .od-film { clip-path: inset(100% 0 0 0); }
.od-gal__wall.has-lit .od-gal__piece:not(.is-lit) .od-film, .od-gal__wall.is-leaving .od-film { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .od-film { display: none; } }
@media print { .od-film { display: none !important; } }

/* ---------- The language card, full screen (theme 1.3.281, the owner's word of 21 October 2026) ----------
   Opens over the page like the menu: the same dark ground, the language names in the menu's type, set where
   the menu's page names stand (bottom right). The button in the bar turns into a cross while it is open. */
.od-lang .od-lang__menu {
	--od-brand-text: var(--od-brand);
	position: fixed; inset: 0; z-index: 1; top: 0; left: 0; right: 0; width: auto; max-height: none;
	display: flex; flex-direction: row; justify-content: space-between; align-items: safe flex-end; gap: 40px;
	padding: calc(var(--od-header-h) + 20px) var(--od-gutter) var(--od-gutter);
	background: rgba(0, 0, 0, 0.8); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
	border: 0; box-shadow: none; color: var(--od-white); overflow-y: auto;
}
.od-lang .od-lang__menu[hidden] { display: none; }
.od-lang .od-lang__menu:not([hidden]) { animation: od-lang-fade 0.45s var(--od-ease); }
@keyframes od-lang-fade { from { opacity: 0; } }
.od-lang .od-lang__cap, .od-lang .od-lang__code, .od-lang .od-lang__state { display: none; }
.od-lang .od-lang__grid, .od-lang .od-lang__menu--wide .od-lang__grid { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.od-lang .od-lang__item, .od-lang .od-lang__menu--wide .od-lang__item {
	display: block; aspect-ratio: auto; padding: 0; border: 0; background: none; color: var(--od-white); transform: none;
	font-size: min(var(--od-fs-h1), clamp(30px, (100vh - 320px) / 6, 80px)); line-height: 1.2; font-weight: 500; text-transform: uppercase; text-align: right;
}
.od-lang .od-lang__name { display: inline; font-size: inherit; font-weight: inherit; line-height: inherit; }
.od-lang .od-lang__item:hover, .od-lang .od-lang__item[aria-current="true"] { color: var(--od-brand); border: 0; background: none; transform: none; }
.od-lang .od-lang__item--closed { color: var(--od-grey-300); }
.od-lang .od-lang__item:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 4px; }
/* The button stays above the ground and shows a cross while the card is open; the menu button steps aside */
.od-lang .od-lang__toggle { position: relative; z-index: 2; }
.od-lang .od-lang__toggle[aria-expanded="true"] { width: 48px; justify-content: center; color: var(--od-brand); }
.od-lang .od-lang__toggle[aria-expanded="true"] > * { display: none; }
.od-lang .od-lang__toggle[aria-expanded="true"]::before, .od-lang .od-lang__toggle[aria-expanded="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transform: rotate(45deg); }
.od-lang .od-lang__toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }
html.od-lang-open, html.od-lang-open body { overflow: hidden; }
/* The left column is the menu's own (wordmark, line, address, offices, profiles), copied in by widgets.js */
.od-lang .od-lang__grid { order: 1; flex: 1 1 0; }
.od-lang .od-menu__info { margin-top: 0; }
html.od-js .od-lang .od-menu__info > *, .od-lang .od-menu__info > * { opacity: 1; transform: none; transition: none; }
.od-lang .od-menu__info a:hover { color: var(--od-brand); }
html.od-lang-open .od-burger { visibility: hidden; }
@media (max-width: 600px) {
	/* As the menu on a phone: the names first, the menu's details under them */
	.od-lang .od-lang__menu { top: 0; left: 0; right: 0; flex-direction: column-reverse; align-items: stretch; justify-content: space-between; gap: 32px; padding: calc(var(--od-header-h) + 60px) var(--od-gutter) var(--od-gutter); }
	.od-lang .od-lang__grid { flex: none; }
	.od-lang .od-lang__item { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { .od-lang .od-lang__menu:not([hidden]) { animation: none; } }
