/* ─────────────────────────────────────
   BUREAU BARME — style.css
   ───────────────────────────────────── */

:root {
  --bg:    #0e0e0e;
  --text:  #e8e4dc;
  --muted: #5a5a58;
  --line:  rgba(232,228,220,0.1);
  --font:  'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── CURSEUR × ─── */
#cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  width: 20px; height: 20px;
  transition: opacity .15s;
}
#cursor::before,
#cursor::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: var(--text);
  width: 18px; height: 1px;
  transition: width .15s, background .15s;
}
#cursor::before { transform: translate(-50%,-50%) rotate(45deg); }
#cursor::after  { transform: translate(-50%,-50%) rotate(-45deg); }
#cursor.hover::before,
#cursor.hover::after { width: 24px; }
#cursor.press { opacity: .45; }
#cursor.on-row::before,
#cursor.on-row::after { background: #000; }

/* Nav alignée sur la grille de la liste projets */
.page-projects-nav {
  display: grid;
  grid-template-columns: 52px 52px 1fr 170px 110px 180px 120px 44px;
  padding: 22px 30px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}
.page-projects-nav .nav-logo {
  grid-column: 1 / 4;
}
.page-projects-nav .nav-links {
  grid-column: 7 / 9;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding-top: 2px;
}

/* Liens dans les crédits */
.proj-credits a,
.credit-val a {
  color: inherit;
  text-decoration: none;
  border-bottom: .5px solid currentColor;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.proj-credits a:hover,
.credit-val a:hover { opacity: .6 !important; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 30px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.45;
  opacity: .85;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: 1; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
  padding-top: 2px;
}
.nav-links a {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .38;
  transition: opacity .2s;
}
.nav-links a:hover,
.nav-links a.active { opacity: 1; }

/* ─── IMAGE SURVOL PROJETS ─── */
#hover-img {
  position: fixed;
  width: 180px; height: 260px;
  pointer-events: none;
  z-index: 300;
  opacity: 0;
  transform: translate(20px,-50%);
  transition: opacity .15s ease;
  overflow: hidden;
}
#hover-img.on { opacity: 1; }
#hover-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ═══════════════════════════════════
   PAGE ACCUEIL — SLIDESHOW
═══════════════════════════════════ */
.page-home {
  position: fixed; inset: 0;
  overflow: hidden;
}

.slideshow {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 80px 30px 30px;
  cursor: none;
}

.slot {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slot img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.slide { display: none; }
.slide-ph { display: none; }
.slide-caption { display: none; }
.slide-zone { display: none; }

/* ═══════════════════════════════════
   PAGE PROJETS
═══════════════════════════════════ */
.page-projects {
  padding-top: 88px;
  min-height: 100vh;
}

.col-headers {
  display: grid;
  grid-template-columns: 52px 52px 1fr 170px 110px 180px 120px 44px;
  padding: 0 30px 7px;
  border-bottom: .5px solid var(--line);
}
.col-headers span {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .1em;
  color: var(--muted);
}
.col-headers span:last-child { text-align: right; }

.project-list-wrap:hover .project-row {
  opacity: .3;
}
.project-list-wrap:hover .project-row:hover {
  opacity: 1;
  background: var(--text);
  color: var(--bg);
}

.project-row {
  display: grid;
  grid-template-columns: 52px 52px 1fr 170px 110px 180px 120px 44px;
  padding: 0 30px;
  border-bottom: .5px solid var(--line);
  align-items: center;
  min-height: 43px;
  transition: opacity .18s ease, background .18s ease, color .18s ease;
}

.p-ref {
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color .18s;
}
.p-year {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color .18s;
}
.p-name {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .02em;
  padding: 11px 0;
}
.p-type,
.p-state,
.p-city,
.p-region,
.p-country {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .18s;
}
.p-region { text-align: left; }
.p-country { text-align: right; }

/* Sur la ligne active, tout devient sombre sur fond crème */
.project-list-wrap:hover .project-row:hover .p-ref,
.project-list-wrap:hover .project-row:hover .p-year,
.project-list-wrap:hover .project-row:hover .p-type,
.project-list-wrap:hover .project-row:hover .p-state,
.project-list-wrap:hover .project-row:hover .p-city,
.project-list-wrap:hover .project-row:hover .p-region,
.project-list-wrap:hover .project-row:hover .p-country {
  color: var(--bg);
}

/* Image de survol visible uniquement sur la ligne active */
.project-list-wrap:hover .project-row:not(:hover) ~ #hover-img {
  opacity: 0;
}

/* ═══════════════════════════════════
   PAGE PROJET — DÉTAIL
═══════════════════════════════════ */
.page-project {
  padding: 100px 30px 90px;
  max-width: 920px;
}

.back {
  display: inline-block;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
  transition: color .2s;
}
.back:hover { color: var(--text); }

.proj-title {
  font-size: 42px;
  font-weight: 300;
  letter-spacing: -.01em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.proj-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-val {
  font-size: 16px;
  font-weight: 300;
}

/* galerie images */
.proj-gallery {
  display: grid;
  gap: 6px;
  margin-bottom: 50px;
}
.proj-gallery img {
  width: 100%;
  height: auto;
  display: block;
}
/* 2 images côte à côte si format paysage */
.proj-gallery.two-col {
  grid-template-columns: 1fr 1fr;
}
.proj-gallery.two-col img.full {
  grid-column: 1 / -1;
}

.proj-text {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  max-width: 580px;
  color: rgba(232,228,220,.78);
}
.proj-text + .proj-text { margin-top: 1em; }

/* ═══════════════════════════════════
   PAGE INFO
═══════════════════════════════════ */
.page-info {
  padding: 118px 30px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 52px;
  max-width: 960px;
}

.info-col h2 {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.info-col p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
}
.info-col a {
  border-bottom: .5px solid rgba(232,228,220,.25);
  transition: border-color .2s;
}
.info-col a:hover {
  border-color: rgba(232,228,220,.7);
}

/* ═══════════════════════════════════
   MOBILE
═══════════════════════════════════ */
@media (max-width: 680px) {
  body { cursor: auto; }
  #cursor { display: none; }
  #hover-img { display: none; }

  nav { padding: 16px 18px; }
  .nav-links { gap: 20px; }

  /* projets */
  .col-headers { display: none; }
  .project-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 12px 18px;
    gap: 2px 10px;
  }
  .p-ref    { display: none; }
  .p-year   { grid-column:2; grid-row:1; text-align:right; }
  .p-name   { grid-column:1; grid-row:1; padding:0; }
  .p-type   { grid-column:1; grid-row:2; font-size:12px; }
  .p-city   { grid-column:2; grid-row:2; text-align:right; font-size:12px; }
  .p-region { display: none; }
  .p-country{ display: none; }

  /* projet détail */
  .page-project { padding: 90px 18px 70px; }
  .proj-title { font-size: 30px; }
  .proj-meta { gap: 20px; }
  .proj-gallery.two-col { grid-template-columns: 1fr; }
  .proj-gallery.two-col img.full { grid-column: auto; }

  /* info */
  .page-info {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 100px 18px 60px;
  }

  /* home */
  .slide-caption { left: 18px; bottom: 18px; }
}
