/* ── Variables — Panacotta Cattery palette ── */
:root {
  --bg: #160c10;
  --surface: #1f1118;
  --surface2: #27161e;
  --border: #3d2433;
  --text: #f2e9ec;
  --muted: #9c7882;
  --rose: #b75374;
  --rose-light: #e996b1;
  --burgundy: #6d3b4c;
  --green: #5a8a6a;
  --green-light: #7dbb8a;
  --amber: #c97a3a;
  --blue: #4a7fa8;
  --purple: #8a6ab8;
  --red: #c05a5a;

  /* Aliases pour compatibilité avec les classes existantes */
  --gold: var(--rose);
  --gold-light: var(--rose-light);
}

/* ── Mode contraste élevé (noir/blanc) ── */
html.high-contrast {
  --bg:         #ffffff;
  --surface:    #f2f2f2;
  --surface2:   #e6e6e6;
  --border:     #000000;
  --text:       #000000;
  --muted:      #555555;
  --rose:       #000000;
  --rose-light: #000000;
  --burgundy:   #999999;
  --green:      #555555;
  --green-light:#333333;
  --amber:      #333333;
  --blue:       #555555;
  --purple:     #555555;
  --red:        #000000;
  --gold:       #000000;
  --gold-light: #000000;
}

html.high-contrast body::before {
  display: none;
}

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

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Akatab", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes route-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Route loading (code-splitting Suspense fallback) ── */
.route-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 3rem;
}
.route-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: route-spin 0.8s linear infinite;
}

/* ── Header ── */
.site-header {
  padding: 0 4rem;
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  backdrop-filter: blur(8px);
}

.site-header.home-header {
  height: 72px;
}

.site-header.home-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 4rem;
  width: 80px;
  height: 2px;
  background: var(--gold);
}

/* Gauche */
.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo {
  font-family: "Alexandria", serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--gold-light);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* ── Chat animé (CatLogo) ── */
.catc {
  position: relative;
  width: 66px;
  height: 54px;
  flex-shrink: 0;
}

.catc-head,
.catc-ear,
.catc-body,
.catc-foot,
.catc-tail span,
.catc-lid {
  background-color: var(--rose);
}

.catc-head {
  width: 38px;
  height: 28px;
  border-radius: 55% 55% 50% 50%;
  position: absolute;
  top: 7px;
  left: 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.catc-ear {
  width: 17px;
  height: 22px;
  border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
  position: absolute;
  z-index: 1;
}
.catc-ear-l {
  transform: rotateZ(-45deg);
  top: 1px;
  left: 4px;
}
.catc-ear-r {
  transform: rotateZ(20deg);
  top: 3px;
  left: 25px;
}

.catc-iear {
  width: 12px;
  height: 21px;
  border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
  background-color: var(--rose-light);
  margin-left: 3px;
  margin-top: 2px;
}

.catc-eye {
  width: 14px;
  height: 11px;
  border-radius: 60%;
  background-color: #f2e9ec;
  position: absolute;
  top: 9px;
}
.catc-eye-l {
  left: 4px;
}
.catc-eye-r {
  left: 20px;
}

.catc-lid {
  height: 60%;
  width: 100%;
  position: absolute;
  z-index: 10;
  margin-top: -1px;
  border-radius: 100% 100% 10% 10%;
  animation: catc-blink 6s ease-in-out infinite;
}
.catc-lid-l {
  animation-delay: 6s;
}
.catc-lid-r {
  animation-delay: 6.05s;
}

.catc-pupil {
  width: 5px;
  height: 8px;
  background-color: var(--bg);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 4px;
  z-index: 5;
}

.catc-body {
  width: 44px;
  height: 24px;
  border-radius: 50% / 80% 80% 50% 50%;
  position: absolute;
  top: 29px;
  left: 2px;
  z-index: 1;
}

.catc-foot {
  height: 28%;
  width: 30%;
  position: absolute;
  top: 72%;
  border-radius: 100% 100% 70% 70%;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.25);
}
.catc-foot-l {
  left: 8%;
  animation: catc-step 9s ease-in-out infinite;
  animation-delay: 7.4s;
}
.catc-foot-r {
  left: 58%;
  animation: catc-step 9s ease-in-out infinite;
  animation-delay: 8s;
}

.catc-tail {
  position: absolute;
  top: 43px;
  left: 38px;
}
.catc-tail span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: catc-tail-wave 3s ease-in-out infinite;
}

@keyframes catc-blink {
  0% {
    height: 60%;
  }
  1% {
    height: 100%;
  }
  2% {
    height: 100%;
  }
  3% {
    height: 60%;
  }
  100% {
    height: 60%;
  }
}

@keyframes catc-step {
  0% {
    transform: translateY(0);
  }
  1% {
    transform: translateY(-2px);
  }
  2.5% {
    transform: translateY(-2px);
  }
  4% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes catc-tail-wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
.logo span {
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
}
.site-header.home-header .logo {
  font-size: 1.4rem;
}
.site-header.home-header .logo span {
  font-size: 1.1rem;
}

/* Nav desktop */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: "Akatab", sans-serif;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition:
    color 0.2s,
    background 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-link.active {
  color: var(--rose-light);
  background: rgba(183, 83, 116, 0.1);
}

.badge-count {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-left: 0.5rem;
}

/* Language switcher */
.lang-switcher {
  font-size: 0.72rem;
  font-family: "Akatab", sans-serif;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.lang-switcher:hover {
  color: var(--rose-light);
  border-color: var(--rose);
}

/* Contrast toggle button */
.contrast-btn {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.contrast-btn:hover {
  color: var(--rose-light);
  border-color: var(--rose);
}
.contrast-btn.active {
  color: var(--text);
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* Install PWA button */
.install-btn {
  font-size: 0.78rem;
  font-family: "Akatab", sans-serif;
  color: var(--rose-light);
  background: rgba(183, 83, 116, 0.12);
  border: 1px solid rgba(183, 83, 116, 0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s;
  margin-left: 0.5rem;
}
.install-btn:hover {
  background: rgba(183, 83, 116, 0.22);
  border-color: rgba(183, 83, 116, 0.6);
}

/* iOS install tip */
.install-ios-wrap {
  position: relative;
  margin-left: 0.5rem;
}

.install-ios-tip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.9rem 1rem;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.2s both;
}

.install-ios-tip::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 18px;
  width: 9px;
  height: 9px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

.install-ios-tip p {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.55;
  padding-right: 1.2rem;
}

.install-ios-tip p strong {
  color: var(--rose-light);
}

.install-ios-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem 0.3rem;
  line-height: 1;
}

/* Back button */
.back-btn {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.back-btn:hover {
  color: var(--gold);
}

/* Hamburger (mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.nav-burger:hover {
  border-color: var(--rose);
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: all 0.25s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Menu mobile */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0.25rem;
  animation: fadeUp 0.2s both;
}
.nav-mobile .nav-link {
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
}
.nav-mobile .install-btn,
.nav-mobile .install-ios-wrap {
  margin-left: 0;
  align-self: flex-start;
}

.header-sep {
  color: var(--border);
  margin: 0 0.5rem;
}

/* ── Hero ── */
.hero {
  padding: 6rem 4rem 4rem;
  max-width: 700px;
}

.hero h1 {
  font-family: "Alexandria", serif;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
}

/* ── Filter bar ── */
.filter-bar {
  padding: 0 4rem 3rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-family: "Akatab", sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background: rgba(233, 150, 177, 0.06);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  min-width: 220px;
}

.search-icon {
  font-size: 0.8rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: "Akatab", sans-serif;
  font-size: 0.85rem;
  width: 100%;
}
.search-input::placeholder {
  color: var(--muted);
}

.search-empty {
  padding: 3rem 4rem 6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Grid ── */
.grid {
  padding: 0 4rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  cursor: pointer;
  transition:
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s both;
  text-decoration: none;
  display: block;
  color: inherit;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at top left,
    rgba(201, 169, 110, 0.04),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  border-color: rgba(201, 169, 110, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  opacity: 1;
}

/* Category accent gradients — Panacotta palette (fallback visual, no photo yet) */
.cat-repro .card-visual-fallback {
  background: linear-gradient(135deg, rgba(183, 83, 116, 0.28), rgba(183, 83, 116, 0.05));
}
.cat-genetique .card-visual-fallback {
  background: linear-gradient(135deg, rgba(109, 59, 76, 0.55), rgba(109, 59, 76, 0.1));
}
.cat-chatons .card-visual-fallback {
  background: linear-gradient(135deg, rgba(201, 122, 58, 0.28), rgba(201, 122, 58, 0.05));
}
.cat-sante .card-visual-fallback {
  background: linear-gradient(135deg, rgba(74, 127, 168, 0.28), rgba(74, 127, 168, 0.05));
}
.cat-admin .card-visual-fallback {
  background: linear-gradient(135deg, rgba(233, 150, 177, 0.22), rgba(233, 150, 177, 0.05));
}
.cat-reference .card-visual-fallback {
  background: linear-gradient(135deg, rgba(156, 120, 130, 0.28), rgba(156, 120, 130, 0.05));
}

/* Visual header — shared by photo cards and icon-fallback cards, so every
   card in the grid keeps the same height whether or not it has a photo yet. */
.card-visual {
  position: relative;
  width: calc(100% + 3.5rem);
  height: 140px;
  margin: -1.75rem -1.75rem 1.2rem;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.card-visual-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-visual-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-visual-icon {
  font-size: 2.75rem;
  line-height: 1;
}

.card-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card h2 {
  font-family: "Alexandria", serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.card-footer {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-tag {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.open-btn {
  font-size: 0.8rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s;
}

.card:hover .open-btn {
  opacity: 1;
  transform: translateX(0);
}

/* ── Status badge ── */
.status {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-actif {
  background: rgba(90, 138, 106, 0.15);
  color: #7dbb8a;
  border: 1px solid rgba(90, 138, 106, 0.3);
}
.status-actif::before {
  background: #7dbb8a;
  box-shadow: 0 0 6px #7dbb8a;
}

.status-dev {
  background: rgba(212, 136, 74, 0.12);
  color: #e09a5a;
  border: 1px solid rgba(212, 136, 74, 0.3);
}
.status-dev::before {
  background: #e09a5a;
}

.status-planifie {
  background: rgba(122, 120, 112, 0.1);
  color: var(--muted);
  border: 1px solid var(--border);
}
.status-planifie::before {
  background: var(--muted);
}

.status-beta {
  background: rgba(74, 127, 168, 0.12);
  color: #6aaad8;
  border: 1px solid rgba(74, 127, 168, 0.3);
}
.status-beta::before {
  background: #6aaad8;
  animation: blink 1.5s infinite;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.stats {
  display: flex;
  gap: 2rem;
}

.stat {
  text-align: right;
}

.stat-num {
  font-family: "Alexandria", serif;
  font-size: 1.5rem;
  color: var(--gold-light);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Tool page layout ── */
.tool-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.page-hero-image {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-title {
  margin-bottom: 3rem;
}

.page-title .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-title .eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold-light);
}

.page-title h1 {
  font-family: "Alexandria", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
}

.page-title h1 em {
  font-style: italic;
  color: var(--gold);
}

.page-title p {
  color: var(--muted);
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 540px;
}

/* ── Input card ── */
.input-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.input-card h2 {
  font-family: "Alexandria", serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-card h2 .icon {
  width: 36px;
  height: 36px;
  background: rgba(201, 169, 110, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  /* text-transform: uppercase; */
  color: var(--muted);
}

input[type="date"],
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea,
.result-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.8rem 1rem;
  font-family: "Akatab", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="date"],
select {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}
input[type="date"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus,
.result-input:focus {
  border-color: var(--gold);
}
select option {
  background: var(--surface2);
}

.btn-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.calc-btn {
  background: #9a4162;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.9rem 2rem;
  font-family: "Akatab", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.calc-btn:hover {
  background: #7e3350;
  transform: translateY(-1px);
}
.calc-btn:active {
  transform: translateY(0);
}

.reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.5rem;
  color: var(--muted);
  font-family: "Akatab", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.reset-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* ── Two-column parent/reproducteur forms + sections avancées repliables ──
   (utilisées par plusieurs outils — gardées ici, pas dans le CSS d'un outil
   en particulier, pour rester chargées quel que soit le chunk de page) */
.sim-parents-grid {
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
  display: grid;
  margin-bottom: 1.5rem;
}

.sim-section-label {
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sim-advanced-toggle {
  gap: 0.5rem;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0 0.25rem;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  background: none;
  transition: color 0.2s;
}
.sim-advanced-toggle:hover {
  color: var(--text);
}
.sim-advanced-toggle--active {
  color: var(--rose-light);
}

.sim-advanced-arrow {
  font-size: 0.65rem;
}

.sim-advanced-badge {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
}

.health-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(201, 122, 58, 0.08);
  border: 1px solid rgba(201, 122, 58, 0.25);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-top: 1.2rem;
  font-size: 0.83rem;
  color: #e09a5a;
  line-height: 1.55;
}
.health-note-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 0.05rem;
}

/* ── Result cards ── */
.result-section {
  animation: fadeUp 0.4s both;
}

.result-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: "🐱";
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.06;
}

.result-hero .label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.result-hero .main-date {
  font-family: "Alexandria", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold-light);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.result-hero .sub {
  color: var(--muted);
  font-size: 0.9rem;
}
.result-hero .sub strong {
  color: var(--text);
  font-weight: 400;
}

.window-bar {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.window-item .wl {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.window-item .wv {
  font-family: "Alexandria", serif;
  font-size: 1.1rem;
  color: var(--text);
}

/* Progress section */
.progress-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.progress-section h3 {
  font-family: "Alexandria", serif;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 100px;
  height: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 1s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.days-info {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.day-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
}

.day-chip .dc-num {
  font-family: "Alexandria", serif;
  font-size: 1.3rem;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.day-chip .dc-label {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Timeline */
.timeline-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.timeline-section h3 {
  font-family: "Alexandria", serif;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.week-item {
  display: grid;
  grid-template-columns: 60px 1fr;
}

.week-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 1.2rem;
}

.week-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 0.2rem;
  z-index: 1;
  transition: all 0.3s;
}

.week-dot.past {
  background: var(--green);
  border-color: var(--green);
}
.week-dot.current {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.5);
}

.week-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 2px 0;
}
.week-line.filled {
  background: var(--green);
}
.week-item:last-child .week-line {
  display: none;
}

.week-content {
  padding: 0 0 1.8rem 0;
}

.week-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.week-num {
  font-family: "Alexandria", serif;
  font-size: 0.9rem;
  color: var(--muted);
}
.week-num.current-label {
  color: var(--gold);
}
.week-num.past-label {
  color: var(--green-light);
}

.week-date {
  font-size: 0.8rem;
  color: var(--muted);
}
.week-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.3rem;
}

.week-badge {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.badge-current {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.3);
}
.badge-past {
  background: rgba(90, 138, 106, 0.1);
  color: var(--green-light);
  border: 1px solid rgba(90, 138, 106, 0.2);
}

/* Tips grid */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.tip-card .tip-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  display: block;
}
.tip-card h4 {
  font-family: "Alexandria", serif;
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}
.tip-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Actions row */
.actions-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  color: var(--muted);
  font-family: "Akatab", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Landing (home) ── */
.landing {
  overflow-x: clip;
}

@keyframes lp-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}

@keyframes lp-marquee {
  to { transform: translateX(-50%); }
}

/* Hero */
.lp-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 7rem;
  isolation: isolate;
}

.lp-hero-dots {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(233, 150, 177, 0.28) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: 10% 15%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(183, 83, 116, 0.22), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.lp-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 980px;
  animation: fadeUp 0.7s both;
}

.lp-eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(31, 17, 24, 0.7);
  color: var(--rose-light);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.lp-hero-title {
  font-family: "Alexandria", serif;
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 2rem;
  text-shadow: 0 8px 40px rgba(22, 12, 16, 0.8);
}

.lp-hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--rose-light), var(--rose) 60%, var(--rose-light));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: none;
}

.lp-hero-lead {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  color: var(--text);
  opacity: 0.82;
  font-size: 1.15rem;
  line-height: 1.7;
}

.lp-cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.8rem;
  border-radius: 100px;
  font-family: "Alexandria", serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lp-btn:hover {
  transform: translateY(-2px);
}

.lp-btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 10px 30px rgba(183, 83, 116, 0.35);
}

.lp-btn-primary:hover {
  background: var(--rose-light);
  color: var(--bg);
}

.lp-btn-ghost {
  background: rgba(31, 17, 24, 0.7);
  color: var(--text);
  border: 1px solid var(--border);
}

.lp-btn-ghost:hover {
  border-color: var(--rose-light);
}

.lp-scroll {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
}

.lp-scroll span {
  display: inline-block;
  animation: lp-float 2s ease-in-out infinite;
}

/* Cartes flottantes */
.lp-floats {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.lp-float {
  position: absolute;
  width: 240px;
  display: flex;
  flex-direction: column;
  background: rgba(31, 17, 24, 0.88);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: lp-float 7s ease-in-out infinite;
  transition: border-color 0.25s, opacity 0.25s;
  opacity: 0.7;
}

.lp-float:hover {
  border-color: var(--rose-light);
  opacity: 1;
}

.lp-float img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.lp-float-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem 1rem;
}

.lp-float-cat {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-light);
}

.lp-float-title {
  font-family: "Alexandria", serif;
  font-size: 0.95rem;
  line-height: 1.3;
}

.lp-float-1 { top: 8%;  left: 4%;   --rot: -4deg; animation-delay: 0s; }
.lp-float-2 { top: 14%; right: 5%;  --rot: 3deg;  animation-delay: -2s; }
.lp-float-3 { bottom: 10%; left: 9%; --rot: 3deg; animation-delay: -4s; width: 210px; }
.lp-float-4 { bottom: 6%; right: 10%; --rot: -3deg; animation-delay: -1s; }
.lp-float-5 { top: 44%; left: -2%;  --rot: 2deg;  animation-delay: -5s; width: 190px; }
.lp-float-6 { top: 50%; right: -1%; --rot: -2deg; animation-delay: -3s; width: 200px; }

/* Sections communes */
.lp-section {
  padding: 7rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.lp-h2 {
  font-family: "Alexandria", serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.lp-lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 560px;
}

.lp-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: start;
}

/* Piliers */
.lp-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lp-pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
}

.lp-pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(183, 83, 116, 0.18);
  font-size: 1.2rem;
  margin-bottom: 1.1rem;
}

.lp-pillar h3 {
  font-family: "Alexandria", serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.lp-pillar p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Catégories */
.lp-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
}

.lp-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  text-align: left;
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: "Akatab", sans-serif;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.lp-cat::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.lp-cat > * {
  position: relative;
  z-index: 1;
}

.lp-cat.cat-repro::before     { background: linear-gradient(135deg, rgba(183, 83, 116, 0.22), transparent 60%); }
.lp-cat.cat-genetique::before { background: linear-gradient(135deg, rgba(138, 106, 184, 0.22), transparent 60%); }
.lp-cat.cat-chatons::before   { background: linear-gradient(135deg, rgba(201, 122, 58, 0.22), transparent 60%); }
.lp-cat.cat-sante::before     { background: linear-gradient(135deg, rgba(74, 127, 168, 0.22), transparent 60%); }
.lp-cat.cat-admin::before     { background: linear-gradient(135deg, rgba(233, 150, 177, 0.18), transparent 60%); }
.lp-cat.cat-reference::before { background: linear-gradient(135deg, rgba(156, 120, 130, 0.22), transparent 60%); }

.lp-cat:hover {
  border-color: var(--rose-light);
  transform: translateY(-3px);
}

.lp-cat-icons {
  display: flex;
  gap: 0.35rem;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.lp-cat-name {
  font-family: "Alexandria", serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.lp-cat-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

.lp-cat-count {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--rose-light);
  letter-spacing: 0.04em;
}

/* Carrousel */
.lp-featured {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.lp-marquee {
  margin-top: 3rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.lp-marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: lp-marquee 60s linear infinite;
}

.lp-marquee:hover .lp-marquee-track,
.lp-marquee:focus-within .lp-marquee-track {
  animation-play-state: paused;
}

.lp-slide {
  position: relative;
  width: 300px;
  height: 380px;
  flex-shrink: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: #fff;
  transition: border-color 0.25s;
}

.lp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.lp-slide:hover {
  border-color: var(--rose-light);
}

.lp-slide:hover img {
  transform: scale(1.05);
}

.lp-slide-body {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 3.5rem 1.4rem 1.4rem;
  background: linear-gradient(transparent, rgba(22, 12, 16, 0.92) 55%);
}

.lp-slide-cat {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-light);
}

.lp-slide-title {
  font-family: "Alexandria", serif;
  font-size: 1.15rem;
  line-height: 1.3;
}

/* Catalogue */
.lp-catalog {
  scroll-margin-top: 72px;
  padding-top: 5rem;
  border-top: 1px solid var(--border);
}

.lp-catalog-head {
  padding: 0 4rem 2.5rem;
}

/* FAQ */
.lp-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lp-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: border-color 0.2s;
}

.lp-faq-item[open] {
  border-color: var(--burgundy);
}

.lp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.02rem;
}

.lp-faq-item summary::-webkit-details-marker {
  display: none;
}

.lp-faq-plus {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rose);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.25s;
}

.lp-faq-item[open] .lp-faq-plus {
  transform: rotate(45deg);
}

.lp-faq-item p {
  padding: 0 1.5rem 1.4rem;
  color: var(--muted);
  line-height: 1.7;
}

/* CTA final */
.lp-final {
  position: relative;
  isolation: isolate;
  padding: 9rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lp-final-title {
  font-family: "Alexandria", serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.lp-final .lp-btn {
  margin-top: 1.5rem;
}

/* Contraste élevé : pas d'effets décoratifs */
html.high-contrast .lp-hero-dots,
html.high-contrast .lp-hero::before,
html.high-contrast .lp-floats {
  display: none;
}

html.high-contrast .lp-hero-title em {
  background: none;
  color: var(--text);
}

html.high-contrast .lp-hero-title {
  text-shadow: none;
}

@media (max-width: 1599px) {
  .lp-float-5,
  .lp-float-6 {
    display: none;
  }
}

@media (max-width: 1100px) {
  .lp-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .lp-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .lp-floats {
    display: none;
  }
  .lp-hero {
    min-height: auto;
    padding: 5rem 1.5rem 7rem;
  }
  .lp-hero-lead {
    font-size: 1rem;
  }
  .lp-section {
    padding: 5rem 1.5rem;
  }
  .lp-featured {
    padding-left: 0;
    padding-right: 0;
  }
  .lp-catalog-head {
    padding: 0 1.5rem 2rem;
  }
  .lp-pillar-grid,
  .lp-cat-grid {
    grid-template-columns: 1fr;
  }
  .lp-slide {
    width: 240px;
    height: 310px;
  }
  .lp-final {
    padding: 6rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-float,
  .lp-scroll span {
    animation: none;
  }
  .lp-marquee {
    overflow-x: auto;
  }
  .lp-marquee-track {
    animation: none;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero,
  .filter-bar,
  .grid,
  .site-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 1rem;
  }

  /* Basculer vers le menu hamburger */
  .site-nav {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-mobile {
    display: flex;
  }
}

@media (max-width: 640px) {
  .tool-main {
    padding: 2rem 1.5rem 4rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .tips-grid {
    grid-template-columns: 1fr;
  }
  .input-card,
  .result-hero,
  .progress-section,
  .timeline-section,
  .tip-card {
    padding: 1.5rem;
  }
}

@media print {
  /* N'imprime que le contenu généré (marqué .print-content), jamais le
     header, les formulaires, la nav ou le reste de la page. */
  body * {
    visibility: hidden;
  }
  .print-content,
  .print-content * {
    visibility: visible;
  }
  .print-content {
    position: absolute;
    inset: 0;
    width: 100%;
  }
  body {
    background: white;
  }
  .print-content * {
    background: transparent !important;
    color: #111 !important;
    border-color: #ccc !important;
    box-shadow: none !important;
  }
}

/* ── Lien de partage : vue allégée (résultat seul) ── */
.shared-result-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   Sources Section
══════════════════════════════════════════════════════════════ */
.sources-section {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.sources-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
  font-family: "Akatab", sans-serif;
}
.sources-icon {
  font-size: 1rem;
}
.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.source-item {
  display: flex;
  gap: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.6;
}
.source-bullet {
  color: var(--rose);
  flex-shrink: 0;
  margin-top: 0.05em;
}
.source-item strong {
  color: var(--text);
  font-weight: 500;
}
.source-detail {
  color: var(--muted);
}
.contributors-header {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Feedback Modal ───────────────────────────────────────────────────────── */
.feedback-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition:
    color 0.15s,
    text-decoration-color 0.15s;
}

.feedback-link:hover {
  color: var(--rose-light);
  text-decoration-color: var(--rose-light);
}

/* ── Feedback FAB (bouton flottant toutes pages) ── */
.feedback-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.feedback-fab:hover {
  background: var(--burgundy);
  border-color: var(--rose);
  transform: scale(1.08);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(22, 12, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feedback-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feedback-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feedback-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.feedback-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.feedback-modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.feedback-type-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.feedback-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
  gap: 0.75rem;
}

.feedback-sent-icon {
  font-size: 2.5rem;
}

.feedback-sent p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 480px) {
  .feedback-modal {
    padding: 1.5rem 1.25rem;
  }
}
/* ── Credits modal ───────────────────────────────────────────────────────── */
.credits-intro {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.credits-subheading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.credits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.credits-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.credits-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.credits-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rose-light);
  text-decoration: none;
  transition: color 0.15s;
}

.credits-name:hover {
  color: var(--text);
  text-decoration: underline;
}

.credits-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

.credits-license {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}
/* ── Page 404 ── */
.notfound-section {
  text-align: center;
  padding: 4rem 1rem 6rem;
}

.notfound-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.notfound-code {
  font-family: "Alexandria", serif;
  font-size: clamp(3.5rem, 10vw, 6rem);
  color: var(--rose);
  line-height: 1;
  margin-bottom: 1.25rem;
}

.notfound-section h1 {
  font-family: "Alexandria", serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.notfound-section p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 440px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.notfound-cta-row {
  display: flex;
  justify-content: center;
}

.notfound-cta {
  text-decoration: none;
}
