/* =========================================================
   NameXName , Design system « Fun & romantique » (V2)
   ========================================================= */

:root {
  --rouge: #C41E4A;
  --rouge-dark: #97123A;
  --rose: #FF4D8D;
  --rose-2: #FF7FB0;
  --rose-soft: #FFDCE8;
  --rose-line: #FFC4D8;
  --cream: #FFF7F3;
  --cream-2: #FFEFE9;
  --ink: #34121F;
  --muted: #97707D;
  --gold: #E8A33D;

  --accent: var(--rose);
  --accent-2: var(--rouge);

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-script: 'Caveat', cursive;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -22px rgba(150, 18, 58, .45);
  --shadow-soft: 0 10px 30px -18px rgba(150, 18, 58, .35);
}

body[data-test="amour"]     { --accent:#FF3D7F; --accent-2:#C41E4A; }
body[data-test="business"]  { --accent:#B7457E; --accent-2:#7E1F52; }
body[data-test="horoscope"] { --accent:#9B5DE5; --accent-2:#6A2FB0; }
body[data-test="amitie"]    { --accent:#FF7A59; --accent-2:#D94A2B; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body); color: var(--ink); background-color: var(--cream);
  background-image:
    radial-gradient(60% 50% at 12% -5%, rgba(255,77,141,.18), transparent 60%),
    radial-gradient(55% 45% at 92% 4%, rgba(255,127,176,.16), transparent 60%),
    radial-gradient(50% 40% at 50% 100%, rgba(196,30,74,.10), transparent 60%);
  background-attachment: fixed; font-size: 1.02rem; line-height: 1.65; margin: 0; overflow-x: hidden;
}

h1, h2, h3, h4, .display-font { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
a { color: var(--rouge); text-decoration: none; }
a:hover { color: var(--rose); }
.script { font-family: var(--font-script); font-weight: 700; color: var(--rose); }
.text-rouge { color: var(--rouge) !important; }
.text-accent { color: var(--accent) !important; }

/* ===================== Logo ===================== */
.brand { display: inline-flex; align-items: center; gap: .42rem; font-family: var(--font-display); font-weight: 600; line-height: 1; padding: 0; user-select: none; }
.brand-tag { background: linear-gradient(160deg, var(--rouge), var(--rouge-dark)); color: #fff; font-size: 1.18rem; font-weight: 600; padding: .28em .6em; border-radius: 12px; box-shadow: 0 6px 14px -8px rgba(150,18,58,.8); }
.brand-tag:first-child { transform: rotate(-3deg); }
.brand-tag:last-child  { transform: rotate(3deg); }
.brand-heart { color: var(--rose); font-size: 1.25rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(255,77,141,.5)); }
.brand:hover .brand-heart { animation: beat .7s ease infinite; }
@keyframes beat { 0%,100%{transform:scale(1)} 30%{transform:scale(1.22)} 60%{transform:scale(.96)} }

/* ===================== Navbar ===================== */
.navbar { background: rgba(255,247,243,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rose-line); padding-top: .55rem; padding-bottom: .55rem; }
.navbar .nav-link { font-weight: 700; color: var(--ink); border-radius: 999px; padding: .35rem .85rem !important; margin: 0 .1rem; transition: all .15s; }
.navbar .nav-link:hover { color: var(--rouge); background: var(--rose-soft); }
.navbar .nav-link.active { color: #fff; background: linear-gradient(160deg, var(--rose), var(--rouge)); }
.navbar-toggler { border: 0; box-shadow: none !important; color: var(--rouge); font-size: 1.4rem; }
/* Menu mobile : on décolle le panneau déroulant de la barre logo/burger. */
@media (max-width: 991.98px) {
  .navbar-collapse { margin-top: .55rem; padding-top: .5rem; border-top: 1px solid var(--rose-line); }
  .navbar-nav .nav-link { margin: .15rem 0; }
}

/* ===================== Hero ===================== */
.hero { position: relative; padding: clamp(2.4rem, 5vw, 4rem) 0 clamp(1.6rem,3vw,2.4rem); }
.hero .eyebrow { font-family: var(--font-script); font-size: 1.7rem; color: var(--rose); line-height: 1; transform: rotate(-2deg); display: inline-block; margin-bottom: .2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.05; margin: .2rem 0 .6rem; }
.hero p.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); max-width: 42ch; }
.hero-emoji { font-size: clamp(2.6rem, 8vw, 4.4rem); line-height: 1; filter: drop-shadow(0 10px 18px rgba(196,30,74,.35)); }

.floaties { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.floaties span { position: absolute; color: var(--rose); opacity: .15; font-size: 2rem; animation: floaty 9s ease-in-out infinite; }
.floaties span:nth-child(1){ left:6%;  top:18%; font-size: 2.6rem; animation-delay:0s; }
.floaties span:nth-child(2){ left:84%; top:12%; font-size: 1.8rem; animation-delay:1.4s; }
.floaties span:nth-child(3){ left:72%; top:62%; font-size: 2.2rem; animation-delay:.7s; }
.floaties span:nth-child(4){ left:16%; top:70%; font-size: 1.6rem; animation-delay:2.2s; }
.floaties span:nth-child(5){ left:46%; top:6%;  font-size: 1.4rem; animation-delay:3s; }
@keyframes floaty { 0%,100%{transform:translateY(0) rotate(-6deg)} 50%{transform:translateY(-16px) rotate(6deg)} }
.hero > .container { position: relative; z-index: 1; }

/* ===================== Sélecteur de test ===================== */
.test-switch { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.test-switch a { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-display); font-weight: 600; font-size: .98rem; padding: .5rem 1rem; border-radius: 999px; background: #fff; color: var(--ink); border: 2px solid var(--rose-line); box-shadow: var(--shadow-soft); transition: transform .12s, border-color .12s, color .12s; }
.test-switch a:hover { transform: translateY(-2px); border-color: var(--rose); color: var(--rouge); }
.test-switch a.active { color: #fff; border-color: transparent; background: linear-gradient(160deg, var(--accent), var(--accent-2)); }
.test-switch a .em { font-size: 1.1rem; }

/* ===================== Cartes accueil ===================== */
.test-card { display: block; height: 100%; background: #fff; border-radius: var(--radius); border: 1px solid var(--rose-line); padding: 1.6rem 1.5rem; box-shadow: var(--shadow-soft); transition: transform .15s, box-shadow .15s; }
.test-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.test-card .ico { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; border-radius: 18px; margin-bottom: 1rem; background: linear-gradient(160deg, var(--rose-soft), #fff); }
.test-card h3 { font-size: 1.35rem; margin-bottom: .35rem; color: var(--ink); }
.test-card p { color: var(--muted); margin-bottom: 1rem; }
.test-card .go { font-family: var(--font-display); font-weight: 600; color: var(--accent-2); }

/* ===================== Carte calculateur ===================== */
.calc-card { background: #fff; border-radius: 28px; border: 1px solid var(--rose-line); box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 2.4rem); }
.names-row { display: flex; align-items: center; gap: 1rem; }
.name-input { flex: 1 1 0; min-width: 0; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); background: var(--cream); border: 2px solid var(--rose-line); border-radius: 16px; padding: .9rem 1rem; transition: border-color .15s, box-shadow .15s; }
.name-input::placeholder { color: #C9A6B2; font-weight: 600; }
.name-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,77,141,.18); }
.names-x { flex: 0 0 auto; font-size: 1.7rem; color: var(--accent); line-height: 1; filter: drop-shadow(0 4px 8px rgba(255,77,141,.4)); }

/* Champs de questions */
.person-card { background: var(--cream); border: 2px solid var(--rose-line); border-radius: 18px; padding: 1rem 1.1rem; }
.person-card .person-title { font-family: var(--font-display); font-weight: 600; color: var(--accent-2); margin-bottom: .6rem; display: flex; align-items: center; gap: .4rem; }
.field { margin-bottom: .8rem; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .25rem; color: var(--ink); }
.field select, .field input[type="number"], .field input[type="text"], .field input[type="date"] {
  width: 100%; font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--rose-line); border-radius: 12px; padding: .62rem .8rem; transition: border-color .15s, box-shadow .15s;
}
.field select:focus, .field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,77,141,.16); }
.num-idk { display: flex; align-items: center; gap: .6rem; }
.num-idk input[type="number"] { flex: 1; }
.idk { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; user-select: none; }
.idk input { accent-color: var(--accent); width: 1rem; height: 1rem; }
input:disabled { opacity: .45; }

/* Curseur de répartition des parts (business) */
.split-wrap { background: var(--cream); border: 2px solid var(--rose-line); border-radius: 18px; padding: 1rem 1.1rem; }
.split-vals { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 600; color: var(--accent-2); margin-bottom: .4rem; }
.split-wrap input[type="range"] { width: 100%; accent-color: var(--accent); }
.split-wrap.disabled { opacity: .55; }

.btn-calc { display: inline-flex; align-items: center; gap: .5rem; justify-content: center; width: 100%; margin-top: 1.1rem; border: 0; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; padding: .95rem 1.4rem; border-radius: 999px; background: linear-gradient(160deg, var(--accent), var(--accent-2)); box-shadow: 0 14px 26px -12px rgba(196,30,74,.75); transition: transform .12s, filter .12s; }
.btn-calc:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-calc:active { transform: translateY(0); }
.btn-calc[disabled] { opacity: .6; cursor: progress; }
.calc-hint { color: var(--rouge); font-weight: 700; min-height: 1.2em; margin-top: .6rem; text-align: center; }

/* ===================== Résultat ===================== */
.result { margin-top: 1.6rem; }
.result-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; }
.heartpct { --p: 0; flex: 0 0 auto; position: relative; width: 138px; height: 138px; display: grid; place-items: center; }
.heartpct svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.heartpct .pct { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; color: #fff; z-index: 1; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.heartpct .pct small { font-size: .9rem; }
.result-couple { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.result-date { font-family: var(--font-script); font-size: 1.5rem; color: var(--accent); line-height: 1; margin-top: -.1rem; }
.result-verdict h3 { font-size: 1.3rem; margin: .15rem 0 .25rem; }
.result-verdict p { color: var(--muted); margin: 0; }

/* La carte de résultat se recentre (utile une fois en pleine largeur sur PC). */
.calc-card { max-width: 920px; margin-inline: auto; }

/* PC : une fois le résultat affiché, on empile en pleine largeur pour
   exploiter la place et supprimer les vides verticaux du hero en deux colonnes. */
@media (min-width: 992px) {
  .hero-row.has-result { align-items: flex-start; justify-content: center; }
  /* On force la pleine largeur : surcharge inconditionnelle des colonnes Bootstrap. */
  .hero-row.has-result > .hero-col-intro,
  .hero-row.has-result > .hero-col-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Intro compacte en bandeau : on retire l'accroche marketing pour laisser la place au résultat. */
  .hero-row.has-result .hero-col-intro { text-align: center; margin-bottom: .35rem; }
  .hero-row.has-result .hero-col-intro .lead { display: none; }
  .hero-row.has-result .hero-col-intro h1 { margin-bottom: .5rem; }
  .hero-row.has-result .hero-col-intro .test-switch { justify-content: center; margin-top: .2rem; }
}

/* lignes de critères */
.topics { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.topic { }
.topic .topic-top { display: flex; align-items: center; gap: .55rem; font-weight: 800; margin-bottom: .35rem; }
.topic .topic-top .t-emoji { font-size: 1.2rem; }
.topic .topic-top .t-label { flex: 1; }
.topic .topic-top .t-val { color: var(--accent-2); font-family: var(--font-display); }
.bar { height: 11px; background: var(--rose-soft); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.topic .topic-text { margin: .55rem 0 0; color: #5a3a46; }
.topic.clamped .topic-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.result-actions { margin-top: 1.5rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-ghost, .btn-share { font-family: var(--font-display); font-weight: 600; cursor: pointer; border-radius: 999px; padding: .62rem 1.15rem; border: 2px solid var(--rose-line); transition: transform .12s, border-color .12s, color .12s, filter .12s; display: inline-flex; align-items: center; gap: .4rem; }
.btn-ghost { background: #fff; color: var(--accent-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--rouge); transform: translateY(-1px); }
.btn-share { background: linear-gradient(160deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -12px rgba(196,30,74,.7); }
.btn-share:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Partage multi-canal */
.share-row { margin-top: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.share-lead { font-weight: 800; font-size: .85rem; color: var(--muted); margin-right: .1rem; }
.share-ic { cursor: pointer; font-family: var(--font-body); font-weight: 800; font-size: .85rem; line-height: 1; color: #fff; border: 0; border-radius: 999px; padding: .5rem .8rem; display: inline-flex; align-items: center; gap: .35rem; transition: transform .12s, filter .12s; }
.share-ic:hover { transform: translateY(-1px); filter: brightness(1.08); }
.share-ic.wa { background: #25D366; }
.share-ic.tg { background: #29A9EB; }
.share-ic.xx { background: #111; }
.share-ic.fb { background: #1877F2; }
.share-ic.cp { background: var(--ink); }

/* ===================== Astro (horoscope) ===================== */
.astro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: .7rem; margin-top: 1.3rem; }
.astro-chip { background: var(--cream); border: 2px solid var(--rose-line); border-radius: 14px; padding: .7rem .8rem; text-align: center; }
.astro-chip .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 800; }
.astro-chip .v { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--accent-2); margin-top: .15rem; }
.astro-sign { font-size: 1.6rem; }
.fav-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }
.fav-list { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.fav-list a { font-weight: 700; font-size: .9rem; background: var(--cream); border: 2px solid var(--rose-line); border-radius: 999px; padding: .35rem .8rem; }

/* ===================== Toast ===================== */
.toast-x { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; font-weight: 700; padding: .75rem 1.2rem; border-radius: 999px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 1080; }
.toast-x.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== Sections texte ===================== */
.section { padding: clamp(2.4rem, 5vw, 4rem) 0; }
.section-soft { background: rgba(255,255,255,.55); border-top: 1px solid var(--rose-line); border-bottom: 1px solid var(--rose-line); }
.kicker { font-family: var(--font-script); font-size: 1.6rem; color: var(--rose); line-height: 1; }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.lead-muted { color: var(--muted); }
.step { background: #fff; border: 1px solid var(--rose-line); border-radius: var(--radius); padding: 1.4rem; height: 100%; box-shadow: var(--shadow-soft); }
.step .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; color: #fff; margin-bottom: .8rem; background: linear-gradient(160deg, var(--accent), var(--accent-2)); }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; }
.faq-item { border-bottom: 1px solid var(--rose-line); padding: 1rem 0; }
.faq-item summary { list-style: none; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "－"; }
.faq-item p { color: var(--muted); margin: .7rem 0 0; }

/* ===================== Footer ===================== */
.site-footer { background: linear-gradient(160deg, var(--rouge), var(--rouge-dark)); color: #fff; padding: 2.6rem 0 1.4rem; margin-top: 2rem; }
.site-footer a { color: #fff; opacity: .9; }
.site-footer a:hover { opacity: 1; color: #fff; text-decoration: underline; }
.site-footer .brand-tag { background: rgba(255,255,255,.16); }
.site-footer .brand-heart { color: #fff; }
.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-footer .copy { opacity: .8; font-size: .9rem; }
.site-footer hr { border-color: rgba(255,255,255,.2); }

/* ===================== Responsive ===================== */
@media (max-width: 575.98px) {
  .names-row { flex-direction: column; gap: .7rem; }
  .name-input { width: 100%; }
  .heartpct { width: 120px; height: 120px; }
  .brand-tag { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
