@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&family=Crimson+Pro:ital,wght@0,200;0,300;0,400;0,600;1,200;1,300;1,400&family=Fira+Code:wght@300;400&display=swap');

:root {
  /* ── Parchemin (fond public) ── */
  --p0: #fdfaf3;
  --p1: #f5f0e4;
  --p2: #ebe3ce;
  --p3: #ddd3b8;
  --p4: #c8b99a;

  /* ── Encre (textes public) ── */
  --e0: #1a1208;
  --e1: #2c2010;
  --e2: #4a3820;
  --e3: #7a6040;
  --e4: #a08060;

  /* ── BIC 4 couleurs ── */
  --b: #1040a0;
  --r: #b82010;
  --v: #107830;
  --n: #1a1208;

  /* ── Or / accents ── */
  --or:  #b8965a;
  --or2: #d4ae74;

  /* ── Sépia ── */
  --sepia:  rgba(100,70,20,0.08);
  --sepia2: rgba(100,70,20,0.15);

  /* ── Polices ── */
  --fd: 'IM Fell English SC', serif;   /* Titres display */
  --fs: 'IM Fell English', serif;       /* Titres italiques */
  --fc: 'Crimson Pro', serif;           /* Corps de texte */
  --fm: 'Fira Code', monospace;         /* Mono / labels */
  --fb: 'Crimson Pro', serif;           /* Alias fc (compat) */

  /* ── Admin — fond sépia sombre ── */
  --a-bg:     #1e1a10;   /* fond page admin */
  --a-card:   #252010;   /* fond carte admin */
  --a-border: #3a3020;   /* bordures admin */
  --a-border2:#5a5030;   /* bordures admin secondaires */
  --a-text:   #d8c898;   /* texte principal admin */
  --a-muted:  #8a7850;   /* texte atténué admin */
  --a-dim:    #a09060;   /* labels admin */
  --a-dark:   #4a3820;   /* texte très atténué admin */
  --a-gold:   #e0c070;   /* or principal admin */
  --a-gold2:  #c8a860;   /* or secondaire admin */
  --a-gold3:  #c9a84c;   /* or onglets actifs */
  --a-green:  #60c878;   /* succès admin */
  --a-red:    #d06060;   /* erreur/suppression admin */

  /* ── Alias rétrocompat (contenu.php, pages legacy) ── */
  --gold:       #e0c070;
  --gold2:      #c8a860;
  --cream:      #d8c898;
  --cream-dark: #a09060;
  --brown:      #1e1a10;
  --rust:       #c8a860;
  --rust-light: #e0c070;
  --text-light: #8a7850;
  --ink-green:  rgba(16,120,48,0.85);
  --ink-red:    rgba(200,30,10,0.8);
  --font-mono:  'Fira Code', monospace;
  --font-serif: 'IM Fell English', serif;
  --font-display: 'IM Fell English SC', serif;
}

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

body {
  font-family: var(--fc);
  color: var(--e0);
  background: var(--p0);
  min-height: 100vh;
  overflow-x: hidden;
  /* Texture parchemin */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(180,140,80,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(180,140,80,0.03) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── HEADER ── */
.site-header {
  background: var(--e0);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--e2);
}
.site-header::before {
  content: '';
  display: block;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--b) 0px, var(--b) 25%,
    var(--r) 25%, var(--r) 50%,
    var(--v) 50%, var(--v) 75%,
    var(--e2) 75%, var(--e2) 100%
  );
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0;
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  margin-right: auto;
}
.logo-main {
  font-family: var(--fd);
  font-size: 1rem;
  color: var(--p1);
  letter-spacing: 0.12em;
  line-height: 1;
}
.logo-sub {
  font-family: var(--fm);
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  color: var(--e4);
  margin-top: 3px;
  font-weight: 300;
}

.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.main-nav a {
  font-family: var(--fd);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--e4);
  text-decoration: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.25s;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20px; right: 20px;
  height: 1px;
  background: var(--p3);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--p1); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.bic-strip { display: none; }

/* ── HERO — planche d'illustration ── */
.hero {
  background: var(--p0);
  border-bottom: 2px solid var(--p3);
  position: relative;
  overflow: hidden;
}

/* Double cadre gravure */
.hero::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid var(--p3);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid var(--p2);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 60px 80px 52px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.hero-badge { display: none; }

/* Numéro de planche */
.hero-num {
  display: inline-block;
  font-family: var(--fm);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--e4);
  border-bottom: 1px solid var(--p3);
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--fs);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-style: italic;
  font-weight: 400;
  color: var(--e0);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero h1 span {
  font-style: normal;
  color: var(--r);
  font-family: var(--fd);
}

.hero p {
  font-family: var(--fc);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--e2);
  max-width: 520px;
  font-weight: 300;
  font-style: italic;
}

/* Stats — tableau taxonomique */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--p3);
  min-width: 200px;
}
.hero-stat {
  padding: 18px 24px;
  border-bottom: 1px solid var(--p3);
  background: var(--p0);
  transition: background 0.2s;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.hero-stat:last-child { border-bottom: none; }
.hero-stat:hover { background: var(--p1); }
.hero-stat-label {
  font-family: var(--fd);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--e3);
  display: block;
  margin-bottom: 2px;
}
.hero-stat-num {
  font-family: var(--fs);
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  color: var(--e0);
  line-height: 1;
  display: block;
  text-align: right;
}
.hero-stat:nth-child(1) .hero-stat-num { color: var(--b); }
.hero-stat:nth-child(2) .hero-stat-num { color: var(--r); }
.hero-stat:nth-child(3) .hero-stat-num { color: var(--v); }

/* ── SEARCH ── */
.search-bar {
  background: var(--p1);
  border-bottom: 1px solid var(--p3);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-bar::before {
  content: '§';
  font-family: var(--fs);
  font-size: 1.2rem;
  color: var(--e4);
  flex-shrink: 0;
}
.search-input-wrap {
  max-width: 480px;
  display: flex;
  border-bottom: 1px solid var(--p3);
  transition: border-color 0.25s;
}
.search-input-wrap:focus-within { border-color: var(--e0); }
.search-input {
  flex: 1;
  padding: 8px 4px;
  background: transparent;
  border: none;
  font-family: var(--fc);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--e0);
  outline: none;
}
.search-input::placeholder { color: var(--e4); font-style: italic; }
.search-btn {
  background: transparent;
  border: none;
  color: var(--e3);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--fm);
  font-size: 0.72rem;
  transition: color 0.2s;
  letter-spacing: 0.1em;
}
.search-btn:hover { color: var(--e0); }

/* ── SECTION ── */
.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 40px 60px;
}
.section-title {
  font-family: var(--fd);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--e0);
  margin-bottom: 6px;
  display: block;
}
.section-title span { color: var(--r); }
.section-sub {
  font-family: var(--fm);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--e4);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 300;
}
.section-sub::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 60px;
  background: var(--p3);
}

/* ── FILTRES ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.filter-btn {
  font-family: var(--fd);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--p3);
  color: var(--e3);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--e0); color: var(--e0); background: var(--p1); }
.filter-btn.active { background: var(--e0); border-color: var(--e0); color: var(--p1); }

/* ── GALLERY ── */
.gallery-section {
  margin-bottom: 52px;
  background: transparent;
  border: none;
  padding: 0;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;} }
.gallery-section:nth-child(1){animation-delay:.08s;}
.gallery-section:nth-child(2){animation-delay:.18s;}
.gallery-section:nth-child(3){animation-delay:.28s;}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--p3);
  position: relative;
}
/* Petit ornement centré */
.gallery-header::after {
  content: '✦';
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--p3);
  background: var(--p0);
  padding: 0 6px;
}
.gallery-title {
  font-family: var(--fd);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--e0);
}
.gallery-count {
  font-family: var(--fm);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--e4);
  font-weight: 300;
}

/* ── CAROUSEL ── */
.carousel-wrapper { position: relative; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--p3) transparent;
}
.carousel-track::-webkit-scrollbar{height:2px;}
.carousel-track::-webkit-scrollbar-thumb{background:var(--p3);}
.carousel-nav{display:flex;justify-content:flex-end;gap:4px;margin-top:4px;}
.carousel-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--p3);
  background: transparent;
  color: var(--e3);
  cursor: pointer;
  font-family: var(--fm);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.carousel-btn:hover { background: var(--e0); border-color: var(--e0); color: var(--p1); }

/* ── CARD — spécimen de collection ── */
.card {
  min-width: 210px;
  max-width: 210px;
  scroll-snap-align: start;
  flex-shrink: 0;
  background: var(--p0);
  border: 1px solid var(--p3);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(100,70,20,0.15);
}

/* Cadre intérieur sur hover */
.card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--p2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.card:hover::before { opacity: 1; }

/* Numéro de spécimen */
.card::after {
  content: 'Spéc. ' counter(specimen);
  counter-increment: specimen;
  position: absolute;
  bottom: 0; right: 0;
  font-family: var(--fm);
  font-size: 0.45rem;
  color: var(--e4);
  padding: 2px 6px;
  letter-spacing: 0.1em;
  background: var(--p1);
  border-top: 1px solid var(--p3);
  border-left: 1px solid var(--p3);
}
.gallery-section { counter-reset: specimen; }

.card-img-wrap {
  width: 100%;
  height: 158px;
  background: var(--p1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--p3);
}
/* Vignettage sur l'image */
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(100,70,20,0.12) 100%);
  pointer-events: none;
  z-index: 1;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.08) contrast(1.02);
  transition: filter 0.4s, transform 0.4s;
}
.card:hover .card-img-wrap img { filter: sepia(0) contrast(1.04); transform: scale(1.04); }

.badge-new {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--r);
  color: var(--p0);
  font-family: var(--fd);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  padding: 3px 7px;
  z-index: 2;
}

.card-body { padding: 12px 13px 20px; }
.card-name {
  font-family: var(--fs);
  font-size: 0.94rem;
  font-style: italic;
  color: var(--e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  font-weight: 400;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.tag { font-family: var(--fm); font-size: 0.55rem; letter-spacing: 0.08em; padding: 2px 6px; font-weight: 300; }
.tag-year  { color: var(--e3); border: 1px solid var(--p3); background: var(--p1); }
.tag-etat  { color: var(--v); border: 1px solid rgba(16,120,48,0.25); }
.tag-rarete { color: var(--r); border: 1px solid rgba(184,32,16,0.25); }
.card-colors { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--p3); display: inline-block; transition: transform 0.2s; }
.card:hover .color-dot { transform: scale(1.2); }
.rating-wrap { padding-top: 8px; border-top: 1px dotted var(--p3); }
.stars { display: flex; gap: 2px; align-items: center; }
.star { cursor: pointer; font-size: 0.78rem; color: var(--p3); transition: color 0.15s, transform 0.15s; line-height: 1; }
.star.active { color: #b07820; }
.star:hover { color: #b07820; transform: scale(1.2); }
.rating-info { font-family: var(--fm); font-size: 0.55rem; color: var(--e4); margin-left: 6px; font-weight: 300; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,10,5,0.82);
  backdrop-filter: blur(3px);
  z-index: 1000; display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.modal-overlay.open{display:flex;}
.modal {
  background: var(--p0);
  max-width: 820px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  position: relative;
  border: 1px solid var(--p3);
  box-shadow: 0 32px 80px rgba(15,10,5,0.4);
  /* Double cadre */
  outline: 4px solid var(--p0);
  outline-offset: 6px;
  box-shadow: 0 0 0 5px var(--p3), 0 32px 80px rgba(15,10,5,0.4);
}
@media(max-width:600px){.modal{grid-template-columns:1fr;}}
.modal::before {
  content: '';
  position: absolute; top:0;left:0;right:0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--b) 0 25%, var(--r) 25% 50%, var(--v) 50% 75%, var(--e2) 75% 100%);
  z-index: 2;
}
.modal-img { background: var(--p1); display: flex; align-items: center; justify-content: center; min-height: 300px; overflow: hidden; border-right: 1px solid var(--p3); }
.modal-img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.05); }
.modal-content { padding: 32px 26px; display: flex; flex-direction: column; gap: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--e0); color: var(--p1);
  border: none; width: 26px; height: 26px;
  cursor: pointer; font-family: var(--fm); font-size: 0.7rem;
  z-index: 10; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--r); }
.modal-name { font-family: var(--fs); font-size: 1.4rem; font-style: italic; color: var(--e0); line-height: 1.2; }
.modal-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; font-family: var(--fc); }
.modal-table tr { border-bottom: 1px dotted var(--p3); }
.modal-table td { padding: 6px 4px; }
.modal-table td:first-child { font-family: var(--fm); font-size: 0.58rem; letter-spacing: 0.12em; color: var(--e4); width: 36%; font-weight: 300; }
.modal-desc { font-family: var(--fs); font-style: italic; font-size: 0.95rem; color: var(--e2); border-left: 2px solid var(--p3); padding-left: 14px; line-height: 1.75; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--e0);
  padding: 52px 40px 44px;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--p3);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--b) 0 25%, var(--r) 25% 50%, var(--v) 50% 75%, #444 75% 100%);
}
.page-hero h1 {
  font-family: var(--fd);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.1em;
  color: var(--p1);
  margin-bottom: 8px;
  position: relative;
}
.page-hero p {
  font-family: var(--fc);
  font-style: italic;
  color: var(--e4);
  font-size: 0.92rem;
  position: relative;
}

/* ── PROSE ── */
.prose { max-width: 740px; font-family: var(--fc); font-size: 1.02rem; line-height: 1.9; color: var(--e1); font-weight: 300; }
.prose h2 { font-family: var(--fd); font-size: 1.2rem; letter-spacing: 0.1em; color: var(--e0); margin: 2.5rem 0 1rem; border-bottom: 1px solid var(--p3); padding-bottom: 6px; }
.prose p { margin-bottom: 1.1rem; }
.prose .drop-cap::first-letter { font-family: var(--fd); font-size: 4rem; float: left; line-height: 0.82; margin-right: 8px; margin-top: 6px; color: var(--r); }
.prose strong { font-weight: 600; }

.timeline { position: relative; padding-left: 2.2rem; margin: 2rem 0; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, var(--p3) 10%, var(--p3) 90%, transparent); }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1.2rem; }
.timeline-item::before { content: '◆'; position: absolute; left: -2.7rem; top: 0.1rem; font-size: 0.5rem; color: var(--r); background: var(--p0); padding: 0 4px; }
.timeline-year { font-family: var(--fd); font-size: 1rem; letter-spacing: 0.12em; color: var(--b); }
.timeline-text { font-family: var(--fc); font-size: 0.88rem; margin-top: 4px; color: var(--e3); line-height: 1.7; font-weight: 300; }

.anecdote-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1px; background: var(--p3); border: 1px solid var(--p3); }
.anecdote-card { background: var(--p0); padding: 22px; border: none; box-shadow: none; transition: background 0.2s; }
.anecdote-card::before { display: none; }
.anecdote-card:hover { background: var(--p1); }
.anecdote-icon { font-size: 1.5rem; margin-bottom: 10px; opacity: 0.8; }
.anecdote-card h3 { font-family: var(--fs); font-size: 1rem; font-style: italic; color: var(--e0); margin-bottom: 8px; }
.anecdote-card p { font-family: var(--fc); font-size: 0.84rem; color: var(--e3); line-height: 1.72; font-weight: 300; }

.contact-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 52px; align-items: start; }
@media(max-width:768px){.contact-wrap{grid-template-columns:1fr;}}
.contact-info h2 { font-family: var(--fd); font-size: 1.2rem; letter-spacing: 0.1em; color: var(--e0); margin-bottom: 12px; }
.contact-info p { font-family: var(--fc); font-style: italic; color: var(--e3); font-size: 0.92rem; line-height: 1.75; margin-bottom: 12px; font-weight: 300; }
.contact-info a { color: var(--b); text-decoration: none; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-family: var(--fm); font-size: 0.58rem; letter-spacing: 0.2em; color: var(--e4); margin-bottom: 5px; font-weight: 300; }
.form-group input,.form-group textarea,.form-group select { width: 100%; padding: 9px 12px; background: var(--p0); border: 1px solid var(--p3); font-family: var(--fc); font-size: 0.95rem; font-style: italic; color: var(--e0); outline: none; transition: border-color 0.2s; font-weight: 300; }
.form-group input:focus,.form-group textarea:focus,.form-group select:focus { border-color: var(--e0); background: white; }
.form-group textarea { resize: vertical; min-height: 120px; }

.btn { display: inline-block; padding: 10px 24px; font-family: var(--fd); font-size: 0.75rem; letter-spacing: 0.15em; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: var(--e0); color: var(--p1); border: 1px solid var(--e0); }
.btn-primary:hover { background: var(--e1); }
.btn-gold { background: transparent; color: var(--e0); border: 1px solid var(--e0); }
.btn-gold:hover { background: var(--e0); color: var(--p1); }

.no-results { text-align: center; padding: 4rem; font-family: var(--fs); font-style: italic; font-size: 1.1rem; color: var(--e4); }
.toast { position: fixed; bottom: 2rem; right: 2rem; padding: 12px 20px; font-family: var(--fm); font-size: 0.72rem; z-index: 9999; transform: translateY(80px); opacity: 0; transition: all 0.35s ease; border: 1px solid var(--p3); font-weight: 300; letter-spacing: 0.05em; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--p0); color: var(--e0); border-left: 3px solid var(--v); }
.toast-error   { background: var(--p0); color: var(--r); border-left: 3px solid var(--r); }

.site-footer { background: var(--e0); color: var(--e4); text-align: center; padding: 28px 24px; margin-top: 6rem; font-family: var(--fm); font-size: 0.62rem; letter-spacing: 0.18em; font-weight: 300; border-top: 1px solid var(--e2); }
.site-footer::before { content: '— '; }
.site-footer::after { content: ' —'; }
.site-footer a { color: var(--p3); text-decoration: none; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; background: none; border: none; margin-left: auto; }
.hamburger span { display: block; width: 20px; height: 1px; background: var(--e4); transition: all 0.3s; }
.mobile-menu { background: var(--e0); border-bottom: 1px solid var(--e2); flex-direction: column; }
.mobile-menu a { padding: 13px 24px; font-family: var(--fd); font-size: 0.72rem; letter-spacing: 0.12em; text-decoration: none; color: var(--e4); border-bottom: 1px solid rgba(255,255,255,0.04); display: block; transition: all 0.2s; }
.mobile-menu a:hover,.mobile-menu a.active { color: var(--p1); padding-left: 32px; }

/* ══════════════════════════════════════════
   ADMIN
══════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; background: var(--a-bg); }
.admin-nav { background: var(--a-card); border-right: 1px solid var(--a-border); padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-nav-logo { padding: 22px 18px; border-bottom: 1px solid var(--a-border); margin-bottom: 8px; }
.admin-nav-logo span { font-family: var(--fd); font-size: 0.95rem; letter-spacing: 0.15em; color: var(--a-gold); display: block; }
.admin-nav-logo small { font-family: var(--fm); font-size: 0.52rem; letter-spacing: 0.2em; color: var(--a-muted); margin-top: 3px; display: block; font-weight: 300; }
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 18px; font-family: var(--fm); font-size: 0.65rem; letter-spacing: 0.15em; text-decoration: none; color: var(--a-muted); border-left: 2px solid transparent; transition: all 0.2s; font-weight: 300; }
.admin-nav a:hover,.admin-nav a.active { color: var(--a-gold); border-left-color: var(--a-gold); background: rgba(224,192,112,0.08); }
.admin-main { background: var(--a-bg); padding: 30px 26px; color: var(--a-text); overflow-y: auto; }
.admin-title { font-family: var(--fs); font-size: 1.8rem; font-style: italic; font-weight: 400; color: var(--a-gold); margin-bottom: 2px; }
.admin-subtitle { font-family: var(--fm); font-size: 0.58rem; letter-spacing: 0.25em; color: var(--a-muted); text-transform: uppercase; margin-bottom: 26px; font-weight: 300; }
.admin-card { background: var(--a-card); border: 1px solid var(--a-border); padding: 20px; margin-bottom: 18px; position: relative; }
.admin-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.admin-card:nth-child(1)::before { background: var(--b); }
.admin-card:nth-child(2)::before { background: var(--r); }
.admin-card:nth-child(3)::before { background: var(--v); }
.admin-card:nth-child(4)::before { background: #888; }
.admin-card:nth-child(n+5)::before { background: var(--a-gold); }
.admin-card h2 { font-family: var(--fd); font-size: 0.82rem; letter-spacing: 0.15em; color: var(--a-gold); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--a-border); }
.admin-form .form-group label { color: var(--a-dim); font-size: 0.62rem; letter-spacing: 0.15em; }
.admin-form .form-group input,.admin-form .form-group textarea,.admin-form .form-group select { background: rgba(255,255,255,0.06); border: 1px solid var(--a-border); color: var(--a-text); font-style: italic; font-weight: 300; }
.admin-form .form-group input:focus,.admin-form .form-group textarea:focus,.admin-form .form-group select:focus { border-color: var(--a-gold); background: rgba(255,255,255,0.09); }
.admin-form .form-group select option { background: var(--a-card); color: var(--a-text); }

/* Selects admin hors .admin-form */
.admin-main select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--a-border);
  color: var(--a-text);
  padding: 8px 10px;
  font-size: 0.82rem;
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a09060'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.admin-main select:focus { border-color: var(--a-gold); background-color: rgba(255,255,255,0.09); }
.admin-main select option { background: var(--a-card); color: var(--a-text); }
/* Fiches toolbar selects */
.fiches-toolbar select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--a-border);
  color: var(--a-text);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a09060'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
.fiches-toolbar select option { background: var(--a-card); color: var(--a-text); }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.upload-zone { border: 2px dashed var(--a-border2); padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s; background: rgba(255,255,255,0.02); }
.upload-zone:hover,.upload-zone.drag-over { border-color: var(--a-gold); background: rgba(224,192,112,0.06); }
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.3; }
.upload-zone p { font-family: var(--fm); font-size: 0.72rem; color: var(--a-dim); letter-spacing: 0.08em; font-weight: 300; }
.img-preview { max-width: 180px; max-height: 180px; border: 1px solid #2a2010; display: none; margin: 10px auto; object-fit: cover; filter: sepia(0.2); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 2px; background: var(--a-border); margin-bottom: 20px; }
.stat-card { background: var(--a-card); padding: 18px; border: none; border-bottom: 2px solid var(--a-gold); }
.stat-card:nth-child(1) { border-bottom-color: var(--b); }
.stat-card:nth-child(2) { border-bottom-color: var(--r); }
.stat-card:nth-child(3) { border-bottom-color: var(--v); }
.stat-card:nth-child(4) { border-bottom-color: #555; }
.stat-num { font-family: var(--fs); font-size: 2rem; font-style: italic; font-weight: 300; color: var(--a-gold2); line-height: 1; display: block; }
.stat-card:nth-child(1) .stat-num { color: #6090d0; }
.stat-card:nth-child(2) .stat-num { color: var(--a-red); }
.stat-card:nth-child(3) .stat-num { color: #60a870; }
.stat-label { font-family: var(--fm); font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--a-dim); margin-top: 4px; display: block; font-weight: 300; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-family: var(--fc); font-style: italic; font-size: 0.8rem; color: var(--a-text); min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; font-weight: 300; }
.bar-track { flex: 1; height: 5px; background: var(--a-border); position: relative; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--b), var(--a-gold2)); transition: width 1.2s cubic-bezier(.22,1,.36,1); width: 0; }
.bar-val { font-family: var(--fm); font-size: 0.68rem; color: var(--a-gold2); min-width: 28px; text-align: right; font-weight: 300; }

.login-wrap { min-height: 100vh; background: var(--a-bg); display: flex; align-items: center; justify-content: center; }
.login-box { background: var(--a-card); max-width: 360px; width: 90%; border: 1px solid var(--a-border); overflow: hidden; box-shadow: 0 0 0 4px var(--a-bg), 0 0 0 5px var(--a-border); }
.login-box-bar { display: flex; height: 2px; }
.login-box-bar span { flex: 1; }
.login-box-bar .lb1 { background: var(--b); } .login-box-bar .lb2 { background: var(--r); }
.login-box-bar .lb3 { background: var(--v); } .login-box-bar .lb4 { background: #333; }
.login-box-inner { padding: 40px 32px; text-align: center; }
.login-box h1 { font-family: var(--fs); font-size: 1.8rem; font-style: italic; font-weight: 400; color: var(--a-gold2); margin-bottom: 4px; }
.login-box p { font-family: var(--fm); font-size: 0.58rem; color: var(--a-dim); letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 28px; font-weight: 300; }

/* ── BURGER BAR (cachée sur desktop) ── */
.admin-burger-bar{
  display:none;
  align-items:center;
  gap:14px;
  background:var(--a-card);
  border-bottom:1px solid var(--a-border);
  padding:12px 16px;
  margin:-30px -26px 24px;
  position:sticky;top:0;z-index:50;
}
.admin-burger-bar::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:repeating-linear-gradient(90deg,var(--b) 0 25%,var(--r) 25% 50%,var(--v) 50% 75%,var(--a-border) 75% 100%);
}
.admin-burger-btn{
  background:none;border:1px solid var(--a-border2);
  padding:7px 9px;cursor:pointer;
  display:flex;flex-direction:column;gap:4px;
  transition:border-color 0.2s;flex-shrink:0;
}
.admin-burger-btn:hover{border-color:var(--a-gold);}
.admin-burger-btn span{display:block;width:18px;height:1px;background:var(--a-muted);transition:all 0.3s;}
.admin-burger-btn.open span:nth-child(1){transform:translateY(5px) rotate(45deg);background:var(--a-gold);}
.admin-burger-btn.open span:nth-child(2){opacity:0;}
.admin-burger-btn.open span:nth-child(3){transform:translateY(-5px) rotate(-45deg);background:var(--a-gold);}
.admin-burger-page{font-family:var(--fd);font-size:0.78rem;letter-spacing:0.15em;color:var(--a-gold2);}

/* ── OVERLAY NAV ── */
.admin-nav-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(10,8,4,0.7);z-index:299;
}

@media(max-width:768px){
  .main-nav{display:none;}
  .hamburger{display:flex!important;}
  .header-inner{padding:0 20px;height:56px;}
  .hero-inner{grid-template-columns:1fr;gap:0;padding:40px 20px 36px;}
  .hero-stats{flex-direction:row;border:none;border-top:1px solid var(--p3);}
  .hero-stat{flex:1;border-bottom:none;border-right:1px solid var(--p3);}
  .hero-stat:last-child{border-right:none;}
  .search-bar{padding:12px 20px;}
  .section{padding:32px 20px 44px;}
  .page-hero{padding:40px 20px 32px;}
  .admin-layout{grid-template-columns:1fr;}
  .admin-nav{
    position:fixed;top:0;left:0;bottom:0;width:240px;height:100vh;
    transform:translateX(-100%);
    box-shadow:4px 0 24px rgba(0,0,0,0.5);
    transition:transform 0.28s ease;
    z-index:300;
  }
  .admin-nav.open{transform:translateX(0);}
  .admin-burger-bar{display:flex;}
  .admin-form .form-row{grid-template-columns:1fr;}
}
