/* Ginellames.fr — hommage à Bernard Ginelli, tailleur de silex
   Design system : tons pierre / silex / ocre, typographie lisible, mobile-first */

:root {
  --stone-950: #211c17;
  --stone-900: #2b2420;
  --stone-800: #3d342c;
  --stone-600: #6b5c4e;
  --stone-400: #a3907c;
  --stone-200: #ded2c1;
  --stone-100: #f2ebe0;
  --paper: #faf6ef;
  --ochre: #b3652b;
  --ochre-dark: #8f4f20;
  --flint: #4a5a54;
  --flint-dark: #33403b;
  --max-width: 1180px;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(33, 28, 23, 0.12);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--stone-900);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--stone-950);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 0.2em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--ochre-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--stone-950);
  color: var(--stone-100);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--stone-100);
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ochre), var(--ochre-dark));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: bold;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--stone-600);
  border-radius: var(--radius);
  color: var(--stone-100);
  width: 42px; height: 38px;
  font-size: 1.3rem;
  cursor: pointer;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--stone-200);
  font-size: 0.93rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  display: block;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--stone-950);
    border-top: 1px solid var(--stone-800);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 0.6rem 1.5rem 1.2rem; gap: 0; }
  .main-nav a { padding: 0.65rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--stone-900), var(--stone-950));
  color: var(--stone-100);
  padding: 3.5rem 0 3rem;
}
.hero.compact { padding: 2.6rem 0 2.2rem; }
.hero h1 { color: #fff; }
.in-memoriam {
  font-family: var(--serif);
  font-style: italic;
  color: var(--stone-400);
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin: -0.2em 0 1.1em;
}
.hero p.lede { font-size: 1.15rem; color: var(--stone-200); max-width: 60ch; }
.signature {
  font-family: var(--serif);
  font-style: italic;
  color: var(--stone-200);
  font-size: 0.95rem;
  margin-top: 1.1em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--ochre);
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: inline-block;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--stone-400);
}
.breadcrumb a { color: var(--stone-200); }

/* ---------- Sections / cards ---------- */
main { display: block; }
.section { padding: 3rem 0; }
.section.alt { background: var(--stone-100); }
.section-title { text-align: left; margin-bottom: 1.6rem; }
.section-title p { color: var(--stone-600); max-width: 70ch; }

.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
a.card { color: inherit; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(33,28,23,0.18); text-decoration: none; }
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body h3 { margin-bottom: 0.3rem; font-size: 1.05rem; }
.card-body p { color: var(--stone-600); font-size: 0.92rem; margin: 0; }

/* Photo gallery grid */
.gallery {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery figure { margin: 0; }
.gallery img {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: var(--shadow);
}
.gallery figcaption {
  font-size: 0.82rem;
  color: var(--stone-600);
  margin-top: 0.35rem;
}

/* ---------- Content blocks ---------- */
.content-block { max-width: 74ch; }
.content-block + .content-block { margin-top: 2.2rem; }
.figure-side {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 2rem;
  align-items: start;
}
.figure-side img { border-radius: var(--radius); box-shadow: var(--shadow); }
.figure-side.reverse { grid-template-columns: 1fr minmax(220px, 320px); }
.figure-side.reverse img { order: 2; }
@media (max-width: 720px) {
  .figure-side, .figure-side.reverse { grid-template-columns: 1fr; }
  .figure-side img, .figure-side.reverse img { order: 0; max-width: 340px; margin: 0 auto; }
}

blockquote {
  border-left: 3px solid var(--ochre);
  margin: 1.4rem 0;
  padding: 0.3rem 0 0.3rem 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--stone-800);
}
blockquote cite { display: block; font-style: normal; font-size: 0.85rem; color: var(--stone-600); margin-top: 0.4rem; }

.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li { background: var(--stone-100); border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.85rem; color: var(--stone-800); }

.info-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.info-table th, .info-table td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--stone-200); vertical-align: top; }
.info-table th { width: 34%; color: var(--stone-600); font-weight: 600; font-size: 0.92rem; }

.callout {
  background: var(--stone-100);
  border-left: 3px solid var(--flint);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.94rem;
}
.callout strong { color: var(--flint-dark); }

.btn {
  display: inline-block;
  background: var(--ochre);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}
.btn:hover { background: var(--ochre-dark); color: #fff; text-decoration: none; }
.btn.outline { background: transparent; border: 1px solid var(--stone-200); color: var(--stone-100); }
.btn.outline:hover { background: rgba(255,255,255,0.08); }

.stub {
  border: 1px dashed var(--stone-400);
  border-radius: var(--radius);
  padding: 1.4rem;
  color: var(--stone-600);
  font-style: italic;
}

/* Step sequence (chaines operatoires) */
.steps { display: grid; gap: 1.6rem; }
.step { display: grid; grid-template-columns: 120px 1fr; gap: 1.2rem; align-items: start; }
.step img { border-radius: var(--radius); box-shadow: var(--shadow); }
.step .step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--ochre); }
@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; }
}

/* Carousel (home) */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: var(--stone-800);
}
.carousel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.carousel img.active { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 16, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.5rem;
  background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}
.lightbox figcaption { color: var(--stone-200); text-align: center; margin-top: 0.8rem; font-size: 0.9rem; }

/* Footer */
.site-footer {
  background: var(--stone-950);
  color: var(--stone-400);
  padding: 2.4rem 0;
  margin-top: 3rem;
  font-size: 0.88rem;
}
.site-footer a { color: var(--stone-200); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-note { max-width: 46ch; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
