/* ═══════════════════════════════════════════════════════════
   napoleon.css — Thème Empire · Napoléon Bonaparte
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --empire:      #0d1a3a;
  --empire-lt:   #162550;
  --empire-mid:  #1e2f60;
  --velvet:      #1a0a2e;
  --gold:        #c9a227;
  --gold-lt:     #f0d060;
  --gold-dk:     #9a7a18;
  --red:         #c0171e;
  --red-lt:      #e02020;
  --cream:       #f5eed8;
  --cream-dk:    #e0d0a8;
  --text:        #f5eed8;
  --text-muted:  #a09060;
  --border-gold: rgba(201,162,39,.3);
  --radius:      8px;
  --shadow:      0 8px 40px rgba(0,0,0,.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Georgia, 'Times New Roman', serif;
  background: var(--empire);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── Motif fleur de lys en fond ───────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201,162,39,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Barre de progression ─────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red-lt));
  z-index: 1000;
  transition: width .1s linear;
}

/* ── Header ───────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(13,26,58,.96);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.hdr {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.hdr-monogram {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  border: 2px solid var(--gold);
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(201,162,39,.5);
  box-shadow: 0 0 12px rgba(201,162,39,.2);
}

.hdr-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

nav {
  margin-left: auto;
  display: flex;
  gap: .15rem;
  flex-wrap: wrap;
}

nav a {
  font-size: .75rem;
  color: rgba(245,238,216,.55);
  padding: 4px 9px;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}

nav a:hover, nav a.active {
  background: rgba(201,162,39,.2);
  color: var(--gold-lt);
  border-bottom: 2px solid var(--gold);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 1.5rem 7rem;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(201,162,39,.08) 0%, transparent 60%),
    linear-gradient(160deg, var(--velvet) 0%, var(--empire) 50%, #0a1228 100%);
  border-bottom: 3px solid var(--gold);
}

/* Ornement impérial haut */
.hero::before {
  content: '✦  ✦  ✦';
  position: absolute;
  top: 1rem; left: 50%;
  transform: translateX(-50%);
  font-size: .85rem;
  letter-spacing: .5em;
  color: rgba(201,162,39,.4);
  z-index: 5;
}

/* Frise dorée bas */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px, var(--gold) 8px,
    transparent 8px, transparent 14px,
    var(--red) 14px, var(--red) 22px,
    transparent 22px, transparent 28px
  );
  opacity: .6;
}

.hero-inner {
  position: relative;
  z-index: 5;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(192,23,30,.3);
  border: 1px solid var(--red-lt);
  color: var(--cream);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 14px;
  border-radius: 3px;
  margin-bottom: .8rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: .6rem;
  letter-spacing: .04em;
}

.hero h1 .hl {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,162,39,.4);
}

.hero h1 .sub {
  font-size: .42em;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .3rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--cream-dk);
  max-width: 520px;
  line-height: 1.75;
}

/* Médaille impériale */
.hero-medal {
  background: var(--empire-lt);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 160px; height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow:
    0 0 0 6px rgba(201,162,39,.12),
    0 0 0 10px rgba(201,162,39,.06),
    var(--shadow);
  flex-shrink: 0;
}

.medal-year {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-lt);
  line-height: 1;
}

.medal-sub {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: .2rem;
}

.medal-icon {
  font-size: 1.6rem;
  margin: .3rem 0;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Cards empire ─────────────────────────────────────────── */
.card {
  background: var(--empire-lt);
  border: 1px solid var(--border-gold);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

/* Coin ornemental */
.card::after {
  content: '✦';
  position: absolute;
  top: .6rem; right: .8rem;
  font-size: .6rem;
  color: rgba(201,162,39,.3);
}

.card.visible      { opacity: 1; transform: translateY(0); }
.card:hover        { border-color: rgba(201,162,39,.6); box-shadow: 0 12px 50px rgba(0,0,0,.6); }
.card.red-top      { border-top-color: var(--red-lt); }
.card.cream-top    { border-top-color: var(--cream); }

.card-icon {
  font-size: 1.7rem;
  margin-bottom: .5rem;
  display: block;
}

h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-lt);
  margin-bottom: .8rem;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

p   { margin-bottom: .75rem; color: var(--cream-dk); }
ul  { padding-left: 1.4rem; margin-bottom: .75rem; }
li  { margin-bottom: .4rem; color: var(--cream-dk); }
li::marker { color: var(--gold); }

strong { color: var(--gold-lt); }
em     { color: var(--cream); font-style: italic; }

/* ── Date pills ───────────────────────────────────────────── */
.date-pill {
  display: inline-block;
  background: rgba(192,23,30,.25);
  border: 1px solid var(--red);
  color: var(--cream);
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: .6rem;
  letter-spacing: .05em;
}

/* ── Héritage list ────────────────────────────────────────── */
.heritage-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.heritage-list li {
  background: rgba(201,162,39,.07);
  border-left: 3px solid var(--gold);
  padding: .5rem .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  color: var(--cream-dk);
}

/* ── Timeline chute ───────────────────────────────────────── */
.chute-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.chute-list li {
  background: rgba(192,23,30,.12);
  border-left: 3px solid var(--red-lt);
  padding: .5rem .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  color: var(--cream-dk);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .82rem;
  color: var(--text-muted);
  border-top: 2px solid var(--border-gold);
  background: linear-gradient(180deg, var(--empire), var(--velvet));
  position: relative;
  z-index: 1;
  letter-spacing: .04em;
}

footer::before {
  content: '— ✦ —';
  display: block;
  color: var(--gold-dk);
  font-size: .8rem;
  letter-spacing: .3em;
  margin-bottom: .5rem;
}

footer strong { color: var(--gold); }

/* ── Bouton retour en haut ────────────────────────────────── */
#top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px; height: 44px;
  background: var(--empire-mid);
  border: 2px solid var(--gold);
  color: var(--gold-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 0 12px rgba(201,162,39,.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  text-decoration: none;
}

#top-btn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#top-btn:hover   { background: var(--empire-mid); border-color: var(--gold-lt); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-medal { display: none; }
  .cols-2     { grid-template-columns: 1fr; }
  nav         { display: none; }
}
