/* =====================================================================
   Coco sous les cocotiers — portfolio photographique
   Esthétique minimaliste : fond blanc, sans-serif, galerie pleine largeur.
   ===================================================================== */

:root {
  --bg:     #111111;
  --ink:    #ededed;
  --muted:  #8d8d8d;
  --line:   rgba(255,255,255,0.12);
  --gap:    26px;                     /* gouttière de la galerie (large, façon Emma) */
  --sans:   "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--ink); color: var(--bg); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* =====================================================================
   En-tête : wordmark centré + navigation discrète
   ===================================================================== */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(17,17,17,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px clamp(20px, 3vw, 36px) 18px;
  text-align: left;
}
.wordmark {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: clamp(0.95rem, 2.2vw, 1.4rem);
  line-height: 1.2;
}
.nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
}
.nav a {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--muted);
  position: relative;
  padding: 3px 0;
  transition: color 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* bouton hamburger (mobile) */
.burger {
  display: none;
  position: absolute; right: 20px; top: 24px;
  width: 30px; height: 22px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.burger span {
  display: block; width: 100%; height: 1px; background: var(--ink);
  margin: 6px 0; transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
body.menu-open .burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* =====================================================================
   Menu plein écran (mobile)
   ===================================================================== */
.menu-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
body.menu-open .menu-overlay { opacity: 1; pointer-events: auto; }
.menu-overlay nav { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.menu-overlay a {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.1rem;
}

/* =====================================================================
   Galerie — masonry pleine largeur, gouttières minimes
   ===================================================================== */
.gallery {
  column-count: 3;
  column-gap: var(--gap);
  padding: var(--gap);
}
@media (max-width: 1000px) { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; } }

.item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 var(--gap);
  position: relative;
  cursor: zoom-in;
  background: #1c1c1c;
  opacity: 0;
}
.item.loaded { opacity: 1; transition: opacity 1s var(--ease); }
.item img {
  width: 100%; height: auto; display: block;
  transition: opacity 0.6s var(--ease);
}
.item::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.4s var(--ease);
}
.item:hover::after { background: rgba(0,0,0,0.05); }

/* =====================================================================
   À propos
   ===================================================================== */
.about {
  padding: clamp(70px, 12vw, 150px) 24px;
  border-top: 1px solid var(--line);
}
.about-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.about-inner p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 300;
  line-height: 1.75;
  margin: 0 0 1.2em;
}
.about-inner p:last-child { margin-bottom: 0; }

/* =====================================================================
   Pied de page / contact
   ===================================================================== */
.site-foot {
  padding: clamp(60px, 10vw, 120px) 24px clamp(40px, 7vw, 70px);
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-foot .mail {
  display: inline-block;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  position: relative;
}
.site-foot .mail::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.site-foot .mail:hover::after { transform: scaleX(1); transform-origin: left; }
.foot-meta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  color: var(--muted);
}
.foot-meta a:hover { color: var(--ink); }
.foot-meta .sep { opacity: 0.5; }

/* =====================================================================
   Lightbox
   ===================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.97);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 70px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 86vh; object-fit: contain;
  opacity: 0; transform: scale(0.99);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.lightbox.open img { opacity: 1; transform: none; }
.lightbox .lb-cap {
  position: absolute; bottom: clamp(18px, 4vw, 40px); left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.62rem;
}
.lightbox button {
  position: absolute; background: none; border: none; cursor: pointer;
  color: var(--ink); transition: opacity 0.3s var(--ease); opacity: 0.6;
}
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: clamp(16px,4vw,34px); right: clamp(18px,4vw,40px); font-size: 1.1rem; }
.lightbox .lb-nav { top: 50%; transform: translateY(-50%); font-size: 2.2rem; padding: 16px; }
.lightbox .lb-prev { left: clamp(4px,2vw,26px); }
.lightbox .lb-next { right: clamp(4px,2vw,26px); }

/* =====================================================================
   États : chargement / vide
   ===================================================================== */
.loading, .empty {
  column-span: all;
  padding: clamp(60px, 14vw, 160px) 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 300;
}
.loading .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted); margin: 0 3px;
  animation: blink 1.3s var(--ease) infinite;
}
.loading .dot:nth-child(2) { animation-delay: 0.2s; }
.loading .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,100%{opacity:0.2;} 50%{opacity:1;} }

/* =====================================================================
   Responsive : on bascule le menu en hamburger
   ===================================================================== */
@media (max-width: 680px) {
  .nav { display: none; }
  .burger { display: block; }
  .site-head { flex-direction: row; justify-content: flex-start; align-items: center; padding: 20px 24px; }
  .wordmark { font-size: 0.9rem; letter-spacing: 0.24em; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .item { opacity: 1; }
  html { scroll-behavior: auto; }
}
