/* ovaova.fr/je-t-aime — écrin nuit, accents rose & or.
   Polices système uniquement (CSP: font-src 'self'). */

:root {
  --bg: #050810;
  --card: rgba(255, 255, 255, 0.028);
  --card-border: rgba(255, 255, 255, 0.07);
  --ink: #f3efe8;
  --muted: #98a1b3;
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.35);
  --gold: #f5c97b;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
           "Yu Mincho", "Hiragino Mincho ProN", "Songti SC", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 50% -140px, rgba(251, 113, 133, 0.13), transparent 70%),
    radial-gradient(700px 420px at 85% 8%, rgba(245, 201, 123, 0.05), transparent 70%),
    radial-gradient(1.2px 1.2px at 21% 33%, rgba(255,255,255,0.35), transparent 100%),
    radial-gradient(1px 1px at 67% 12%, rgba(255,255,255,0.28), transparent 100%),
    radial-gradient(1.4px 1.4px at 82% 56%, rgba(255,255,255,0.22), transparent 100%),
    radial-gradient(1px 1px at 39% 74%, rgba(255,255,255,0.25), transparent 100%),
    radial-gradient(1.2px 1.2px at 9% 61%, rgba(255,255,255,0.2), transparent 100%),
    radial-gradient(1px 1px at 54% 45%, rgba(255,255,255,0.18), transparent 100%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- En-tête ---------- */

header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(16px, 4vw, 44px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.35em;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.92;
}
.wordmark img { display: block; height: 38px; width: auto; }
.wordmark:hover { color: var(--rose); opacity: 1; }

details.lang { position: relative; }
details.lang summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 14px;
  user-select: none;
}
details.lang summary::-webkit-details-marker { display: none; }
details.lang summary:hover { color: var(--ink); border-color: var(--rose-soft); }
details.lang[open] summary { color: var(--ink); border-color: var(--rose-soft); }
details.lang nav {
  position: absolute;
  inset-inline-end: 0;
  margin-top: 8px;
  background: #0a0f1c;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 2px;
  z-index: 50;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  max-height: 70vh;
  overflow-y: auto;
}
details.lang nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
details.lang nav a:hover { background: rgba(251, 113, 133, 0.08); color: var(--ink); }
details.lang nav a[aria-current="page"] { color: var(--rose); }

/* ---------- Héros ---------- */

.hero {
  max-width: 760px;
  margin: clamp(24px, 6vh, 64px) auto 0;
  padding: 0 20px;
  text-align: center;
}

.hero .count {
  font-family: var(--serif);
  font-size: clamp(4.2rem, 12vw, 7rem);
  font-weight: 400;
  line-height: 1;
  background: linear-gradient(115deg, var(--rose) 20%, var(--gold) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 10px 0 18px;
}

.hero p.brief-lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 26px 0 12px;
}

ul.consignes {
  list-style: none;
  margin: 0 auto 24px;
  padding: 0;
  width: fit-content;
  max-width: min(88vw, 560px);
  text-align: start;
}
ul.consignes li {
  position: relative;
  padding-inline-start: 22px;
  color: #d7dce6;
  font-size: 0.98rem;
  line-height: 1.8;
}
ul.consignes li::before {
  content: "\2013";
  position: absolute;
  inset-inline-start: 2px;
  font-size: 0.85em;
  color: var(--rose);
  opacity: 0.75;
}

p.credit {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 580px;
  margin: 0 auto 6px;
}

p.disclaimer {
  color: rgba(152, 161, 179, 0.68);
  font-size: 0.76rem;
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
}

/* « OVA » : lien invisible au repos, révélé au survol ou au focus clavier */
a.ova {
  color: inherit;
  text-decoration: none;
}
a.ova:hover,
a.ova:focus-visible {
  color: var(--rose);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero .actions {
  margin: 26px 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

button.pill {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  background: rgba(251, 113, 133, 0.09);
  border: 1px solid var(--rose-soft);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}
button.pill:hover { background: rgba(251, 113, 133, 0.18); transform: translateY(-1px); }

.search-wrap { position: relative; }
input#search {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--card-border);
  padding: 10px 4px;
  width: min(240px, 70vw);
  outline: none;
  transition: border-color 0.25s ease;
}
input#search:focus { border-bottom-color: var(--rose); }
input#search::placeholder { color: var(--muted); }

p.shown {
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 1.2em;
  margin: 10px 0 0;
}

/* ---------- Les idées ---------- */

main {
  max-width: 1240px;
  margin: clamp(28px, 5vh, 56px) auto 0;
  padding: 0 clamp(14px, 3vw, 32px);
}

ul.ideas {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
  column-gap: 16px;
}
@media (min-width: 700px)  { ul.ideas { columns: 2; } }
@media (min-width: 1080px) { ul.ideas { columns: 3; } }

ul.ideas li {
  break-inside: avoid;
  margin: 0 0 16px;
}

button.idea {
  position: relative;
  display: block;
  width: 100%;
  text-align: start;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 15px 38px 15px 18px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}
[dir="rtl"] button.idea { padding: 15px 18px 15px 38px; }

button.idea::after {
  content: "\2665";
  position: absolute;
  inset-inline-end: 14px;
  top: 13px;
  font-size: 0.8rem;
  color: var(--rose);
  opacity: 0;
  transition: opacity 0.25s ease;
}
button.idea:hover {
  border-color: var(--rose-soft);
  background: rgba(251, 113, 133, 0.05);
  transform: translateY(-1px);
}
button.idea:hover::after { opacity: 0.55; }
button.idea.flash { border-color: var(--rose); }

p.noresult {
  display: none;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin: 40px 0;
}

/* ---------- Toast ---------- */

#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: #131a2b;
  color: var(--ink);
  border: 1px solid var(--rose-soft);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 90;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Modale « au hasard » ---------- */

dialog#ideaModal {
  background: transparent;
  border: none;
  padding: 0;
  max-width: min(820px, 92vw);
  color: var(--ink);
}
dialog#ideaModal::backdrop {
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(7px);
}
.modal-card {
  background: #0a0f1c;
  border: 1px solid var(--rose-soft);
  border-radius: 24px;
  padding: clamp(30px, 6vw, 56px);
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.modal-card blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.45;
  margin: 0 0 30px;
}
.modal-card .modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
button.pill.ghost {
  background: transparent;
  border-color: var(--card-border);
  color: var(--muted);
}
button.pill.ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }

/* ---------- Pied de page ---------- */

.cta {
  max-width: 680px;
  margin: clamp(48px, 8vh, 90px) auto 0;
  padding: clamp(26px, 5vw, 40px);
  text-align: center;
  border: 1px solid var(--rose-soft);
  border-radius: 22px;
  background:
    radial-gradient(420px 200px at 50% 0%, rgba(251, 113, 133, 0.09), transparent 75%);
}
.cta h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 22px;
}
.cta p.credit { margin-bottom: 14px; }
a.cta-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0b0f1a;
  background: linear-gradient(115deg, var(--rose), var(--gold));
  border-radius: 999px;
  padding: 12px 30px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}
a.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 34px rgba(251, 113, 133, 0.35);
}

footer.bottom {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 46px 20px 34px;
}
footer.bottom p.disclaimer { margin: 0 auto 7px; }
footer.bottom a { display: inline-block; margin-top: 10px; }
footer.bottom a { color: var(--muted); }
footer.bottom a:hover { color: var(--rose); }

/* ---------- Divers ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

::selection { background: rgba(251, 113, 133, 0.35); }
