/* ===========================
   NOTRESTEUPH.FR — Style principal
   =========================== */

:root {
  --pierre: #F5EFE4;
  --pierre-fonce: #E8D9C0;
  --caramel: #D4BC9A;
  --caramel-fonce: #B09070;
  --brun: #2e2416;
  --brun-moyen: #7a6850;
  --brun-clair: #a08060;
  --blanc: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--pierre);
  color: var(--brun);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
}

/* ===========================
   MENU HAMBURGER
   =========================== */

.menu-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 1000;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-btn span {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--blanc);
  transition: all 0.3s ease;
}

.menu-btn.actif span { background: var(--brun); }

.menu-panneau {
  position: fixed;
  top: 0;
  left: -100%;
  width: 340px;
  height: 100vh;
  background: var(--pierre-fonce);
  z-index: 999;
  padding: 80px 48px 48px;
  display: flex;
  flex-direction: column;
  transition: left 0.4s ease;
}

.menu-panneau.ouvert { left: 0; }

.menu-fermer {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--brun-moyen);
  font-family: 'Cormorant Garamond', serif;
}

.menu-liste {
  list-style: none;
  flex: 1;
}

.menu-liste li {
  border-bottom: 0.5px solid rgba(90,74,53,0.2);
}

.menu-liste a {
  display: block;
  padding: 18px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--brun);
  text-decoration: none;
  transition: color 0.2s;
}

.menu-liste a:hover { color: var(--brun-clair); font-style: italic; }

.menu-bas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
}

.menu-bas a {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brun-moyen);
  text-decoration: none;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46,36,22,0.3);
  z-index: 998;
}
.menu-overlay.visible { display: block; }

/* ===========================
   PAGE D'ACCUEIL
   =========================== */

.accueil {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(46,36,22,0.2) 0%, rgba(46,36,22,0.5) 100%);
}

.hero-texte {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--blanc);
}

.hero-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(72px, 12vw, 140px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.hero-titre em {
  font-style: italic;
  font-weight: 300;
}

.hero-sous {
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--blanc);
  font-size: 20px;
  opacity: 0.6;
  animation: bounce 2s infinite;
  z-index: 2;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===========================
   INTRO
   =========================== */

.intro {
  padding: 80px 24px;
  background: var(--pierre);
}

.intro-inner {
  max-width: 680px;
  margin: 0 auto;
}

.intro-texte {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.7;
  color: var(--brun);
  margin-bottom: 40px;
}

.intro-liens {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.intro-lien {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--brun);
  text-decoration: none;
  border-bottom: 1px solid var(--brun);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.intro-lien:hover { color: var(--brun-clair); border-color: var(--brun-clair); }
.intro-lien-secondaire { color: var(--brun-moyen); border-color: var(--brun-moyen); }

/* ===========================
   RUBRIQUES
   =========================== */

.rubriques {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border-top: 0.5px solid rgba(90,74,53,0.2);
}

.rubrique {
  padding: 40px 32px;
  border-right: 0.5px solid rgba(90,74,53,0.2);
  border-bottom: 0.5px solid rgba(90,74,53,0.2);
  text-decoration: none;
  color: var(--brun);
  transition: background 0.2s;
}

.rubrique:hover { background: var(--pierre-fonce); }

.rubrique-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brun-clair);
  margin-bottom: 12px;
}

.rubrique-nom {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 8px;
}

.rubrique-det {
  font-size: 13px;
  color: var(--brun-moyen);
}

/* ===========================
   PIED DE PAGE
   =========================== */

.pied {
  padding: 40px 32px;
  border-top: 0.5px solid rgba(90,74,53,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--brun-moyen);
}

.pied a {
  color: var(--brun-moyen);
  text-decoration: none;
  border-bottom: 0.5px solid var(--brun-moyen);
}

/* ===========================
   PAGES INTÉRIEURES — Header
   =========================== */

.page-header {
  padding: 80px 32px 40px;
  border-bottom: 0.5px solid rgba(90,74,53,0.2);
  max-width: 800px;
}

.page-retour {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brun-moyen);
  text-decoration: none;
  margin-bottom: 24px;
}

.page-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  line-height: 1;
}

.page-sous {
  font-size: 15px;
  font-style: italic;
  color: var(--brun-moyen);
  margin-top: 8px;
  font-family: 'Cormorant Garamond', serif;
}

/* ===========================
   FICHES MAISONS
   =========================== */

.fiche-hero {
  width: 100%;
  height: 300px;
  background: var(--caramel);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

.fiche-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fiche-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46,36,22,0.65) 0%, transparent 60%);
}

.fiche-hero-texte {
  position: relative;
  z-index: 2;
  padding: 28px 32px;
  color: var(--blanc);
}

.fiche-rue {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 6px;
}

.fiche-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}

.fiche-proprio {
  font-size: 16px;
  font-style: italic;
  opacity: 0.82;
  margin-top: 4px;
  font-family: 'Cormorant Garamond', serif;
}

.fiche-corps {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 32px;
}

.fiche-meta {
  display: flex;
  border-top: 0.5px solid rgba(90,74,53,0.25);
  border-bottom: 0.5px solid rgba(90,74,53,0.25);
  margin-bottom: 40px;
}

.fiche-meta-item {
  flex: 1;
  padding: 16px 0;
  text-align: center;
  border-right: 0.5px solid rgba(90,74,53,0.2);
}
.fiche-meta-item:last-child { border-right: none; }

.fiche-meta-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brun-moyen);
  display: block;
  margin-bottom: 4px;
}

.fiche-meta-val {
  font-size: 15px;
  color: var(--brun);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.4;
}

.fiche-section {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--brun-moyen);
  margin-bottom: 14px;
}

.fiche-histoire {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.8;
  color: var(--brun);
  margin-bottom: 40px;
}

.fiche-histoire em { font-style: italic; color: #6a5440; }

.a-completer {
  font-size: 14px;
  font-style: italic;
  color: var(--brun-clair);
  border: 0.5px dashed var(--caramel);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 32px;
  font-family: 'Cormorant Garamond', serif;
}

/* ===========================
   ARBRE GÉNÉALOGIQUE
   =========================== */

.arbre-section {
  border-top: 0.5px solid rgba(90,74,53,0.2);
  padding-top: 32px;
}

.arbre-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.arbre-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
}

.arbre-lien {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brun-clair);
  border-bottom: 0.5px solid var(--brun-clair);
  cursor: pointer;
  padding-bottom: 1px;
  display: inline-block;
  text-decoration: none;
}

.c-v {
  width: 1px;
  background: var(--caramel);
  margin: 0 auto;
  height: 18px;
}

.noeud-racine {
  background: var(--caramel);
  border: 1px solid var(--caramel-fonce);
  border-radius: 4px;
  padding: 8px 20px;
  text-align: center;
  display: inline-block;
}

.noeud { border: 0.5px solid var(--caramel); border-radius: 4px; padding: 6px 14px; text-align: center; }
.noeud.beige { background: #F5EFE4; }
.noeud.sable { background: #EDE4D4; }
.noeud.caramel { background: var(--caramel); border-color: var(--caramel-fonce); border-width: 1px; }
.noeud.decede { opacity: 0.45; }

.noeud-nom { font-size: 13px; color: var(--brun); display: block; font-family: 'Cormorant Garamond', serif; }
.noeud-det { font-size: 11px; font-style: italic; color: var(--brun-moyen); display: block; margin-top: 1px; }

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 600px) {
  .rubriques { grid-template-columns: 1fr; }
  .menu-panneau { width: 100%; }
  .fiche-corps { padding: 24px 16px; }
  .pied { flex-direction: column; gap: 12px; text-align: center; }
}

/* ===========================
   RESPONSIVE COMPLET
   =========================== */

@media (max-width: 768px) {
  .menu-panneau { width: 100%; }
  .hero-titre { font-size: clamp(56px, 16vw, 100px); }
  .hero-sous { font-size: 11px; letter-spacing: 0.2em; }
  .intro { padding: 48px 20px; }
  .intro-texte { font-size: 18px; }
  .rubriques { grid-template-columns: 1fr 1fr; }
  .rubrique { padding: 24px 20px; }
  .rubrique-nom { font-size: 22px; }
  .page-header { padding: 60px 20px 28px; }
  .panneau { width: 100vw !important; }
  .maisons-liste { gap: 8px; }
  .maison-vignette { width: calc(50% - 4px); }
  .rues { padding: 24px 20px; }
  .rue-titre { font-size: 24px; }
  .genea-page { padding: 20px 16px; overflow-x: auto; }
  .rangee-enfants { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
  .boite { min-width: 110px; max-width: 140px; padding: 8px 10px; }
  .boite-nom { font-size: 14px; }
  .pied { flex-direction: column; gap: 12px; text-align: center; padding: 24px 20px; }
}

@media (max-width: 480px) {
  .rubriques { grid-template-columns: 1fr; }
  .maison-vignette { width: 100%; }
  .page-header { padding: 50px 16px 24px; }
  .page-titre { font-size: clamp(32px, 8vw, 48px); }
  .point-label { display: none; }
  .boite { min-width: 95px; padding: 6px 8px; }
  .boite-nom { font-size: 13px; }
  .boite-epoux { font-size: 11px; }
  .panneau-meta { flex-direction: column; }
  .panneau-meta-item { border-right: none; border-bottom: 0.5px solid rgba(90,74,53,0.15); }
  .panneau-meta-item:last-child { border-bottom: none; }
}
