* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #F6FDF8;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  min-height: 100vh;
}

body.is-loading {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #b40000;
  color: #F6FDF8;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: clamp(15px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.site-loader-name small {
  font-size: 0.42em;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
}

.site-loader-logo {
  font-size: 28px;
  letter-spacing: 2px;
  line-height: 1;
  animation: loader-pulse 1.1s ease-in-out infinite;
}

.site-loader-logo svg {
  width: 74px;
  height: auto;
  display: block;
}

.site-loader-logo .st0 {
  fill: #F6FDF8 !important;
}

.site-loader-line {
  width: 110px;
  height: 1px;
  overflow: hidden;
  background: rgba(246,253,248,0.3);
}

.site-loader-line span {
  display: block;
  width: 42%;
  height: 100%;
  background: #F6FDF8;
  animation: loader-progress 1.1s ease-in-out infinite;
}

@keyframes loader-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loader-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

/* Scrollbar styling */
html, body, .overlay, .hero-right {
  scrollbar-width: thin; 
  scrollbar-color: rgba(180, 0, 0, 0.236) rgba(246,253,248,0.3);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.overlay::-webkit-scrollbar,
.hero-right::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.overlay::-webkit-scrollbar-track,
.hero-right::-webkit-scrollbar-track {
  background: rgba(246,253,248,0.3);
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.overlay::-webkit-scrollbar-thumb,
.hero-right::-webkit-scrollbar-thumb {
  background: rgba(180,0,0,0.75);
  border-radius: 999px;
  border: 2px solid rgba(246,253,248,0.7);
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.overlay::-webkit-scrollbar-thumb:hover,
.hero-right::-webkit-scrollbar-thumb:hover {
  background: rgba(180,0,0,0.9);
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.171);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}
.h-name {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #b40000;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.h-name:hover {
  opacity: 0.7;
}
.h-logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.h-logo svg {
  height: 18px;
  width: auto;
}
.h-contact {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #b40000;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.project-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column: span 2;
  align-items: stretch;
}

.project-pair:nth-of-type(4n+3) .img-cell,
.project-pair:nth-of-type(4n+4) .img-cell {
  order: 2;
}

.project-pair:nth-of-type(4n+3) .txt-cell,
.project-pair:nth-of-type(4n+4) .txt-cell {
  order: 1;
}

.cell {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  min-height: 260px;
  background: #F6FDF8;
  transition: background 0.22s ease;
}

.img-cell { padding: 0; }

.txt-cell {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}

/* Titre projet */
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 12px;
}

.c-title {
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 900;
  line-height: 1.0;
  text-transform: uppercase;
  color: #b40000;
  letter-spacing: -0.03em;
  margin-top: 12px;
  align-self: flex-start;
  white-space: normal;
  overflow-wrap: break-word;
}

/* Description */
.c-desc {
  font-size: 14px;
  color: #b40000;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-top: auto;
  align-self: flex-start;
}

/* Voir le projet */
.c-voir {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: white;
  display: none;
  align-self: flex-end;
  margin-top: 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.c-voir:hover {
  opacity: 0.65;
}

.c-voir::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 7px solid white;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 10px;
  border-radius: 1px;
}

/* Point rouge */
.dot {
  width: 7px;
  height: 7px;
  background: #b40000;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Hover partagé par projet */
.txt-cell {
  position: relative;
  overflow: hidden;
}
.txt-cell::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #b40000;
  transition: width 0.28s ease, opacity 0.28s ease;
  opacity: 0;
  z-index: 0;
}
.txt-cell.slide-from-right::before {
  inset: 0 0 0 auto;
  left: auto;
  right: 0;
}
.txt-cell.is-hovered::before {
  width: 100%;
  opacity: 1;
}
.txt-cell > * {
  position: relative;
  z-index: 1;
}
.txt-cell.is-hovered .c-title { color: white; }
.txt-cell.is-hovered .c-desc { color: rgba(255,255,255,0.65); }
.txt-cell.is-hovered .c-voir { display: inline-block; }
.txt-cell.is-hovered .dot { background: white; }

/* Hover image */
.img-cell {
  overflow: hidden;
}
.img-cell img {
  transition: transform 0.25s ease;
  transform-origin: center center;
}
.img-cell.is-hovered img {
  transform: scale(1.1);
}

.img-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.img-overlay-title {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #b40000;
}

.about-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.about-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 64px 24px;
  max-width: 980px;
  margin: 0 auto;
}

.about-hero {
  display: grid;
  grid-template-columns: 200px minmax(380px, 470px);
  gap: 240px;
  align-items: start;
  min-height: 0;
  height: 100%;
}

.about-hero-box {
  width: 170px;
  height: 170px;
  margin: 0;
}

.about-hero-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 250px;
}

.about-copy p {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: #b40000;
  letter-spacing: -0.01em;
  max-width: 720px;
  margin: 0;
}

.about-copy p:first-child {
  margin-top: 0;
}

.about-cv {
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 2px;
  color: #b40000;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s ease;
}

.about-cv:hover {
  opacity: 0.65;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.about-cv::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 10px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid currentColor;
  border-radius: 1px;
}

.about-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-social a {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #b40000;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.about-social a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.about-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.about-social a[aria-label="Instagram"] svg:first-of-type {
  display: none;
}

@media (max-width: 900px) {
  .about-page {
    height: auto;
    overflow-y: auto;
    display: block;
  }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: auto;
  }
  .about-hero-box {
    justify-self: center;
  }
  .about-copy {
    padding-top: 0;
  }
  .about-main {
    width: auto;
    min-height: auto;
    padding: 48px 20px;
  }
}

/* ── OVERLAY PROJET ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #F6FDF8;
  z-index: 1000;
  overflow-y: auto;
}
.overlay.active { display: block; }

.ov-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #dde8e0;
  position: sticky;
  top: 0;
  background: #F6FDF8;
  z-index: 10;
}
.ov-title {
  font-size: clamp(22px, 4vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
  color: #b40000;
  line-height: 1;
  letter-spacing: -0.03em;
}
.close-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  cursor: pointer;
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  background: none;
  padding: 8px 14px;
  transition: all 0.2s;
}
.close-btn:hover { background: #1a1a1a; color: white; }

.ov-body { padding: 40px 24px; }
.ov-img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  margin-bottom: 32px;
  display: block;
}
.ov-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #b40000;
  max-width: 640px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* Mobile adjustments */
@media (max-width: 700px) {
  body {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 90px;
    scroll-behavior: smooth;
  }

  .grid {
    display: block;
  }
  .cell { min-height: 0; }
  .cell img { min-height: 200px; }

  /* Keep logo centered at top */
  .h-logo { position: sticky; top: 0; left: 50%; transform: translateX(-50%); z-index: 200; }

  /* Place name and contact as small fixed buttons at bottom corners */
  .h-name, .h-contact {
    position: fixed;
    bottom: 10px;
    z-index: 210;
    background: rgba(246,253,248,0.95);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
  }
  .h-name { left: 10px; }
  .h-contact { right: 10px; }

  /* Each project pair becomes a full-screen section */
  .project-pair {
    display: block;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: calc(100vh - 90px);
    height: calc(100vh - 90px);
    box-sizing: border-box;
  }
  .project-pair .img-cell {
    min-height: calc(100vh - 260px);
    height: calc(100vh - 260px);
    overflow: hidden;
  }
  .project-pair .txt-cell {
    position: static;
    background: rgba(246, 253, 248, 0.98);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }
  .project-pair .txt-cell > div {
    position: relative;
    z-index: 1;
  }

  /* Avoid content under fixed bottom items */
  body { padding-bottom: 64px; }
}

