@import url("fonts/fonts.css");

/* ------------------------------------------------------------------
   Viktor Musi — version sobre : blanc, noir et gris.
   La couleur vient seulement des tableaux.
   ------------------------------------------------------------------ */
:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --paper: #ffffff;
  --line: #e6e6e6;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --text-font: "Literata", Georgia, "Times New Roman", serif;
  --pad: clamp(1rem, 3.5vw, 3rem);
  --max: 84rem;
  --measure: 40rem;
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --c: var(--ink); --on: #fff; --hi: var(--ink); --link: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.09rem/1.72 var(--text-font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--hi); outline-offset: 3px; }
strong { font-weight: 650; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.15; letter-spacing: 0; margin: 2em 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 4.2rem); margin: 0; }
h2 { font-size: clamp(1.35rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
hr { border: 0; border-top: 2px solid var(--line); margin: 3rem 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 300; }
.skip:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------- En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); --on: var(--ink); }
.bar { max-width: var(--max); margin-inline: auto; padding: .95rem var(--pad); display: flex; align-items: center; gap: 1.6rem; }
.brand { font-family: var(--display); font-weight: 500; font-size: 1.3rem; letter-spacing: .01em; color: var(--on); text-decoration: none; margin-right: auto; white-space: nowrap; }
.site-nav { display: contents; }
.menu { order: 1; list-style: none; margin: 0; padding: 0; display: flex; gap: 1.3rem; align-items: center; }
.menu > li:first-child { display: none; }
.menu > li { position: relative; }
.menu a { font-family: var(--display); font-size: .98rem; font-weight: 400; text-decoration: none; color: var(--on); white-space: nowrap; }
.menu > li > a { display: block; padding: .45rem 0; border-bottom: 2px solid transparent; }
.menu > li > a:hover, .menu > li.active > a, .menu > li > a[aria-current] { border-bottom-color: var(--hi); }
.sub-toggle { display: none; }
.submenu {
  list-style: none; margin: 0; padding: .8rem; position: absolute; top: calc(100% + .6rem); left: -1rem; min-width: 22rem;
  background: var(--paper); border-radius: var(--radius); box-shadow: 0 18px 50px rgb(0 0 0 / .22);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -.8rem; height: .8rem; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: .5rem .8rem; border-radius: 8px; color: var(--ink); font-family: var(--text-font); font-size: .95rem; font-weight: 500; white-space: normal; }
.submenu a:hover, .submenu a[aria-current] { background: #f2f2f2; }
.langs { order: 2; display: flex; gap: .2rem; font-family: var(--display); font-size: .85rem; }
.langs a { color: var(--on); text-decoration: none; padding: .3rem .5rem; border-radius: 99px; opacity: .75; }
.langs a[aria-current] { background: var(--ink); color: #fff; opacity: 1; }
.menu-toggle { display: none; order: 3; }

@media (max-width: 1240px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: .55rem; background: var(--ink); color: #fff; border: 0; border-radius: 99px; padding: .5rem .95rem; cursor: pointer; font: 500 .9rem var(--display); position: relative; z-index: 2; }
  .burger { position: relative; width: 1rem; height: .6rem; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: .25s var(--ease); }
  .burger::before { top: 0; } .burger::after { top: calc(100% - 2px); }
  .menu-toggle[aria-expanded="true"] .burger::before { top: calc(50% - 1px); transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .burger::after { top: calc(50% - 1px); transform: rotate(-45deg); }
  .langs, .brand { position: relative; z-index: 2; }
  .site-nav { display: block; position: fixed; inset: 0; z-index: 1; background: #fff; padding: 5.5rem var(--pad) 3rem; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .site-nav.open { opacity: 1; visibility: visible; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu > li:first-child { display: block; }
  .menu > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid color-mix(in srgb, var(--on) 22%, transparent); }
  .menu > li > a { flex: 1; font-size: clamp(1.3rem, 5.5vw, 2rem); font-weight: 600; padding: .7rem 0; border: 0; }
  .menu > li > a[aria-current], .menu > li.active > a { text-decoration: underline; text-underline-offset: .2em; }
  .sub-toggle { display: block; background: none; border: 0; cursor: pointer; padding: 1rem .2rem 1rem 1rem; color: var(--on); }
  .sub-toggle span { display: block; width: .65rem; height: .65rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
  .has-sub.open > .sub-toggle span { transform: translateY(2px) rotate(-135deg); }
  .submenu { position: static; min-width: 0; width: 100%; padding: 0 0 1rem; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: none; }
  .has-sub.open > .submenu { display: block; }
  .submenu a { color: var(--on); padding: .4rem 0; font-size: 1.02rem; }
  .submenu a:hover, .submenu a[aria-current] { background: none; text-decoration: underline; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 520px) { .menu-label { display: none; } .bar { gap: .8rem; } .brand { font-size: .95rem; } }

/* --------------------------------------------------------- Accueil : page blanche */
.home-intro { min-height: calc(100svh - 12rem); display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.home-name { font: 400 clamp(2.8rem, 8.5vw, 6.8rem)/1.05 var(--display); letter-spacing: .01em; margin: 0; }
.home-sub { margin: 1.4rem 0 0; font: italic 400 clamp(1.15rem, 2.2vw, 1.6rem)/1.4 var(--text-font); color: var(--muted); }

.pill { display: inline-block; padding: .6rem 1.15rem; border-radius: 99px; font: 400 .92rem var(--display); text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1px currentColor; }
.pill:hover { background: var(--ink); color: #fff; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 500; }

/* --------------------------------------------------------- Tuiles d'œuvres */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: 2.2rem 1.6rem; }
.tile { display: block; text-decoration: none; color: inherit; }
.tile-frame { display: block; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.tile-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #fff; }
.tile-frame .empty { display: grid; place-items: center; aspect-ratio: 4 / 5; background: #fff; font: 800 2rem var(--display); color: var(--line); border: 1px solid var(--line); }
.tile:hover .tile-frame { opacity: .88; transform: translateY(-3px); }
.tile-cap { display: block; margin-top: .9rem; }
.tile-years { display: block; font: 400 .85rem var(--display); letter-spacing: .02em; color: var(--muted); }
.tile-name { display: block; font: 500 1.1rem/1.3 var(--display); margin-top: .2rem; }

/* Liste d'articles (presse, actualités) */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.6rem; }
.post { display: flex; flex-direction: column; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
.post:hover { border-color: var(--c); transform: translateY(-3px); }
.post .im { aspect-ratio: 4 / 3; background: #f5f5f5; display: grid; place-items: center; padding: 1rem; overflow: hidden; }
.post .im img { max-height: 100%; width: auto; object-fit: contain; }
.post .im .empty { font: 800 1.8rem var(--display); color: #d0d0d0; }
.post .body { padding: 1rem 1.1rem 1.3rem; }
.post .d { display: inline-block; font: 400 .85rem var(--display); color: var(--muted); }
.post .t { display: block; margin-top: .7rem; font-size: 1.02rem; line-height: 1.4; }

/* --------------------------------------------------------- Pages intérieures */
.entry { padding-bottom: 5rem; }
.entry-head { background: #fff; color: var(--ink); --on: var(--ink); border-bottom: 1px solid var(--line); padding-block: clamp(2.2rem, 6vw, 4.5rem) clamp(2.4rem, 6vw, 4.8rem); margin-bottom: clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.entry-head .wrap { position: relative; z-index: 1; }
.entry-head h1 { max-width: 60rem; font-weight: 500; }
.crumb { margin: 0 0 1rem; font: 400 .9rem var(--display); color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { opacity: 1; text-decoration: underline; }
.meta { margin: 1.1rem 0 0; font: 400 .95rem var(--display); color: var(--muted); }
.entry-content { max-width: calc(var(--measure) + 2 * var(--pad)); }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content li { overflow-wrap: anywhere; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--link); }
.entry-content h2.bio-section { clear: both; margin: 3.4rem 0 1.4rem; padding: 0 0 .6rem; color: var(--ink);
  font: 600 clamp(1.25rem, 2.4vw, 1.6rem)/1.25 var(--display); letter-spacing: 0; border-bottom: 2px solid var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.2rem; }
.entry-content li { margin: .35rem 0; }
.entry-content li::marker { color: var(--c); }
.entry-content blockquote, .entry-content .quote { margin: 2rem 0; padding: 1.2rem 1.4rem; background: #f5f5f5; border-radius: var(--radius); font-style: italic; }
.entry-content .quote + .quote { margin-top: -2.4rem; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 0; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.entry-content td, .entry-content th { border-top: 1px solid var(--line); padding: .6rem .6rem .6rem 0; vertical-align: top; text-align: left; }

.entry-content a.lb { display: block; width: fit-content; max-width: 100%; margin: 2.2rem 0; cursor: zoom-in; padding: .55rem; background: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .14); transition: transform .3s var(--ease); }
.entry-content a.lb:hover { transform: rotate(-.6deg); }
.entry-content img { max-height: 78vh; width: auto; }
.entry-content p > a.lb:only-child { margin: 0; }
.entry-content .figure { margin: 2.2rem 0; }
.entry-content .figure a.lb { margin: 0; }
.entry-content .aligncenter { margin-inline: auto; }
figcaption { font-size: .86rem; color: var(--muted); margin-top: .8rem; line-height: 1.45; font-style: italic; }

.gallery { columns: 3 13rem; column-gap: 1.3rem; margin: 2.8rem 0; width: min(100vw - 2 * var(--pad), 66rem); }
.g-item { break-inside: avoid; margin: 0 0 1.5rem; }
.g-item a.lb { margin: 0; width: 100%; }
.g-item img { width: 100%; max-height: none; }
.g-item figcaption { margin-top: .55rem; font-size: .8rem; }

.video { position: relative; left: 50%; translate: -50% 0; aspect-ratio: 16 / 9; background: var(--ink); margin: 2.4rem 0; width: min(100vw - 2 * var(--pad), 64rem, (100svh - 9rem) * 16 / 9); border-radius: var(--radius); overflow: hidden; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.video button img { width: 100%; height: 100%; max-height: none; object-fit: cover; opacity: .85; }
.video .play { position: absolute; left: 50%; top: 50%; width: 5.5rem; height: 5.5rem; margin: -2.75rem 0 0 -2.75rem; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.video .play::after { content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: .85rem 0 .85rem 1.35rem; border-color: transparent transparent transparent var(--ink); }
.video button:hover .play { transform: scale(1.08) rotate(-6deg); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contact */
.contact-box { background: #f5f5f5; border-radius: calc(var(--radius) * 1.5); padding: clamp(1.3rem, 4vw, 2.4rem); }
.contact-box > p:first-child { margin-top: 0; font-style: italic; }
.contact-form { margin-top: 1.6rem; }
.field { margin: 0 0 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { font: 600 .9rem var(--display); color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: .75rem .9rem; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c); }
.field--check { flex-direction: row; align-items: flex-start; gap: .7rem; }
.field--check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; flex: none; accent-color: var(--c); }
.field--check label { font: 400 .92rem/1.5 var(--text-font); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: .4rem 0 0; }
.btn { display: inline-block; padding: .9rem 1.8rem; border: 0; border-radius: 99px; background: var(--c); color: var(--on); font: 500 1rem var(--display); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease); }
.btn:hover { transform: translateY(-2px); color: var(--on); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-status { margin: 1.1rem 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #11724a; }
.form-status.is-error { color: #b3261e; }

/* --------------------------------------------------------- Pied de page */
.site-footer { background: #fff; color: var(--muted); border-top: 1px solid var(--line); padding: 2.5rem 0 2rem; overflow: hidden; }
.footer-grid { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; font-size: .9rem; }
.footer-grid p { margin: 0; max-width: 34rem; }
.footer-langs { display: flex; gap: .3rem; font: 400 .85rem var(--display); }
.footer-langs a { color: var(--ink); text-decoration: none; padding: .3rem .55rem; border-radius: 99px; }
.footer-langs a[aria-current] { background: var(--ink); color: #fff; }

/* --------------------------------------------------------- Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgb(23 17 29 / .97); display: grid; place-items: center; padding: 4rem 5rem 3rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { color: #e9dfee; text-align: center; margin-top: 1rem; font-size: .92rem; max-width: 44rem; }
.lightbox button { position: absolute; border: 0; cursor: pointer; font: 500 .9rem var(--display); background: #fff; color: var(--ink); border-radius: 99px; padding: .7rem 1.1rem; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; padding: 0 !important; font-size: 1.1rem !important; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-count { position: absolute; top: 1.5rem; left: 1.5rem; margin: 0; color: #e9dfee; font: 400 .9rem var(--display); }
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-count { display: none; }
@media (max-width: 640px) { .lightbox { padding: 4rem .6rem 5rem; } .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; } }
body.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .site-header, .site-footer, .lightbox { display: none; } .entry-head { background: none; color: #000; } }
