/* Website AZ v2 — same look as v1 (Alegreya / Alegreya SC, menu on the right), rebuilt cleanly.
   Desktop: >= 768px. Phone: < 768px (top bar + full-screen menu). */

:root {
  --ink: #222222;
  --paper: #E0E0E0;
  --grey: #444;
  --muted: darkgray;
  --red: #EE0B25;
  --ease: 0.4s ease-in-out;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 8px;
  padding-left: 5px;
  font-family: 'Alegreya', serif;
  font-size: 13px;
  background: #fff;
  color: #000;
}
::selection { background: var(--ink); color: var(--paper); }

h1 { font-family: 'Alegreya SC', serif; font-weight: 700; font-size: 17px; }
h2 { font-family: 'Alegreya', serif; font-weight: 700; font-size: 16px; margin-top: -10px; }

a:link, a:visited { text-decoration: none; color: inherit; transition: var(--ease); }
a:hover { background: var(--ink); color: var(--paper); }
a:active { background: var(--red); color: var(--paper); }

.name, .link { font-family: 'Alegreya SC', serif; font-weight: 400; display: inline-block; }
.SC { font-family: 'Alegreya SC', serif; font-style: normal; display: inline-block; }
.project_name { font-family: 'Alegreya SC', serif; font-weight: 700; }
span.line { display: inline-block; }
.red { color: var(--red); }
.date { font-style: italic; }
.exergue { color: whitesmoke; background-color: var(--red); }
.underline_red { text-decoration: underline; text-decoration-color: var(--red); }
.soon { text-decoration: line-through; text-decoration-color: var(--red); }
.special::selection { background: var(--red); color: var(--paper); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fade { animation: fadein 0.5s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Menu ---------------- */
.topbar { display: none; }

.menucontainer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  box-sizing: border-box;
  padding: 0 0 5px 8px;
  border-bottom: 17px solid var(--ink);
  background: transparent;
  animation: fadein 0.5s;
}
.menucontainer::-webkit-scrollbar { display: none; }
.menucontainer .menu-name a:hover { background: var(--ink); }

p.accordion, p.accordion_2 {
  font-family: 'Alegreya SC', serif;
  color: var(--grey);
  cursor: pointer;
  margin: 0;
  display: inline-block;
  transition: 0.6s ease-in-out;
}
p.accordion.active, p.accordion:hover,
p.accordion_2.active, p.accordion_2:hover {
  background: var(--ink);
  color: var(--paper);
  transition: var(--ease);
}
p.accordion:focus-visible, p.accordion_2:focus-visible { outline: 1px solid var(--red); }
p.accordion.blink { animation: blink01 5s infinite; }
@keyframes blink01 {
  0%, 45% { color: var(--grey); background: transparent; }
  50% { background: var(--red); color: var(--paper); }
  100% { color: var(--grey); background: transparent; }
}

div.panel, div.panel_2 {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  transition: 0.8s ease-out;
}
div.panel.show, div.panel_2.show {
  opacity: 1;
  max-height: 500px;
  transition: 0.8s ease-in-out;
}
.menucontainer a.current { text-decoration: underline; text-decoration-color: var(--red); }
.menucontact:hover, .menucontact:active { background: var(--red); color: var(--paper); transition: 0.1s; }
.menu-copy { font-size: 10px; color: #9A9A9A; font-style: italic; margin-bottom: 0; }

/* ---------------- Home ---------------- */
.indeximagecontainer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.indeximagecontainer a:hover { background: none; }
.center {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
}

/* ---------------- Project ---------------- */
.row, .row_credit { padding-top: 50px; z-index: 10; }
.row { position: fixed; transition: opacity var(--ease); }
.row.is-hidden { opacity: 0; pointer-events: none; }
.row_credit { position: absolute; }
.row::after, .row_credit::after { content: ""; display: table; clear: both; }
.column {
  float: left;
  width: 35%;
  min-width: 140px;
  padding-right: 30px;
  box-sizing: content-box;
}
.credits { float: left; clear: both; width: 70%; color: var(--muted); }
.footer { float: left; width: 70%; padding-bottom: 20px; margin-top: 5px; color: var(--muted); }

.main_column {
  width: min(80%, calc(100% - 190px));
  padding-top: 280px;   /* adjusted by site.js to the height of the text block */
}
.content_img, .content_img_vert {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 50px;
  clear: both;
}
.content_img { width: 100%; }
.content_img_vert { max-height: 700px; width: auto; object-fit: contain; }
.small_img { max-width: 30%; }
.strip { width: 2000px; max-width: 2000px; }
#firstimage { margin-top: 10px; }
.vimeo { position: relative; width: 100%; padding-top: 56.25%; margin-bottom: 50px; }
.vimeo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video { background: transparent; }
/* "GIF avec son": the wrapper takes the image classes, the video fills it */
.video-sound { position: relative; }
.video-sound.content_img_vert { width: fit-content; }
.video-sound video { display: block; width: 100%; height: auto; max-height: inherit; }
.video-sound.content_img_vert video { width: auto; max-width: 100%; max-height: 700px; }
.sound-btn {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font: 400 13px 'Alegreya SC', serif;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 0;
  padding: 3px 8px;
  cursor: pointer;
  transition: var(--ease);
}
.sound-btn:hover { background: var(--ink); color: var(--paper); }
.sound-btn .sound-on, .sound-btn[aria-pressed="true"] .sound-off { display: none; }
.sound-btn[aria-pressed="true"] .sound-on { display: inline; }

/* ---------------- All projects ---------------- */
.main_column_ALL { width: min(80%, calc(100% - 190px)); padding-top: 10px; }
.main_column_ALL::after { content: ""; display: table; clear: both; }
.main_column_ALL a:hover { background: none; opacity: 0.85; }
.ALL_img { height: 200px; width: auto; float: left; margin: 15px 15px 0 0; }

@media (max-width: 900px) and (min-width: 768px) {
  .ALL_img { height: 180px; margin: 10px 10px 0 0; }
}

/* =====================================================================
   Phone (< 768px): fixed top bar, full-screen menu, content full width.
   ===================================================================== */
@media (max-width: 767px) {
  body {
    margin: 0;
    padding: calc(56px + env(safe-area-inset-top)) 16px env(safe-area-inset-bottom);
    font-size: 15px;
    line-height: 1.45;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: 48px;
    padding: env(safe-area-inset-top) 16px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
  }
  .topbar-name { font-family: 'Alegreya SC', serif; font-weight: 700; font-size: 18px; }
  .topbar-btn {
    font: inherit;
    font-family: 'Alegreya SC', serif;
    font-size: 16px;
    color: var(--ink);
    background: none;
    border: 0;
    padding: 10px 0 10px 16px;
    cursor: pointer;
  }
  .topbar-btn .close-label, .menu-open .topbar-btn .open-label { display: none; }
  .menu-open .topbar-btn .close-label { display: inline; }
  .topbar a:hover { background: none; color: inherit; }

  .menucontainer {
    top: calc(48px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    bottom: 0;
    max-height: none;
    padding: 8px 16px 40px;
    border-bottom: 0;
    background: #fff;
    font-size: 18px;
    line-height: 1.6;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
    animation: none;
    overscroll-behavior: contain;
  }
  .menu-open .menucontainer { visibility: visible; opacity: 1; transform: none; transition: opacity 0.25s ease, transform 0.25s ease; }
  .menu-open { overflow: hidden; }
  .menucontainer .menu-name { display: none; }
  .menucontainer h2 { margin: 4px 0 18px; font-size: 16px; }
  p.accordion, p.accordion_2 { padding: 3px 0; }
  div.panel, div.panel_2 { padding-left: 18px; }
  div.panel.show, div.panel_2.show { max-height: 900px; padding-bottom: 6px; }
  .menu-copy { margin-top: 18px; }

  /* home: one image, full screen under the bar */
  .indeximagecontainer { top: calc(48px + env(safe-area-inset-top)); }
  .center { max-width: calc(100% - 32px); max-height: 86%; }

  /* project: text above, images full width */
  .row, .row_credit { position: static; padding-top: 8px; }
  .row.is-hidden { opacity: 1; pointer-events: auto; }
  .column { float: none; width: auto; min-width: 0; padding-right: 0; }
  .credits, .footer { float: none; width: auto; font-size: 13px; }
  .main_column, .main_column_ALL { width: auto; padding-top: 20px !important; }
  .content_img, .content_img_vert { width: 100%; max-height: none; margin-bottom: 20px; }
  .small_img { max-width: 60%; width: 60%; }
  .strip { width: 100%; max-width: 100%; }
  .vimeo { margin-bottom: 20px; }

  .main_column_ALL { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .main_column_ALL::after { display: none; }
  .ALL_img { float: none; width: 100%; height: 34vw; margin: 0; object-fit: cover; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
