:root {
  --red:   #7b1a1a;
  --blue:  #1a3557;
  --gold:  #c8a84b;
  --cream: #f7f3ee;
  --light: #edead3;  /* warm parchment */
  --dark:  #1c1c1c;
  --gray:  #6b6b6b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--dark);
  background: var(--cream);
  line-height: 1.75;
}

/* ─── Navigation ─────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--blue);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: .04em;
}
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }
.nav-official {
  margin-left: 1rem;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.45) !important;
  font-size: .7rem !important;
}
.nav-official:hover { color: var(--gold) !important; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0; right: 0;
    background: var(--blue);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .9rem 2rem;
    font-size: .85rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .nav-links a:last-child { border-bottom: none; }
}

/* ─── Hero ───────────────────────────────────────── */
#hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  background:
    linear-gradient(to bottom,
      rgba(26,53,87,.72) 0%,
      rgba(26,53,87,.48) 55%,
      rgba(26,53,87,.82) 100%),
    url("images/cartes/avant-1914/card_008.webp")
      center / cover no-repeat;
}
.hero-eyebrow {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
#hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 6vw, 5rem);
  color: #fff;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}
.hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.hero-motto {
  margin: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-motto-latin {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
  letter-spacing: .04em;
}
.hero-motto-latin::before,
.hero-motto-latin::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: .55;
}
.hero-motto-fr {
  display: block;
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  margin-top: .55rem;
}
.hero-scroll {
  margin-top: 3rem;
  display: inline-block;
  color: rgba(255,255,255,.4);
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}
.hero-scroll:hover { color: rgba(255,255,255,.8); }
.hero-scroll .hero-arrow {
  display: block;
  font-size: 1.2rem;
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
/* Back to top */
#back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
#back-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#back-top:hover { transform: translateY(-3px); }

.hero-blason {
  width: 90px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
}

/* ─── Sections ───────────────────────────────────── */
.section      { padding: 6rem 2rem; }
.section-alt  { background: var(--light); }
.section-dark { background: var(--blue); color: #fff; }
.container    { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: .75rem;
  text-align: center;
}
h2.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: .75rem;
  text-align: center;
}
.section-dark h2.section-title { color: #fff; }
.title-rule {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: .85rem auto 1.1rem;
}
.section-intro {
  color: var(--gray);
  font-size: .95rem;
  max-width: 600px;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section-dark .section-intro { color: rgba(255,255,255,.6); }

/* ─── Histoire ───────────────────────────────────── */
.histoire-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.histoire-grid--full { grid-column: 1 / -1; }
@media (max-width: 768px) {
  .histoire-grid { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  padding: 2rem;
  border-left: 4px solid var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--red);
  margin-bottom: .85rem;
}
.card p {
  font-size: .925rem;
  color: #444;
  line-height: 1.85;
}
.card p + p { margin-top: .9rem; }

.blason-block {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  background: #fff;
  padding: 2rem;
  border-left: 4px solid var(--gold);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.blason-img {
  width: 90px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.blason-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--red);
  margin-bottom: .6rem;
}
.blason-block p { font-size: .925rem; color: #444; line-height: 1.8; }
.blason-motto {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--red);
  font-size: 1rem;
  margin: .75rem 0 .4rem;
}

/* ─── Guerre / Timeline ──────────────────────────── */
.timeline { position: relative; padding: 1rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 138px;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(200,168,75,.45);
}
@media (max-width: 560px) { .timeline::before { left: 64px; } }

.tl-item {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.25rem;
  position: relative;
}
.tl-date {
  min-width: 120px;
  text-align: right;
  font-family: 'Playfair Display', serif;
  font-size: .88rem;
  color: var(--gold);
  font-weight: 700;
  padding-top: 3px;
}
@media (max-width: 560px) {
  .tl-date { min-width: 52px; font-size: .75rem; }
  .tl-item  { gap: 1.25rem; }
}
.tl-body {
  position: relative;
  padding-left: 2rem;
  flex: 1;
}
.tl-body::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 9px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
}
.tl-body strong {
  display: block;
  font-size: .95rem;
  color: #fff;
  margin-bottom: .25rem;
  font-weight: 600;
}
.tl-body p {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
}

.guerre-intro {
  max-width: 680px;
  color: rgba(255,255,255,.82);
  font-size: .95rem;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ─── Personnages ────────────────────────────────── */
.perso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 720px) { .perso-grid { grid-template-columns: 1fr; } }
.perso-card--full { grid-column: 1 / -1; }
.perso-card {
  background: #fff;
  padding: 2rem 1.75rem;
  border-top: 4px solid var(--red);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.perso-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: block;
}
.perso-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--red);
  margin-bottom: .2rem;
}
.perso-meta {
  font-size: .75rem;
  color: var(--gray);
  letter-spacing: .04em;
  margin-bottom: .85rem;
  font-weight: 500;
}
.perso-card p { font-size: .875rem; color: #444; line-height: 1.75; }

/* ─── Gallery ────────────────────────────────────── */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.tab-btn {
  padding: .45rem 1.25rem;
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: all .2s;
  border-radius: 2px;
}
.tab-btn:hover,
.tab-btn.active {
  background: var(--blue);
  color: #fff;
}
.gallery-meta {
  font-size: .8rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-style: italic;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: .6rem;
}
.g-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #c8b89a;
  aspect-ratio: 4/3;
}
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
  filter: sepia(.15);
}
.g-item:hover img { transform: scale(1.08); filter: sepia(0); }
.g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,53,87,.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  padding: .85rem;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-caption { color: #fff; font-size: .7rem; line-height: 1.35; }

/* ─── Lightbox ───────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,.95);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }

#lb-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  filter: sepia(0);
  box-shadow: 0 0 80px rgba(0,0,0,.6);
}
#lb-caption {
  margin-top: 1rem;
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  text-align: center;
}

.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.3);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background .2s;
  line-height: 1;
}
.lb-btn:hover { background: rgba(0,0,0,.65); }
#lb-prev { left: 0; }
#lb-next { right: 0; }

#lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
#lb-close:hover { color: #fff; }

/* ─── Accordion (récits de guerre) ─────────────────── */
.accordion { margin-top: 2rem; display: flex; flex-direction: column; gap: .5rem; }
.acc-item { border: 1px solid rgba(255,255,255,.15); border-radius: 6px; overflow: hidden; }
.acc-trigger {
  width: 100%; background: rgba(255,255,255,.06); border: none; cursor: pointer;
  padding: 1.1rem 1.4rem; display: flex; justify-content: space-between; align-items: flex-start;
  color: #fff; text-align: left; transition: background .2s;
}
.acc-trigger:hover { background: rgba(255,255,255,.12); }
.acc-trigger[aria-expanded="true"] { background: rgba(200,168,75,.18); }
.acc-trigger::after { content: '+'; font-size: 1.4rem; opacity: .6; flex-shrink: 0; margin-left: 1rem; padding-top: .1rem; }
.acc-trigger[aria-expanded="true"]::after { content: '−'; }
.acc-trigger-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; display: block; }
.acc-trigger-sub { display: block; font-size: .78rem; color: rgba(255,255,255,.45); margin-top: .25rem; font-style: italic; font-family: 'Inter', sans-serif; }
.acc-body {
  display: none; padding: 1.4rem 1.6rem 1.8rem;
  color: rgba(255,255,255,.78); font-size: .93rem; line-height: 1.85;
}
.acc-body.open { display: block; }
.acc-body p { margin-bottom: .9rem; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body ul { padding-left: 1.4rem; margin-bottom: .9rem; }
.acc-body li { margin-bottom: .3rem; }
.acc-body strong { color: var(--gold); }

/* ─── Monument grid ──────────────────────────────── */
.monument-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (max-width: 640px) { .monument-grid { grid-template-columns: 1fr; } }
.monument-card--full { grid-column: 1 / -1; }
.monument-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.6rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border-left: 3px solid var(--gold);
}
.monument-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: .8rem;
  color: var(--blue);
}
.monument-card p { font-size: .9rem; color: var(--gray); margin-bottom: .6rem; line-height: 1.7; }
.monument-card p:last-child { margin-bottom: 0; }
.monument-card ul { padding-left: 1.2rem; font-size: .9rem; color: var(--gray); }
.monument-card li { margin-bottom: .25rem; }

/* ─── Mémoire section ────────────────────────────── */
.memoire-groups { display: flex; flex-direction: column; gap: 3rem; margin-top: 2rem; }
.memoire-group h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--blue);
  border-bottom: 2px solid var(--gold);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
}
.memoire-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 640px) { .memoire-cards { grid-template-columns: 1fr; } }
.memoire-card--full { grid-column: 1 / -1; }
.memoire-card {
  background: var(--cream);
  border-radius: 8px;
  padding: 1.4rem;
  border: 1px solid rgba(0,0,0,.08);
}
.memoire-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin-bottom: .7rem;
  color: var(--dark);
}
.memoire-card p { font-size: .88rem; color: var(--gray); margin-bottom: .5rem; line-height: 1.7; }
.memoire-card p:last-child { margin-bottom: 0; }
.memoire-card ul { padding-left: 1.2rem; font-size: .88rem; color: var(--gray); }
.memoire-card a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.memoire-card a:hover { color: var(--gold); }

/* ─── Footer ─────────────────────────────────────── */
footer {
  background: #111;
  color: rgba(255,255,255,.4);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: .78rem;
  line-height: 2;
}
footer a { color: var(--gold); text-decoration: none; }
footer strong { color: rgba(255,255,255,.65); }
