/* ════════════════════════════════════════
   MONERA — style.css
   La plaque de culture à 96 puits (une colonne = un groupe)
════════════════════════════════════════ */

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

:root {
  --parch: #eef2f0;
  --parch-dark: #dfe6e2;
  --ink: #1e1a2c;
  --ink-light: #3f3a55;
  --ink-muted: #66707d;
  --accent: #5a2d82;
  --accent-dark: #3f1d5f;
  --accent-light: #ece0f5;
  --danger: #b3122f;
  --danger-light: #f7d9de;
  --gold: #c2417a;
  --gold-light: #f0cfe0;
  --border: rgba(30, 26, 44, 0.2);
  --card: #fff;
  --on: #fff;
  --fd: 'JetBrains Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'EB Garamond', Georgia, serif; background: var(--parch); color: var(--ink); }

/* NAVIGATION */
nav {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1.6rem;
  padding: 1.1rem 3rem; border-bottom: 1px solid var(--border);
  background: rgba(238,242,240,.92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 200;
}
.nav-logo { font-family: var(--fd); font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.nav-logo em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; list-style: none; }
.nav-links a { font-size: .9rem; color: var(--ink-light); text-decoration: none; letter-spacing: .03em; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--accent); }
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* RECHERCHE */
.search-wrap { max-width: 580px; margin: 0; display: flex; border: 1px solid var(--border); background: var(--card); box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.search-wrap input { flex: 1; min-width: 0; border: none; background: transparent; padding: .95rem 1.1rem; font-family: 'EB Garamond', serif; font-size: 1.05rem; color: var(--ink); outline: none; }
.search-wrap input::placeholder { color: var(--ink-muted); font-style: italic; }
.search-wrap button { background: var(--accent); border: none; color: var(--on); padding: 0 1.6rem; font-family: var(--fd); font-size: .8rem; letter-spacing: .06em; cursor: pointer; transition: background .2s; }
.search-wrap button:hover { background: var(--accent-dark); }
.hero-tag { display: inline-block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-light); padding: .3rem 1rem; margin-bottom: 1.6rem; }

/* EN-TÊTE */
.mo-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.4rem 2.4rem; padding: clamp(1.6rem,4vw,3rem) clamp(1rem,4vw,3rem) 2rem; background-image: linear-gradient(#d5dfda 1px,transparent 1px), linear-gradient(90deg,#d5dfda 1px,transparent 1px); background-size: 34px 34px; }
.mo-head h1 { font-family: var(--fd); font-weight: 800; font-size: clamp(2.4rem,6vw,4.4rem); letter-spacing: -.05em; line-height: 1; }
.mo-head .lead { max-width: 52ch; margin: .9rem 0 0; font-size: 1.05rem; font-style: italic; color: var(--ink-muted); line-height: 1.6; }
.mo-head .search-wrap { flex: 1 1 320px; max-width: 480px; }

/* LA PAILLASSE — plaque 96 puits */
.mo-bench { padding: 1rem clamp(.8rem,4vw,3rem) 4.5rem; }
.mo-plate { max-width: 860px; margin: 0 auto; padding: 16px 18px 12px; background: #dbe4e0; border: 2px solid #b4c3bc; border-radius: 38px 14px 14px 14px; box-shadow: 0 14px 30px rgba(30,26,44,.14); }
.mo-grid { display: grid; grid-template-columns: 20px repeat(12,minmax(0,1fr)); gap: 5px; align-items: center; }
.mh { grid-column: span 2; font-family: var(--fd); font-size: .7rem; font-weight: 800; letter-spacing: -.01em; padding: .5rem .1rem .45rem; border: 0; border-bottom: 4px solid var(--gc); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s; }
.mh:hover, .mh[aria-pressed="true"] { background: color-mix(in srgb, var(--gc) 16%, transparent); }
.rl { font-family: var(--fd); font-size: .66rem; color: var(--ink-muted); text-align: center; }
.well { position: relative; display: block; aspect-ratio: 1; border-radius: 50%; background: #f7faf8; box-shadow: inset 0 0 0 1px #b4c3bc; cursor: pointer; transition: opacity .25s; border: none; padding: 0; }
.well::after { content: ""; position: absolute; inset: 24%; border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--gc) 50%, #fff) 0, var(--gc) 62%); opacity: var(--o); transition: inset .25s; }
.well.sel::after { inset: 12%; opacity: 1; }
.well.dim { opacity: .3; }
.mo-cap { font-family: var(--fd); font-size: .7rem; color: var(--ink-muted); text-align: center; margin-top: .8rem; }

.mo-read { max-width: 860px; margin: 1.6rem auto 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.4rem; }
.mo-info, .mo-tab { background: var(--card); border: 1px solid var(--border); border-top: 5px solid var(--gc); }
.mo-info { padding: 1.4rem 1.5rem 1.6rem; }
.mo-info .tg { font-family: var(--fd); font-size: .7rem; letter-spacing: .12em; color: var(--gc); font-weight: 800; }
.mo-info h2 { font-family: var(--fd); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; margin: .4rem 0 .2rem; line-height: 1.15; }
.mo-info .lat { font-family: var(--fd); font-size: .78rem; color: var(--ink-muted); }
.mo-info p { margin-top: 1rem; color: var(--ink-light); }
.mo-info .n { margin-top: 1.2rem; font-family: var(--fd); font-size: .78rem; color: var(--ink-muted); }
.mo-info .n b { font-size: 1.3rem; letter-spacing: -.03em; color: var(--ink); margin-left: .4rem; }
.mo-info a { display: inline-block; margin-top: 1.2rem; font-family: var(--fd); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--gold-light); padding-bottom: .15rem; }
.mo-tab { display: flex; flex-direction: column; }
.mo-tab a { display: grid; grid-template-columns: 20px 1fr auto; gap: .8rem; align-items: center; padding: .8rem 1rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--border); font-family: var(--fd); flex: 1; }
.mo-tab a:first-child { border-top: 0; }
.mo-tab a:hover { background: color-mix(in srgb, var(--gc) 10%, #fff); }
.mo-tab i { width: 14px; height: 14px; border-radius: 50%; background: var(--gc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 24%, transparent); display: block; }
.mo-tab b { font-weight: 400; font-size: .88rem; font-style: italic; }
.mo-tab span { font-size: .7rem; letter-spacing: .06em; color: var(--ink-muted); }
@media (max-width: 760px) { .mo-read { grid-template-columns: 1fr; } .mh { font-size: .56rem; } }

/* PROTOCOLE DE COLORATION DE GRAM */
.mo-proto { max-width: 1040px; margin: 0 auto; padding: 4.5rem clamp(1rem,4vw,2rem) 0; }
.mo-proto h2 { font-family: var(--fd); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.6rem,3.6vw,2.3rem); }
.mo-proto > p { color: var(--ink-muted); margin: .5rem 0 2rem; max-width: 64ch; }
.steps { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 1rem; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 2px; padding: 1.1rem 1.1rem 1.3rem; position: relative; }
.step b { display: block; font-family: var(--fd); font-size: 1.6rem; color: var(--accent); letter-spacing: -.03em; }
.step p { margin-top: .5rem; font-size: .9rem; color: var(--ink-light); font-family: 'EB Garamond', serif; }
.step .r { position: absolute; top: 1rem; right: 1rem; width: 14px; height: 14px; border-radius: 50%; display: block; }
.step:nth-child(1) .r { background: #7a3fb0; } .step:nth-child(2) .r { background: #7a3fb0; } .step:nth-child(3) .r { background: #c2417a; } .step:nth-child(4) .r { background: #e2467f; }

/* REPÈRES DE MICROBIOLOGIE */
.mo-log { max-width: 760px; margin: 4rem auto 0; padding: 0 clamp(1rem,4vw,2rem) 4.5rem; }
.mo-log h2 { font-family: var(--fd); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.4rem,3.2vw,1.9rem); margin-bottom: 1.4rem; }
.log { border: 1px solid var(--border); background: var(--card); }
.log div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid var(--border); font-family: var(--fd); }
.log div:first-child { border-top: 0; }
.log b { color: var(--accent); font-size: .86rem; }
.log span { font-size: .86rem; color: var(--ink-light); font-weight: 400; }
@media (max-width: 600px) { .log div { grid-template-columns: 1fr; } }

/* OÙ ELLES VIVENT */
.mo-hab { max-width: 1040px; margin: 4.5rem auto 0; padding: 0 clamp(1rem,4vw,2rem); }
.mo-hab h2 { font-family: var(--fd); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.6rem,3.6vw,2.3rem); }
.mo-hab > p { color: var(--ink-muted); margin: .5rem 0 1.8rem; max-width: 62ch; }
.bars { display: flex; flex-direction: column; gap: .8rem; }
.bar { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 1rem; font-family: var(--fd); font-size: .85rem; }
.bar .tr { height: 10px; background: #e2e7e4; border-radius: 0; position: relative; overflow: hidden; }
.bar .tr i { position: absolute; inset: 0; width: var(--w); background: var(--accent); display: block; }
@media (max-width: 640px) { .bar { grid-template-columns: 110px 1fr auto; } }

/* ESPÈCE DU MOIS */
.mo-spot { max-width: 820px; margin: 4rem auto 0; padding: 0 clamp(1rem,4vw,2rem) 4.5rem; }
.spot { display: grid; grid-template-columns: 130px 1fr; gap: 1.4rem; background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--accent); padding: 1.6rem; }
.spot .sp-ic { width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #f0dceb, var(--accent)); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.spot .tg { font-family: var(--fd); font-size: .7rem; letter-spacing: .12em; color: var(--accent); font-weight: 800; display: block; }
.spot h2 { font-family: var(--fd); font-weight: 800; letter-spacing: -.03em; font-size: 1.5rem; margin: 0; }
.spot .lat { font-family: var(--fd); font-size: .8rem; color: var(--ink-muted); }
.spot p { margin-top: .6rem; color: var(--ink-light); font-size: .96rem; font-family: 'EB Garamond', serif; }
@media (max-width: 640px) { .spot { grid-template-columns: 1fr; } .spot .sp-ic { width: 74px; height: 74px; font-size: 1.6rem; } }

/* FOOTER */
footer { border-top: 1px solid var(--border); text-align: center; padding: 2.5rem 2rem; font-size: .85rem; color: var(--ink-muted); font-style: italic; background: var(--parch); }
footer strong { font-family: var(--fd); font-weight: 800; color: var(--ink-light); font-style: normal; }
footer ul { list-style: none; margin: .9rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-style: normal; }
footer a { color: var(--ink-light); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer [aria-current] { color: var(--accent); border-bottom: 1px solid var(--accent); }

@media (max-width: 768px) {
  nav { padding: 1rem 1.4rem; }
  .nav-logo { flex: 1; }
  .hamburger { display: flex !important; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; width: 100%; background: rgba(238,242,240,.98); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .5rem 0 1rem; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-10px); transition: max-height .4s ease, opacity .35s ease, transform .35s ease; display: flex; z-index: 199; }
  .nav-links.open { max-height: 500px; opacity: 1; transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .75rem 1.4rem; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
