/* ============================================================
   GILLES JONEMANN — layout.css
   Police : Raleway (alignée sur la typo Wix d'origine)
   Couleurs : #2E2E2E / #FFFFFF / #7B9ED9 / #F0EDE4
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@200;300;400;500;600&family=Wix+Madefor+Text:wght@400;500;600;700&display=swap');

:root {
  --col-dark:    #2E2E2E;
  --col-light:   #FFFFFF;
  --col-accent1: #7B9ED9;
  --col-accent2: #F0EDE4;
  --col-text:    #2E2E2E;
  --col-muted:   #666;
  --header-h:    88px;
  --header-real-h: 88px;
  --logo-w:      330px;   /* image 750x200 (ratio 3.75) ramenée à 88px de haut : marge blanche + bloc noir, proportion d'origine */
  --content-gap: 50px;    /* marge haute du contenu = header + cette valeur (modifiable pour tout le site) */
  --panel-max:   820px;
  --vignette-ratio: 1.21;
  --font-title:  'Raleway', Arial, sans-serif;
  --font-body:   'Wix Madefor Text', 'Segoe UI', Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--col-text);
  min-height: 100vh;
  background: #888;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
p, a, li, span, div, button, input, textarea, select, label, td, th, blockquote, figcaption {
  font-family: inherit;
}

/* ── FOND PLEIN PAGE ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.page-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── BASCULE LANGUE DANS LE HEADER (centrée sur le blanc du logo) ── */
.header-lang {
  position: absolute;
  top: calc(var(--header-h) / 2);
  left: 55px;                 /* centre de la zone blanche (~110px) du logo */
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: 0.08em;
  z-index: 5;
}
.header-lang a {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--col-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.header-lang a:hover { color: var(--col-dark); }
.header-lang a.lang-active { color: var(--col-dark); border-bottom-color: var(--col-muted); }
.header-lang .lang-sep { color: #bbb; font-size: 0.76rem; }

/* ── HEADER ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  min-height: var(--header-h);
  background: #fff;
  overflow: visible;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  text-decoration: none;
  min-height: var(--header-h);
  width: auto;
  background: #fff;
  padding: 0;
  margin: 0;
  overflow: visible;
}
.header-logo .logo-img {
  height: var(--header-h) !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  object-position: left center;
  margin: 0;
  padding: 0;
}

/* Nav horizontale */
#header nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  align-content: center;
  background: rgba(255,255,255,0.95);
  min-height: var(--header-h);
  padding: 8px 0 8px 1.5rem;
  row-gap: 6px;
}

/* Tous les liens du header */
#header nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--col-dark);
  text-decoration: none;
  padding: 0 1.2rem;
  padding-bottom: 4px;
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
#header nav a:hover { color: #000; border-bottom-color: var(--col-accent1); }
#header nav a.active { color: var(--col-accent1); font-weight: 500; border-bottom-color: var(--col-accent1); }

/* Dropdown Bio - avec wrapper */
.nav-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown {
  display: contents;
}

/* Le lien Bio hérite des mêmes styles que les autres liens */
.nav-dropdown > a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--col-dark);
  text-decoration: none;
  padding: 0 1.2rem;
  padding-bottom: 4px;
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-dropdown > a:hover { color: #000; border-bottom-color: var(--col-accent1); }
.nav-dropdown > a.active { color: var(--col-accent1); font-weight: 500; border-bottom-color: var(--col-accent1); }

/* Le menu dropdown */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--col-light);
  min-width: 230px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 9999;
  padding: 1rem 0;
  margin-top: 0;
}

/* Pseudo-élément pour faire le pont entre le wrapper et le menu */
.nav-dropdown-wrapper::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 9998;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.8rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--col-muted);
  line-height: 1.6;
  border-bottom: none;
  white-space: nowrap;
}
.nav-dropdown-menu a:last-child {
  margin-bottom: 0;
}
.nav-dropdown-menu a:hover { color: var(--col-dark); background: var(--col-accent2); }
.nav-dropdown-menu a.active { color: var(--col-dark); font-weight: 500; }

/* ── LIEN BIO MOBILE (caché sur desktop) ── */
.mobile-bio-link {
  display: none !important;    /* ← AJOUTER !important pour être sûr */
}

/* ── CONTENU PRINCIPAL ── */
#page-wrap {
  position: relative;
  z-index: 10;
  flex: 1 0 auto;
  min-height: calc(100vh - var(--header-real-h));
  padding-top: calc(var(--header-real-h) + var(--content-gap));
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: var(--logo-w);
}

.content-panel {
  background: var(--col-light);
  min-height: calc(100vh - var(--header-h));
  width: 100%;
  max-width: var(--panel-max);
  padding: 2.5rem 3.5rem 4rem;
}

/* ── TITRES ── */
.content-panel h1 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--col-dark);
  margin-bottom: 2rem;
}

/* ── SECTIONS CHRONOLOGIQUES ── */
.chrono-block { margin-bottom: 1.5rem; }
.chrono-block .year {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--col-dark);
  margin-bottom: 0.3rem;
}
.chrono-block ul { list-style: disc; padding-left: 1.4rem; }
.chrono-block li {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  color: #555;
  margin-bottom: 0.15rem;
}

/* ── TEXTE COURANT ── */
.content-panel p {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.85;
  color: #555;
  margin-bottom: 1.1rem;
}
.content-panel a {
  color: var(--col-dark);
  border-bottom: 1px solid #ccc;
  text-decoration: none;
  transition: border-color 0.2s;
}
.content-panel a:hover { border-bottom-color: var(--col-dark); }

/* ── FOOTER PAGE ── */
.page-footer {
  position: relative;
  z-index: 20;
  width: 100%;
  background: var(--col-light);
  color: rgba(0,0,0,0.5);
  font-family: var(--font-body);
  font-size: 1.0rem;
  font-weight: 300;
  letter-spacing: 0.0em;
  text-align: center;
  padding: 0.9rem 1.2rem;
}
.page-footer a {
  color: rgba(0,0,0,0.6);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-footer a:hover { color: rgba(0,0,0,0.9); }

/* ── BURGER MOBILE ── */
#burger {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: var(--header-h);
  z-index: 300;
  background: var(--col-dark);
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#burger span { display: block; width: 22px; height: 1px; background: #ccc; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --logo-w: 0px; --header-h: 56px; }

  .header-logo {
    width: auto;
    padding: 0;
    flex-shrink: 0;
    height: var(--header-h);
  }
  .header-logo .logo-img {
    height: 100% !important;
    width: auto !important;
    object-fit: cover;
    object-position: left center;
  }

  #burger { 
    display: flex; 
    width: 56px; 
    height: 56px;
    margin-left: auto;
  }

  #header nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--col-light);
    padding: 0.5rem 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    height: auto;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 200;
    align-items: flex-start;
    padding-bottom: 0;
  }
  #header nav.open { display: flex; }
  #header nav a { 
    line-height: 2.2; 
    padding: 0 1.2rem; 
    width: 100%; 
    border-bottom: none;
    padding-bottom: 0;
  }
  #header nav a.active { border-bottom: none; }

  .nav-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
    position: static;
  }
  .nav-dropdown { 
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    width: 100%;
    height: auto;
  }
  .nav-dropdown > a {
    height: auto;
    padding: 0 1.2rem;
    line-height: 2.2;
    border-bottom: none;
    display: block;
    width: 100%;
  }
  .nav-dropdown-menu {
    display: none !important;
    position: static;
    box-shadow: none;
    background: var(--col-accent2);
    padding: 0; 
    width: 100%;
    min-width: unset;
    transform: none;
    left: auto;
    top: auto;
    z-index: auto;
  }
  .nav-dropdown-menu.open {
    display: block !important;
  }
  .nav-dropdown-menu a { 
    padding: 0.5rem 0 0.5rem 2.2rem; 
    line-height: 2;
  }

  /* ── AFFICHER LE LIEN BIO MOBILE ── */
  .mobile-bio-link {
    display: block !important;
  }

  .header-lang {
    left: auto;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
  }

  #page-wrap { padding-left: 0; }
  .content-panel {
    padding: 1.5rem 1.2rem 3rem;
    min-height: auto;
    max-width: 100%;
  }
  .content-panel h1 { font-size: 1.1rem; letter-spacing: 0.18em; margin-bottom: 1.2rem; }

  .page-bg { position: absolute; }

  .page-footer {
    font-size: 0.62rem;
    padding: 0.8rem 1rem;
  }
}

/* (plus de bascule burger intermédiaire : la nav wrappe sur 2 lignes en desktop) */
/* ============================================================
   GALERIES (bijoux / objets) — grille + lightbox
   Mutualisé depuis bijoux.php / objets.php
   ============================================================ */

#gallery-wrap {
  margin-top: var(--header-real-h);
  flex: 1 0 auto;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  line-height: 0;
  font-size: 0;
}

.gallery-item {
  position: relative;
  width: 25%;
  height: 0;
  padding-bottom: calc(25% / var(--vignette-ratio));
  overflow: hidden;
  cursor: pointer;
  background: #f4f4f4;
  font-size: 0;
}
.gallery-item img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(0.85);
}

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(20,18,15,0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }
.gallery-caption .cap-en { display: block; font-style: italic; font-size: 0.62rem; opacity: 0.7; }

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20,18,15,0.95);
  z-index: 500;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 88vw; max-height: 78vh; object-fit: contain; display: block; }

#lightbox-info { margin-top: 1.2rem; text-align: center; color: #fff; padding: 0 2rem; max-width: 700px; }
#lightbox-info .lb-title {
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
#lightbox-info .lb-title-en {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
  letter-spacing: 0.08em;
}
#lightbox-info .lb-desc {
  font-size: 1rem;
  color: #fff;
  margin-top: 0.4rem;
  letter-spacing: 0.06em;
}

#lb-close {
  position: fixed; top: 1.5rem; right: 2rem;
  color: #fff; font-size: 2rem; cursor: pointer;
  background: none; border: none; opacity: 0.5;
  transition: opacity 0.2s;
}
#lb-close:hover { opacity: 1; }
#lb-prev, #lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 2.5rem; cursor: pointer;
  background: none; border: none; opacity: 0.35;
  transition: opacity 0.2s; padding: 1rem;
}
#lb-prev:hover, #lb-next:hover { opacity: 1; }
#lb-prev { left: 0.5rem; } #lb-next { right: 0.5rem; }

/* ── DEBUG : vignette manquante ── */
.gallery-item.missing { outline: 4px solid red; outline-offset: -2px; }
.gallery-item.missing::before {
  content: "MANQUANTE #" attr(data-index);
  position: absolute; top: 0; left: 0; z-index: 10;
  background: red; color: #fff; font-size: 11px; font-weight: bold;
  padding: 3px 8px; font-family: Arial, sans-serif;
}

@media (max-width: 900px) {
  .gallery-item { width: 50%; padding-bottom: calc(50% / var(--vignette-ratio)); }
}

/* ============================================================
   BASCULE DE LANGUE FR | EN
   ============================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0 1.2rem;
  white-space: nowrap;
}
.lang-switch a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--col-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.lang-switch a:hover { color: var(--col-dark); }
.lang-switch a.lang-active {
  color: var(--col-accent1);
  font-weight: 600;
  border-bottom-color: var(--col-accent1);
}
.lang-switch .lang-sep { color: #bbb; font-size: 0.8rem; }

@media (max-width: 768px) {
  .lang-switch {
    margin-left: 1.2rem;
    padding: 0.4rem 0;
    width: 100%;
    border-top: 1px solid #e5e2da;
    margin-top: 0.3rem;
  }
}
