:root{
  --text:#111;
  --muted:rgba(17,17,17,.72);
  --bg:#fff;
  --gap:18px;
  --max:1200px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
a:hover{opacity:.85}

.container{max-width:var(--max);margin:0 auto;padding:0 18px}

.topbar{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.topbar .inner{
  display:flex;align-items:center;justify-content:space-between;
  height:58px;
}
.brand{font-weight:860;letter-spacing:.2px}
.nav{display:flex;gap:18px;font-weight:650}
.nav a{color:var(--muted)}

.hero{min-height:100vh;position:relative;overflow:hidden}
.hero-bg{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;object-position:center;
  transform:scale(1.01);
}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.04) 35%, rgba(255,255,255,.10) 100%);
}
.hero-content{
  position:relative;
  height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:68px 18px 54px;
  max-width:var(--max);
  margin:0 auto;
}
.hero-title{
  font-size:clamp(44px, 6vw, 86px);
  line-height:1.02;
  margin:0;
  font-weight:900;
  letter-spacing:-.7px;
}
.hero-title.black{
  color:#111;
  text-shadow:0 10px 22px rgba(0,0,0,.14);
}
.hero-menu{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
  padding:0 6px;
}
.hero-menu a{
  font-size:clamp(20px, 2.2vw, 34px);
  font-weight:900;
  color:#111;
  text-shadow:0 10px 22px rgba(0,0,0,.12);
}

.section{padding:44px 0}
.h1{font-size:38px;margin:0 0 10px;font-weight:900}
.p{color:var(--muted);max-width:70ch;line-height:1.55}

.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:var(--gap);
}
@media (max-width:980px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:720px){
  .hero-content{padding:52px 18px 34px}
  .grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:420px){.grid{grid-template-columns:1fr}}

.card{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:#f6f6f6;
  box-shadow:0 10px 22px rgba(0,0,0,.06);
}
.thumb{
  width:100%;
  aspect-ratio: 4/5;
  object-fit:cover;
  display:block;
}
.card .label{
  position:absolute;left:12px;right:12px;bottom:12px;
  background:rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  border:1px solid rgba(0,0,0,.06);
  border-radius:14px;
  padding:10px 12px;
  font-weight:850;
}

.back{
  display:inline-flex;align-items:center;gap:10px;
  font-weight:800;color:var(--muted);
}
.back:before{content:"←";font-size:18px;line-height:1}

.footer{
  padding:28px 0 46px;
  color:rgba(17,17,17,.55);
  font-size:13px;
  border-top:1px solid rgba(0,0,0,.06);
}

/* Lightbox */
.lb{
  position:fixed;inset:0;z-index:9999;
  display:none;
  background:rgba(0,0,0,.86);
  align-items:center;justify-content:center;
  padding:24px;
}
.lb.open{display:flex}
.lb img{
  max-width:min(1100px, 92vw);
  max-height:88vh;
  border-radius:16px;
}
.lb .close{
  position:absolute;top:16px;right:16px;
  width:44px;height:44px;border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  color:#fff;font-size:22px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.lb .hint{
  position:absolute;left:16px;bottom:16px;
  color:rgba(255,255,255,.72);
  font-size:12px;
}

/* === OVERRIDE TEMPLATE GALERIES (header + titre) === */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand a{
  font-size:22px;
  font-weight:700;
  letter-spacing:0.2px;
}
.nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav a{
  font-size:16px;
  font-weight:600;
}

/* Titre de galerie centré, bouton retour à gauche */
.page-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.page-head h1{
  font-size:48px;
  line-height:1.05;
  margin:10px 0 0;
}
.page-head .back{
  align-self:flex-start;
  margin:10px 0 0;
  font-weight:600;
}

/* === HEADER GLOBAL === */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 0;
}

.brand-left a{
  font-size:26px;
  font-weight:800;
  letter-spacing:0.3px;
}

.nav-right{
  display:flex;
  gap:22px;
}

.nav-right a{
  font-size:16px;
  font-weight:600;
}

/* === TITRE GALERIE === */
.gallery-head{
  margin:40px 0 20px;
  text-align:center;
}

.gallery-head h1{
  font-size:52px;
  font-weight:800;
  margin:0;
}

.gallery-head .back{
  position:absolute;
  left:0;
  margin-top:8px;
  font-weight:600;
}


/* === FINAL: HEADER + MARGES + GRILLE (SOURCE OF TRUTH) === */

/* Contrainte globale: même largeur partout + respirations */
.topbar,
.page{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Header: gauche (Léa) / droite (menu) */
.topbar{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.brand-left a{
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: .2px !important;
  color: #111 !important;
}

/* Menu à droite */
.nav-right{
  display: flex !important;
  align-items: center !important;
  gap: 22px !important;
  margin-left: auto !important;
}

.nav-right a{
  color: #111 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
}

/* Titre des pages galerie */
.page-head.gallery-head{
  position: relative !important;
  text-align: center !important;
  margin: 22px 0 18px !important;
}

.page-head.gallery-head h1{
  font-size: 66px !important;
  font-weight: 900 !important;
  margin: 0 !important;
  color: #111 !important;
}

.page-head.gallery-head .back{
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-weight: 650 !important;
  color: #111 !important;
}

/* Grille: 4 colonnes desktop, responsive */
.grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

@media (max-width: 980px){ .grid{ grid-template-columns: repeat(3, minmax(0,1fr)) !important; } }
@media (max-width: 720px){ .grid{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; } }
@media (max-width: 420px){ .grid{ grid-template-columns: 1fr !important; } }

/* Vignettes: plus petites (~-30%) sans casser la grille */
.thumb{
  transform: scale(0.85) !important;
  transform-origin: center !important;
}

/* === HARD LOCK: si header utilise .inner, on aligne sur .inner === */
.topbar .inner{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
}
