@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  color-scheme: only light !important;
  --ink: #433747;
  --muted: #827a8d;
  --rose: #d9708c;
  --rose-deep: #bf5776;
  --rose-pale: #fce5ec;
  --blue: #5e9ce1;
  --blue-deep: #397bc7;
  --blue-pale: #e2effe;
  --lavender: #ac98bd;
  --paper: #fffaf8;
  --line: #f1dce3;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { color-scheme: only light !important; background-color: var(--paper); }
button, input { color-scheme: only light !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.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; }

.site-header {
  height: 67px;
  padding: 0 clamp(18px, 3.3vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,250,248,.94);
  border-bottom: 1px solid rgba(230,203,213,.55);
  position: relative;
  z-index: 5;
}
.wordmark { color: var(--rose); font: 700 27px/1 var(--serif); text-decoration: none; letter-spacing: -.03em; }
.main-nav { display: flex; align-items: center; gap: 12px; }
.nav-link, .nav-search { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 999px; padding: 0 19px; color: #837887; background: transparent; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.nav-link:hover, .nav-search:hover { color: var(--rose-deep); background: #fff0f4; }
.nav-link.is-active, .nav-search.is-open { color: var(--rose-deep); background: #fbe5eb; }
.nav-sparkle { color: #efad77; font-size: 17px; }
.nav-search svg, .search-field-wrap > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.global-search-panel { position: absolute; z-index: 4; top: 67px; inset-inline: 0; padding: 22px 20px 25px; background: rgba(255,250,248,.98); border-bottom: 1px solid var(--line); box-shadow: 0 18px 35px #56425a12; }
.global-search-form { max-width: 760px; margin: 0 auto; }
.search-field-wrap { display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 0 19px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; box-shadow: 0 7px 24px #63506a08; color: var(--rose); }
.search-field-wrap:focus-within { border-color: #e8a2b5; box-shadow: 0 0 0 4px #f5dfe7; }
.search-field-wrap input { width: 100%; min-width: 0; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-field-wrap input::placeholder { color: #a19aa6; }
.search-submit { flex: none; border: 0; border-radius: 999px; padding: 10px 16px; background: #f7e5eb; color: var(--rose-deep); font-weight: 600; cursor: pointer; }
.search-submit:hover { background: var(--rose); color: white; }
.suggestions { position: relative; z-index: 4; max-height: 300px; margin: 7px 18px 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #f0e2e7; border-radius: 17px; background: white; box-shadow: 0 15px 32px #49384b12; }
.suggestion-option { width: 100%; min-height: 46px; padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid #f5edf0; text-align: start; background: white; cursor: pointer; }
.suggestion-option:last-child { border-bottom: 0; }
.suggestion-option:hover, .suggestion-option:focus-visible { background: #fff4f6; outline: 0; }
.suggestion-name { color: var(--ink); font-weight: 600; }
.suggestion-hebrew { color: var(--muted); font-size: 14px; }
.suggestion-gender { color: var(--rose-deep); font-size: 12px; }

main { min-height: calc(100vh - 124px); }
.page { min-height: calc(100vh - 124px); padding-bottom: 64px; background: linear-gradient(180deg, #fbf0f4 0%, #eef5fd 43%, #fffaf7 100%); }
.inspiration-page { display: flex; flex-direction: column; align-items: center; padding-top: clamp(33px, 5vw, 62px); }
.hero-copy { max-width: 600px; text-align: center; padding: 0 22px; }
h1, h2, p { margin-top: 0; }
.hero-copy h1.site-title { max-width: 800px; margin: 0 auto 8px; color: #cf6484; font: 600 clamp(24px, 4.2vw, 43px)/1.4 var(--sans); letter-spacing: .015em; text-wrap: balance; }
.hero-description { max-width: 555px; margin: 0 auto; color: #888193; font-size: 17px; line-height: 1.75; }
.inspiration-controls { display: flex; flex-direction: column; align-items: center; margin-top: 34px; }
.dice-stage { width: 180px; height: 180px; perspective: 760px; display: grid; place-items: center; position: relative; }
.dice-shadow { position: absolute; width: 112px; height: 26px; bottom: 13px; border-radius: 50%; background: #64507624; filter: blur(15px); transition: transform .3s, opacity .3s; }
.dice { --dice-main: #baa9c9; --dice-light: #cebeda; --dice-dark: #a28eaf; appearance: none; width: 132px; height: 132px; padding: 0; border: 0; position: relative; z-index: 1; color: inherit; background: transparent; cursor: pointer; transform-style: preserve-3d; transition: filter .25s; }
.dice:hover { filter: brightness(1.035); }
.dice:focus-visible { outline: 3px solid #438fee; outline-offset: 5px; border-radius: 26px; }
.dice[data-gender="féminin"] { --dice-main: #ed91ad; --dice-light: #f4abc0; --dice-dark: #dc7798; }
.dice[data-gender="masculin"] { --dice-main: #70adeb; --dice-light: #8bbcf0; --dice-dark: #5597df; }
.dice[data-gender="mixte"] { --dice-main: #baa9c9; --dice-light: #cebeda; --dice-dark: #a28eaf; }
.dice-cube { width: 132px; height: 132px; position: relative; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(-28deg); }
.dice-face { position: absolute; width: 132px; height: 132px; inset: 0; padding: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border: 1px solid #ffffff70; border-radius: 23px; color: #fff; text-align: center; backface-visibility: hidden; background: var(--dice-main); box-shadow: inset 0 1px 2px #ffffff55, inset 0 -5px 12px #4e3e6230; }
.face-front { transform: rotateY(0deg) translateZ(66px); }
.face-right { transform: rotateY(90deg) translateZ(66px); background: var(--dice-light); }
.face-back { transform: rotateY(180deg) translateZ(66px); background: var(--dice-dark); }
.face-left { transform: rotateY(-90deg) translateZ(66px); background: var(--dice-light); }
.face-top { transform: rotateX(90deg) translateZ(66px); background: color-mix(in srgb, var(--dice-light) 82%, white); }
.face-bottom { transform: rotateX(-90deg) translateZ(66px); background: var(--dice-dark); }
.face-name { max-width: 100%; font: 700 clamp(16px, 2vw, 20px)/1.13 var(--serif); overflow-wrap: anywhere; }
.face-hebrew { font-size: 14px; opacity: .88; }
.dice[data-gender="masculin"] + .dice-shadow, .dice[data-gender="féminin"] + .dice-shadow { opacity: .85; }
.dice-stage:has(.dice[data-gender="féminin"]) .dice-shadow { background: #d9708c42; }
.dice-stage:has(.dice[data-gender="masculin"]) .dice-shadow { background: #4b8fd442; }
.gender-picker { display: flex; align-items: center; gap: 10px; margin-top: 15px; }
.gender-choice { min-height: 46px; padding: 0 18px; border: 1.5px solid #efd5de; border-radius: 999px; background: #fff; color: #574959; font-weight: 600; cursor: pointer; transition: .2s; }
.gender-choice span[aria-hidden] { margin-inline-end: 5px; color: #cf8ba3; font-size: 17px; }
.gender-choice:hover { transform: translateY(-1px); border-color: #e39ab1; }
.gender-choice[data-gender-choice="féminin"].is-active { color: #fff; border-color: #e9789d; background: #e9789d; }
.gender-choice[data-gender-choice="masculin"].is-active { color: #fff; border-color: #5d9fe7; background: #5d9fe7; }
.gender-choice[data-gender-choice="all"].is-active { color: #fff; border-color: #d9708c; background: #d9708c; }
.gender-choice.is-active span[aria-hidden] { color: inherit; }
.roll-button { min-height: 61px; margin-top: 18px; padding: 0 34px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(110deg, #e89fbe 0%, #91baf0 100%); box-shadow: 0 12px 23px #8a83b42d; font-size: 17px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s, filter .2s; }
.roll-button:hover { transform: translateY(-2px); box-shadow: 0 15px 28px #8a83b43b; filter: saturate(1.08); }
.roll-button:disabled { cursor: wait; opacity: .8; }
.roll-icon { font-size: 20px; }
.database-count { min-height: 20px; margin: 27px 0 0; color: #858091; font-size: 13px; text-align: center; }
.result-area { width: min(650px, calc(100% - 34px)); margin-top: 29px; }
.name-card { --card-accent: #d9708c; --card-border: #f4b8c9; position: relative; padding: 26px 28px 28px; overflow: hidden; border: 1.5px solid var(--card-border); border-radius: 26px; background: rgba(255,255,255,.95); box-shadow: 0 16px 45px #59425813; animation: card-in .45s both; }
.name-card.gender-masculin { --card-accent: #4d92dc; --card-border: #acd2fa; }
.name-card.gender-féminin { --card-accent: #e96891; --card-border: #f6b4c8; }
.name-card.gender-mixte { --card-accent: #9a83b0; --card-border: #d6c6e1; }
.card-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 13px; }
.card-name { margin: 0; color: #504251; font: 700 clamp(31px, 4vw, 43px)/1.08 var(--serif); }
.card-hebrew { margin: 2px 0 10px; color: #8a8191; font: 400 25px/1.2 var(--sans); }
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 12px; border-radius: 999px; color: #fff; background: var(--card-accent); font-size: 12px; line-height: 1.2; }
.badge.origin { color: #887c8c; background: #f8eff2; }
.card-section { margin-top: 17px; }
.card-section h3 { margin: 0 0 4px; color: var(--card-accent); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.card-section p { margin: 0; color: #514958; font-size: 15px; line-height: 1.65; }
.symbol-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 0; padding: 0; list-style: none; }
.symbol-tags li { padding: 6px 10px; border-radius: 999px; color: #776481; background: #f5eff8; font-size: 12px; }
.spelling-tags li { border: 1px solid color-mix(in srgb, var(--card-accent) 24%, white); color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 8%, white); }
.roll-again-hint { margin: 13px 0 0; color: #9a909e; font-size: 12px; }

.names-page { padding: 42px clamp(18px, 4vw, 56px) 74px; }
.catalogue-heading { max-width: 720px; margin: 0 auto 23px; text-align: center; }
.eyebrow { margin: 0 0 7px; color: var(--rose); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.catalogue-heading h1 { margin: 0; color: #433747; font: 700 clamp(29px, 3.3vw, 38px)/1.2 var(--serif); }
.catalogue-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.catalogue-search { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.catalogue-search .search-field-wrap { min-height: 60px; border-radius: 999px; }
.catalogue-search .icon-submit { width: 40px; height: 40px; padding: 9px; display: grid; place-items: center; color: var(--rose-deep); background: #fbe8ed; }
.catalogue-search .icon-submit svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.catalogue-search .suggestions { position: absolute; inset-inline: 0; margin: 7px 18px 0; }
.catalogue-toolbar { max-width: 1200px; margin: 23px auto 13px; padding: 0 3px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.catalogue-count { margin: 0; color: #83798a; font-size: 13px; }
.load-more { min-height: 44px; margin: 24px auto 0; padding: 0 20px; display: block; border: 1px solid #ebd3dc; border-radius: 999px; color: var(--rose-deep); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s; }
.load-more:hover { transform: translateY(-1px); background: #fff0f4; }
.clear-search { padding: 7px 12px; border: 1px solid #ecd9e0; border-radius: 999px; color: #8b6373; background: #fff; font-size: 12px; cursor: pointer; }
.clear-search:hover { border-color: #dd9bad; background: #fff3f6; }
.name-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.name-card.catalogue-card { padding: 21px 21px 20px; border-radius: 21px; }
.catalogue-card .card-name { font-size: 27px; }
.catalogue-card .card-hebrew { font-size: 20px; }
.catalogue-card .card-topline { margin-bottom: 9px; }
.catalogue-card .card-section { margin-top: 11px; }
.catalogue-card .card-section p { font-size: 13px; line-height: 1.55; }
.catalogue-card .card-section h3 { font-size: 10px; }
.catalogue-card .symbol-tags { margin-top: 7px; }
.catalogue-card .symbol-tags li { padding: 5px 8px; font-size: 11px; }
.empty-state { max-width: 600px; margin: 54px auto; color: var(--muted); text-align: center; line-height: 1.7; }
.site-footer { min-height: 84px; padding: 16px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid #f0e1e6; color: #827889; background: #fffaf8; font-size: 12px; text-align: center; }
.footer-star { align-self: flex-start; margin-top: 3px; color: #dd8ea6; font-size: 17px; }
.footer-verse { max-width: 850px; }
.footer-verse p { margin: 0; line-height: 1.55; }
.verse-hebrew { color: #b86783; font-family: var(--sans); font-size: 15px; }
.verse-translation { margin-top: 2px !important; }
.verse-source { display: inline-block; margin-top: 4px; color: #a7788a; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; }

@keyframes card-in { from { opacity: 0; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
html[dir="rtl"] .site-header { direction: rtl; }
html[dir="rtl"] .search-field-wrap input { text-align: right; }
html[dir="rtl"] .search-submit.icon-submit svg { transform: rotate(180deg); }
html[dir="rtl"] .card-topline { direction: rtl; }
html[dir="rtl"] .gender-choice { direction: rtl; }
html[dir="rtl"] .nav-search { direction: rtl; }

@media (max-width: 820px) {
  .name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspiration-page { padding-top: 35px; }
  .inspiration-controls { margin-top: 27px; }
  .names-page { padding-top: 34px; }
}
@media (max-width: 680px) {
  .site-header { height: 61px; padding-inline: 14px; }
  .wordmark { font-size: 23px; }
  .main-nav { gap: 2px; }
  .nav-link, .nav-search { min-height: 38px; padding-inline: 9px; gap: 5px; font-size: 12px; white-space: nowrap; }
  .nav-search svg { width: 17px; }
  .global-search-panel { top: 61px; }
}
@media (min-width: 640px) {
  .inspiration-page.has-result {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    column-gap: clamp(12px, 2.3vw, 30px);
    align-content: start;
    justify-content: center;
    padding-inline: clamp(12px, 2.5vw, 38px);
  }
  .inspiration-page.has-result .hero-copy { grid-column: 1 / -1; justify-self: center; }
  .inspiration-page.has-result .inspiration-controls { grid-column: 1; grid-row: 2; min-width: 0; }
  .inspiration-page.has-result .result-area { grid-column: 2; grid-row: 2; align-self: start; width: 100%; margin-top: 28px; }
  .inspiration-page.has-result .gender-picker { gap: 6px; }
  .inspiration-page.has-result .gender-choice { min-height: 41px; padding-inline: clamp(9px, 1.3vw, 17px); font-size: 13px; }
  .inspiration-page.has-result .roll-button { min-height: 53px; padding-inline: clamp(17px, 2.3vw, 30px); font-size: 15px; }
  .inspiration-page.has-result .database-count { max-width: 290px; line-height: 1.5; }
  .inspiration-page.has-result .name-card { padding: clamp(19px, 2.7vw, 28px); }
}
@media (max-width: 560px) {
  .site-header { height: 61px; padding: 0 14px; }
  .wordmark { font-size: 24px; }
  .main-nav { gap: 2px; }
  .nav-link, .nav-search { min-height: 39px; padding: 0 10px; gap: 5px; font-size: 12px; }
  .nav-search svg { width: 17px; }
  .global-search-panel { top: 61px; padding: 15px 12px 18px; }
  .global-search-form .search-field-wrap { padding-inline: 13px; gap: 9px; }
  .global-search-form .search-submit { padding: 9px 11px; font-size: 12px; }
  .site-footer { padding-inline: 13px; font-size: 11px; }
  .page { min-height: calc(100vh - 115px); }
  .inspiration-page { padding-top: 32px; }
  .hero-hebrew { font-size: 43px; }
  .hero-copy h1.site-title { max-width: 520px; margin-bottom: 8px; font-size: clamp(22px, 4.1vw, 28px); }
  .hero-description { font-size: 14px; line-height: 1.65; }
  .inspiration-controls { margin-top: 18px; }
  .dice-stage { transform: scale(.9); margin: -7px 0; }
  .gender-picker { gap: 6px; margin-top: 11px; }
  .gender-choice { min-height: 42px; padding: 0 13px; font-size: 13px; }
  .roll-button { min-height: 53px; margin-top: 15px; font-size: 15px; }
  .database-count { margin-top: 18px; font-size: 11px; }
  .result-area { margin-top: 22px; }
  .name-card { padding: 22px 21px; border-radius: 22px; }
  .names-page { padding: 29px 14px 54px; }
  .catalogue-heading { margin-bottom: 17px; }
  .catalogue-heading > p:last-child { font-size: 13px; }
  .catalogue-search .search-field-wrap { min-height: 53px; padding: 0 14px; gap: 9px; }
  .catalogue-search .search-field-wrap input { font-size: 14px; }
  .catalogue-toolbar { margin-top: 17px; }
  .name-grid { grid-template-columns: 1fr; gap: 11px; }
  .name-card.catalogue-card { padding: 19px; }
  .site-footer { font-size: 11px; }
}
@media (max-width: 440px) {
  .site-header { padding-inline: 10px; gap: 5px; }
  .wordmark { flex: none; font-size: 22px; }
  .main-nav { flex: none; gap: 0; }
  .nav-link, .nav-search { padding-inline: 7px; gap: 4px; font-size: 11px; }
  .nav-search { width: 34px; padding: 0; }
  .nav-search span { display: none; }
}
@media (max-width: 360px) {
  .wordmark { font-size: 20px; }
  .nav-link, .nav-search { padding-inline: 5px; font-size: 10px; }
  .nav-search { width: 30px; padding: 0; }
  .nav-link[data-page-link="prenoms"] { font-size: 0; }
  .nav-link[data-page-link="prenoms"]::after { font-size: 10px; }
  html[data-language="fr"] .nav-link[data-page-link="prenoms"]::after { content: "Noms"; }
  html[data-language="en"] .nav-link[data-page-link="prenoms"]::after { content: "Names"; }
  html[data-language="he"] .nav-link[data-page-link="prenoms"]::after { content: "שמות"; }
}
@media (prefers-color-scheme: dark) {
  :root, html, body { color-scheme: only light !important; }
  body { color: #433747 !important; background-color: #fffaf8 !important; }
  .site-header, .global-search-panel, .site-footer { background-color: #fffaf8 !important; }
  .page { background: linear-gradient(180deg, #fbf0f4 0%, #eef5fd 43%, #fffaf7 100%) !important; }
  .search-field-wrap, .suggestions, .suggestion-option, .name-card,
  .gender-choice:not(.is-active), .load-more, .clear-search { background-color: #fff !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
