/* Page publique d'un artiste — designs pilotés par variables + classes :
   L-(masonry|grid|grid2|rows|single|editorial|salon)  H-(center|left|cover|split|big|minimal)
   C-(below|overlay)  F-(none|mat|shadow|border)  U (titres en capitales) */
:root { --bg:#fff; --fg:#161616; --muted:#777; --line:#e9e9e9; --soft:#f6f6f4; --accent:#161616;
  --hf: Georgia, serif; --bf: system-ui, sans-serif; --hw: 500; --r: 0px; --pad: clamp(16px, 4vw, 56px); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--bf); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, .a-brand { font-family: var(--hf); font-weight: var(--hw); }
.U h1, .U h2, .U .a-brand { text-transform: uppercase; letter-spacing: .08em; }
.preview-bar { background: #b4532a; color: #fff; text-align: center; padding: .6em 1em; font: 500 .9rem system-ui, sans-serif; position: sticky; top: 0; z-index: 40; }
.preview-bar a { color: #fff; font-weight: 700; margin-left: .6em; }

/* En-tête */
.a-head { display: flex; justify-content: space-between; align-items: center; padding: 22px var(--pad); gap: 16px; position: relative; z-index: 5; }
.a-brand { font-size: 1.15rem; text-decoration: none; letter-spacing: .01em; }
.a-head nav { display: flex; gap: clamp(12px, 2.5vw, 30px); align-items: center; font-size: .9rem; }
.a-head nav > a { text-decoration: none; color: var(--muted); transition: color .2s; }
.a-head nav > a:hover { color: var(--fg); }
.a-lang { position: relative; }
.a-lang summary { list-style: none; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: .2em .55em; border-radius: calc(var(--r) / 2); }
.a-lang summary::-webkit-details-marker { display: none; }
.a-lang div { position: absolute; right: 0; top: 130%; background: var(--bg); border: 1px solid var(--line); padding: 6px; z-index: 10; min-width: 130px; border-radius: var(--r); }
.a-lang div a { display: block; padding: .35em .6em; text-decoration: none; font-size: .9rem; }
.a-lang div a:hover { background: var(--soft); }
@media (max-width: 560px) { .a-head nav > a:not(:last-of-type) { display: none; } }

/* Héros */
.a-hero { text-align: center; padding: clamp(40px, 8vw, 100px) var(--pad) clamp(30px, 5vw, 64px); }
.a-hero h1 { font-size: clamp(2.4rem, 7vw, 5.2rem); line-height: 1.04; margin: 0 0 .3em; letter-spacing: -.015em; }
.a-hero p { color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; margin: 0; }
.H-left .a-hero { text-align: left; border-bottom: 1px solid var(--line); margin: 0 var(--pad) clamp(30px, 4vw, 56px); padding-left: 0; padding-right: 0; }
.H-big .a-hero { text-align: left; padding-top: clamp(30px, 6vw, 80px); }
.H-big .a-hero h1 { font-size: clamp(3.2rem, 13vw, 11rem); line-height: .9; letter-spacing: -.04em; }
.H-big.U .a-hero h1 { letter-spacing: -.01em; }
.H-big .a-hero p { margin-top: 1.2em; }
.H-minimal .a-hero { padding: 10px var(--pad) 34px; }
.H-minimal .a-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.a-hero-cover { position: relative; padding: 0; height: min(86vh, 900px); margin-top: -76px; overflow: hidden; text-align: left; display: flex; align-items: flex-end; }
.a-hero-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.a-hero-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%); }
.a-hero-cover .a-hero-txt { position: relative; z-index: 1; padding: 0 var(--pad) clamp(30px, 6vw, 70px); color: #fff; }
.a-hero-cover p { color: rgba(255,255,255,.8); }
.H-cover .a-head { color: #fff; }
.H-cover .a-head nav > a, .H-cover .a-lang summary { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.4); }
.H-cover .a-lang div { color: var(--fg); }
.a-hero-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 80px); align-items: center; text-align: left; padding-top: clamp(20px, 4vw, 50px); }
.a-hero-split figure { margin: 0; }
.a-hero-split figure img { width: 100%; max-height: 78vh; object-fit: cover; border-radius: var(--r); }
.a-kicker { margin-bottom: 1.2em !important; }
.a-lead { text-transform: none !important; letter-spacing: 0 !important; font-size: 1.08rem !important; color: var(--muted); max-width: 32em; margin: 1em 0 2em !important; line-height: 1.7; }
.a-btn { display: inline-block; padding: .9em 2em; border: 1px solid var(--fg); text-decoration: none; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; border-radius: var(--r); transition: background .2s, color .2s; }
.a-btn:hover { background: var(--fg); color: var(--bg); }
@media (max-width: 800px) { .a-hero-split { grid-template-columns: 1fr; } .a-hero-split figure { order: -1; } }

/* Galerie — base */
.a-works { padding: 0 var(--pad) clamp(40px, 6vw, 90px); }
.gal { max-width: 1500px; margin: 0 auto; }
.w { margin: 0; position: relative; }
.w-open { display: block; width: 100%; padding: 0; border: 0; background: var(--soft); cursor: zoom-in; overflow: hidden; border-radius: var(--r); }
.w-open img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.w-open:hover img { transform: scale(1.025); }
.w figcaption { padding-top: 12px; display: grid; gap: 2px; }
.w-t { font-size: 1.02rem; margin: 0; font-style: italic; line-height: 1.3; }
.U .w-t { font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.w-m { color: var(--muted); font-size: .84rem; }
.w-sale { font-size: .82rem; color: var(--accent); font-weight: 600; }
.w-sale::before { content: "● "; font-size: .7em; vertical-align: middle; }

/* Masonry */
.L-masonry .gal { columns: 3 300px; column-gap: clamp(16px, 2.5vw, 36px); }
.L-masonry .w { break-inside: avoid; margin-bottom: clamp(24px, 3vw, 44px); }
/* Salon : accrochage serré façon salon XIXe */
.L-salon .gal { columns: 4 220px; column-gap: 14px; }
.L-salon .w { break-inside: avoid; margin-bottom: 14px; }
/* Grille carrée */
.L-grid .gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 2vw, 28px); }
.L-grid .w-open { aspect-ratio: 1; }
.L-grid .w-open img { height: 100%; object-fit: cover; }
/* Deux colonnes, œuvre entière sur fond doux */
.L-grid2 .gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 4vw, 60px); max-width: 1300px; }
.L-grid2 .w-open { aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 8%; }
.L-grid2 .w-open img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 640px) { .L-grid2 .gal { grid-template-columns: 1fr; } }
/* Rangées justifiées */
.L-rows .gal { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.6vw, 22px); }
.L-rows .w { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 260px); }
.L-rows .gal::after { content: ""; flex: 10 1 300px; }
/* Une œuvre par ligne */
.L-single .gal { max-width: 1000px; display: grid; gap: clamp(50px, 8vw, 110px); }
.L-single .w figcaption { text-align: center; padding-top: 18px; }
.L-single .w-open { background: transparent; }
.L-single .w-open img { max-height: 88vh; width: auto; margin: 0 auto; }
/* Éditorial : image et texte en alternance */
.L-editorial .gal { display: grid; gap: clamp(50px, 8vw, 120px); max-width: 1250px; }
.L-editorial .w { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.L-editorial .w:nth-child(even) .w-open { order: 2; }
.L-editorial .w figcaption { padding: 0; }
.L-editorial .w-t { font-size: clamp(1.5rem, 3vw, 2.4rem); font-style: normal; font-family: var(--hf); font-weight: var(--hw); }
.L-editorial .w-m { font-size: .95rem; }
.L-editorial .w-open { background: transparent; }
@media (max-width: 760px) { .L-editorial .w { grid-template-columns: 1fr; } .L-editorial .w:nth-child(even) .w-open { order: 0; } }

/* Légendes en surimpression */
.C-overlay .w figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.7)); opacity: 0; transition: opacity .35s; border-radius: 0 0 var(--r) var(--r); }
.C-overlay .w:hover figcaption, .C-overlay .w:focus-within figcaption { opacity: 1; }
.C-overlay .w-m { color: rgba(255,255,255,.78); }
.C-overlay .w-sale { color: #fff; }
@media (hover: none) { .C-overlay .w figcaption { opacity: 1; } }
.C-overlay.F-mat .w figcaption { bottom: 0; }

/* Cadres */
.F-mat .w-open { background: #fdfcf9; padding: 7%; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 34px -12px rgba(0,0,0,.35); border: 1px solid rgba(0,0,0,.06); }
.F-mat.L-grid .w-open img { object-fit: contain; }
.F-shadow .w-open { box-shadow: 0 22px 50px -18px rgba(0,0,0,.45); background: transparent; }
.F-border .w-open { border: 1px solid var(--accent); padding: 10px; background: transparent; }
.F-border.L-grid .w-open img { border-radius: calc(var(--r) / 2); }

/* À propos */
.a-about { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 660px); gap: clamp(24px, 5vw, 80px); justify-content: center; align-items: start;
  padding: clamp(56px, 9vw, 120px) var(--pad); border-top: 1px solid var(--line); background: var(--soft); }
.a-about:not(:has(.a-photo)) { grid-template-columns: minmax(0, 760px); }
.a-photo { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r); }
.a-about h2, .a-contact h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 .7em; }
.a-bio { font-size: 1.06rem; line-height: 1.8; }
.a-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 24px; font-size: .92rem; }
.a-links a { color: var(--accent); }
@media (max-width: 760px) { .a-about { grid-template-columns: 1fr; } .a-photo { max-width: 300px; } }

/* Contact */
.a-contact { max-width: 700px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) 20px; text-align: center; }
.a-direct { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.a-direct a { color: var(--accent); font-weight: 600; text-decoration: none; }
.a-form { display: grid; gap: 12px; text-align: left; }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .a-row { grid-template-columns: 1fr; } }
.a-form input, .a-form textarea { width: 100%; padding: .9em 1em; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; border-radius: var(--r); }
.a-form input:focus, .a-form textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.a-form button { justify-self: center; padding: 1em 2.6em; background: var(--fg); color: var(--bg); border: 0; font: 600 .8rem var(--bf); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; border-radius: var(--r); transition: opacity .2s; }
.a-form button:hover { opacity: .85; }
.a-about-work { margin: 0; padding: .6em .9em; background: var(--soft); font-size: .92rem; }
.a-ok { padding: 1em; background: var(--soft); }
.a-err { color: #c0392b; }

/* Pied de page */
.a-foot { text-align: center; padding: 30px 20px 44px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.a-foot p { margin: .5em 0 0; }
.a-foot a { color: var(--muted); }
.a-crumbs a { text-decoration: none; }

/* Visionneuse */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10,10,10,.96); display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 30px 0; min-width: 0; }
.lb img { max-height: calc(100vh - 170px); max-width: 100%; object-fit: contain; }
.lb figcaption { color: #eee; text-align: center; padding-top: 16px; font-size: .92rem; display: grid; gap: 4px; justify-items: center; font-family: var(--bf); }
.lb figcaption b { font: italic 400 1.2rem var(--hf); }
.lb figcaption small { color: #aaa; }
.lb figcaption button { margin-top: 8px; background: #fff; color: #111; border: 0; padding: .7em 1.4em; font: 600 .78rem var(--bf); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.lb-x, .lb-p, .lb-n { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; opacity: .75; height: 100%; }
.lb-x:hover, .lb-p:hover, .lb-n:hover { opacity: 1; }
.lb-x { position: absolute; top: 8px; right: 14px; height: auto; font-size: 2.2rem; z-index: 2; }
@media (max-width: 560px) { .lb { grid-template-columns: 36px 1fr 36px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
