Files
le-shed_proto_formes/style.css
2026-05-18 23:07:31 +02:00

294 lines
5.3 KiB
CSS

/* ----------------------------------------------------------------
Le Shed — Centre d'art contemporain en Normandie
Maquette desktop avec parallax différentiel entre colonnes
---------------------------------------------------------------- */
@font-face {
font-family: 'BVH';
src: url('assets/fonts/BVHAntoPlotTrial-LightItalic.otf') format('opentype');
font-weight: 300;
font-style: italic;
font-display: swap;
}
:root {
--color-bg: #ffffff;
--color-ink: #000000;
--motif-color: #000000;
--color-mute: #6a6a6a;
--color-light: #9a9a9a;
--font-display: 'BVH', 'Inter', serif;
--font-body: 'Inter', system-ui, sans-serif;
--page-pad-x: 80px;
--page-pad-y: 28px;
--col-gap: 64px;
/* (réservé) */
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
background: var(--color-bg);
color: var(--color-ink);
font-family: var(--font-body);
font-size: 15px;
line-height: 1.45;
-webkit-font-smoothing: antialiased;
}
body {
overflow-x: hidden;
/* Stacking context sans position:relative pour éviter que les layers
absolues du paysage n'étirent le scrollHeight */
isolation: isolate;
}
img {
display: block;
max-width: 100%;
height: auto;
}
/* -------- Couleur motifs -------- */
.objets-layer path,
.objets2-layer path,
.paysage-layer path {
fill: var(--motif-color) !important;
}
/* -------- Settings -------- */
.settings {
position: fixed;
top: 16px;
left: 16px;
z-index: 200;
display: none;
}
.settings__btn {
background: none;
border: none;
font-size: 16px;
cursor: pointer;
opacity: 0.35;
padding: 4px;
transition: opacity 0.15s ease;
line-height: 1;
}
.settings__btn:hover {
opacity: 1;
}
.settings__panel {
margin-top: 6px;
background: var(--color-bg);
border: 1px solid #e0e0e0;
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 120px;
}
.settings__panel[hidden] {
display: none;
}
.settings__label {
font-size: 11px;
color: var(--color-mute);
letter-spacing: 0.05em;
text-transform: uppercase;
margin-bottom: 2px;
}
.settings__option {
font-size: 13px;
cursor: pointer;
display: flex;
align-items: center;
gap: 7px;
}
/* -------- Masthead -------- */
.masthead {
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
align-items: flex-start;
max-width: 1000px;
margin-inline: auto;
padding: var(--page-pad-y) var(--page-pad-x);
z-index: 100;
background: var(--color-bg);
transition: padding 0.3s ease;
}
.layout {
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: var(--col-gap);
max-width: 1000px;
margin-inline: auto;
padding: 36px var(--page-pad-x) 36px;
align-items: start;
z-index: 5;
}
.brand__title {
font-family: var(--font-display);
font-weight: 300;
font-size: 28px;
line-height: 1;
letter-spacing: 0.01em;
}
.brand__sub {
font-size: 11px;
color: var(--color-mute);
margin-top: 4px;
line-height: 1.35;
transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
max-height: 3em;
overflow: hidden;
}
.masthead.is-compact {
padding-bottom: 10px;
}
.masthead.is-compact .brand__sub {
opacity: 0;
max-height: 0;
margin-top: 0;
}
.nav {
display: flex;
gap: 36px;
padding-top: 8px;
}
.nav a {
color: var(--color-ink);
text-decoration: none;
font-size: 14px;
font-weight: 400;
transition: opacity 0.18s ease;
}
.nav a:hover {
opacity: 0.5;
}
/* -------- Colonnes -------- */
.col {
position: relative;
display: flex;
flex-direction: column;
gap: 0;
}
.col > .card + .card,
.col__cards > .card + .card {
margin-top: 56px;
}
.col__heading {
position: sticky;
top: var(--header-h, 80px);
font-size: 13px;
font-weight: 400;
color: var(--color-mute);
letter-spacing: 0.01em;
z-index: 10;
background: var(--color-bg);
padding: 8px 0 0;
--col-heading-h: 35px;
}
.col--left > .col__heading {
width: calc(100% + 64px);
}
.col__cards {
display: flex;
flex-direction: column;
margin-top: 0;
padding-top: 0;
}
/* -------- Cards -------- */
.card {
display: flex;
flex-direction: column;
}
.card__media {
margin-bottom: 18px;
overflow: hidden;
transition: scale 0.3s ease;
}
.card__media img {
width: 100%;
height: auto;
object-fit: cover;
}
.card__title {
position: sticky;
top: calc(var(--header-h, 80px) + var(--col-heading-h, 35px) - 2px);
font-family: var(--font-display);
font-weight: 300;
font-size: 44px;
line-height: 1;
margin-bottom: 6px;
color: var(--color-ink);
z-index: 5;
background: var(--color-bg);
padding: 8px 0;
transition: font-size 0.3s ease;
}
/* Hover carte */
.card {
cursor: pointer;
}
.card:hover > .card__title {
font-size: 42.7px;
}
.card:hover > .card__media {
scale: 0.97;
}
.card__author {
font-size: 15px;
font-weight: 400;
color: var(--color-ink);
margin-bottom: 4px;
}
.card__meta {
font-size: 13px;
color: var(--color-mute);
line-height: 1.45;
}