/* ============================================
   PRETTYPHOTOMAGAZINE — CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Degular+Display:wght@400;700&display=swap');

:root {
  --blue:  #0048FE;
  --white: #FFFFFF;
  --black: #1B1B1B;
  --font:  'Degular Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  cursor: none;
}

a, button, input, select, textarea, [role="button"] {
  cursor: none;
}

/* ---- LAYOUT ---- */
.layout {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* ---- SIDEBAR PROJETS ---- */
.project-list {
  display: flex;
  align-items: center;
  padding: 100px 32px 60px;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.project-list ul { list-style: none; width: 100%; }
.project-list li { margin-bottom: 2px; }

.project-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  padding: 6px 0;
}

.project-link .num {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--white);
  min-width: 18px;
  transition: color 0.2s;
}

.project-link .title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
  line-height: 1.3;
  transition: color 0.2s;
}

.project-link:hover .num,
.project-link:hover .title,
.project-link.active .num,
.project-link.active .title {
  color: var(--blue);
}

/* ---- GALERIE MASONRY ---- */
.gallery {
  height: 100vh;
  overflow-y: scroll;
  padding: 80px 20px 60px 20px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }

.masonry-grid {
  columns: 3;
  column-gap: 12px;
}

.grid-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 12px;
  overflow: hidden;
}

.grid-item img {
  width: 100%;
  display: block;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Dimming au hover d'un projet */
.masonry-grid.dimmed .grid-item img {
  opacity: 0.12;
}
.masonry-grid.dimmed .grid-item.highlight img {
  opacity: 1;
}

.grid-item:hover img {
  transform: scale(1.02);
}

.grid-video video {
  width: 100%;
  display: block;
}

/* Page vidéos */
.videos-grid {
  columns: 2;
}

.video-caption {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 8px 0 4px;
}

/* Lien dans H2 */
.header-text h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.header-text h2 a:hover {
  color: var(--blue);
}

/* ---- FADE IN ---- */
body {
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ---- CURSEUR PERSONNALISÉ ---- */
#cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: width 0.15s ease, height 0.15s ease, opacity 0.2s ease;
}

#cursor.hover {
  width: 32px;
  height: 32px;
}

/* ---- HEADER ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px 0;
  pointer-events: none;
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  pointer-events: auto;
}

.header-mascot {
  height: 42px;
  width: 42px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.header-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--white);
  margin: 0;
}

.header-text h2 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  margin: 0;
  line-height: 1.2;
}

.header-text h3 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--blue);
  margin: 0;
  line-height: 1.2;
}


.header-right {
  display: flex;
  gap: 28px;
  pointer-events: auto;
  align-self: center;
  align-items: center;
  height: 42px;
}

.header-right a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.header-right a:hover {
  color: var(--blue);
}

/* ---- FOOTER ---- */
footer {
  position: fixed;
  bottom: 28px;
  left: 36px;
  right: 36px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.footer-email {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
  pointer-events: auto;
}

.footer-email:hover {
  color: var(--blue);
}

.scroll-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: none;
  pointer-events: auto;
  transition: background 0.2s;
}

.scroll-top:hover {
  background: var(--blue);
}

.scroll-top svg {
  width: 16px;
  height: 16px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  transition: stroke 0.2s;
}

.scroll-top:hover svg {
  stroke: var(--white);
}

/* ============================================
   PAGES PROJET
   ============================================ */

body.project-page {
  overflow: auto;
  cursor: none;
}

.project-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 36px 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.project-header .header-left {
  pointer-events: auto;
}

.project-header .header-left a {
  text-decoration: none;
  color: var(--blue);
}

.project-header .header-left a:visited {
  color: var(--blue);
}

.brand-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--blue);
  margin-top: 2px;
}

.project-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  pointer-events: auto;
}

.project-nav a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.project-nav a:hover {
  color: var(--blue);
}

.back-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s !important;
}

.back-link::before {
  content: '←';
  font-size: 14px;
}

.back-link:hover {
  color: var(--white) !important;
}

/* Hero projet */
.project-hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.project-hero-title {
  position: absolute;
  bottom: 48px;
  left: 36px;
  right: 36px;
}

.project-hero-title h1 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}

/* Grille photos projet */
.project-grid {
  padding: 80px 36px;
  columns: 2;
  column-gap: 16px;
}

.project-grid img {
  width: 100%;
  display: block;
  margin-bottom: 16px;
  break-inside: avoid;
}

/* Label categorie */
.project-meta {
  padding: 0 36px 60px;
  display: flex;
  gap: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
}

.project-meta span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.project-meta strong {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 700;
}

/* ============================================
   PAGE ABOUT
   ============================================ */

body.about-page {
  overflow: auto;
  cursor: none;
}

.about-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.about-photo {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding: 120px 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content h2 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  line-height: 1.1;
}

.about-content p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
  max-width: 460px;
}

.about-content .contact-link {
  align-self: flex-start;
  margin-top: 32px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.about-content .contact-link:hover {
  color: var(--blue);
}


/* ============================================
   BURGER + MOBILE MENU — caché sur desktop
   ============================================ */
.burger       { display: none; }
.mobile-menu  { display: none; }

/* ============================================
   MOBILE ≤ 768px
   ============================================ */
@media (max-width: 768px) {

  /* --- Reset body scroll --- */
  html, body { overflow: auto; height: auto; }
  body.no-scroll { overflow: hidden; }

  /* --- Layout : une seule colonne --- */
  .layout {
    position: static;
    display: block;
    grid-template-columns: unset;
  }

  /* --- Cacher la sidebar desktop --- */
  .project-list { display: none; }

  /* --- Galerie pleine largeur --- */
  .gallery {
    height: auto;
    overflow: visible;
    padding: 72px 10px 80px;
  }

  .masonry-grid { columns: 2; column-gap: 8px; }
  .grid-item    { margin-bottom: 8px; }

  /* --- Header mobile --- */
  header { padding: 18px 18px 0; }
  .header-right { display: none; }
  .header-mascot { height: 32px; width: 32px; }
  .header-text h1 { font-size: 12px; }
  .header-text h2 { font-size: 9px; }
  .header-text h3 { font-size: 9px; }

  /* --- Footer mobile --- */
  footer { bottom: 18px; left: 18px; right: 18px; }
  .footer-email { font-size: 10px; }

  /* --- Burger button --- */
  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    padding: 4px;
    cursor: none;
    pointer-events: auto;
    flex-shrink: 0;
  }
  .burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* --- Menu overlay : caché par défaut, visible si .open --- */
  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 150;
    padding: 96px 32px 60px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
    pointer-events: none;
  }
  .mobile-menu.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0s;
    pointer-events: auto;
  }

  /* --- Liens nav (About, Instagram) --- */
  .m-nav {
    display: block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
  }
  .m-nav:hover { color: var(--blue); }

  .m-divider { height: 28px; }

  /* --- Liens projets --- */
  .m-project {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
  }
  .m-project span {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.3);
    min-width: 18px;
  }
  .m-project:hover { color: var(--blue); }
}

/* --- Bouton fermer menu mobile --- */
.m-close { display: none; }

@media (max-width: 768px) {
  .m-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 22px;
    cursor: none;
    pointer-events: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
  }
  .m-close:hover { opacity: 1; }
  .mobile-menu { position: fixed; }
}
