/* ==========================================================================
   Now No No No — feuille de style
   ========================================================================== */

:root {
  /* Palette lumière */
  --rose-bonbon: #FF6FB5;
  --rose-poudre: #FFD6E8;
  --fuchsia: #E5399B;
  --lilas: #C89BF5;
  --or: #F3C969;
  --champagne: #FBE7C6;
  --creme: #FFF6F9;
  --creme-carte: #FFFDFB;
  --aubergine: #4A2040;
  --aubergine-soft: #6C3A5C;

  /* Jauge de risque : vert menthe -> fuchsia/framboise */
  --r0: #8FE3B0;
  --r1: #B7E68C;
  --r2: #F4D35E;
  --r3: #F5A25D;
  --r4: #EF6C8E;
  --r5: #D6247A;

  --text: var(--aubergine);
  --bg: var(--creme);
  --card-bg: var(--creme-carte);
  --border-soft: rgba(229, 57, 155, 0.18);
  --shadow-rose: 0 12px 32px rgba(229, 57, 155, 0.18);
  --shadow-rose-lg: 0 20px 48px rgba(229, 57, 155, 0.24);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --font-title: "Gloock", "Playfair Display", serif;
  --font-body: "Quicksand", "Nunito", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #FCE4F0;
    --bg: #2A1330;
    --card-bg: #3A1C42;
    --border-soft: rgba(255, 182, 217, 0.22);
    --creme: #2A1330;
    --champagne: #4A2A4A;
    --shadow-rose: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-rose-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --text: #FCE4F0;
  --bg: #2A1330;
  --card-bg: #3A1C42;
  --border-soft: rgba(255, 182, 217, 0.22);
  --creme: #2A1330;
  --champagne: #4A2A4A;
  --shadow-rose: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-rose-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a { color: var(--fuchsia); }

button {
  font-family: inherit;
}

/* ---------- Fond décoratif ---------- */

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.blob-1 { width: 320px; height: 320px; background: var(--rose-poudre); top: -80px; left: -100px; }
.blob-2 { width: 260px; height: 260px; background: var(--lilas); top: 20%; right: -80px; opacity: 0.4; }
.blob-3 { width: 300px; height: 300px; background: var(--champagne); bottom: 5%; left: -60px; opacity: 0.45; }
.blob-4 { width: 220px; height: 220px; background: var(--rose-bonbon); bottom: -60px; right: 10%; opacity: 0.3; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .blob { opacity: 0.25; }
}
:root[data-theme="dark"] .blob { opacity: 0.25; }

/* ---------- Header / logo ---------- */

.site-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.logo-wrap {
  margin-bottom: 1.25rem;
}

.logo {
  font-family: var(--font-title);
  font-size: clamp(2rem, 9vw, 3.4rem);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
  line-height: 1;
  background: linear-gradient(135deg, var(--fuchsia) 0%, var(--rose-bonbon) 45%, var(--lilas) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 24px rgba(229, 57, 155, 0.22);
}

.logo-word {
  position: relative;
  white-space: nowrap;
}

.logo-o {
  position: relative;
  display: inline-block;
}

.logo-o-crown::before {
  content: "👑";
  position: absolute;
  top: -0.75em;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  font-size: 0.5em;
  -webkit-text-fill-color: initial;
}

.logo-o-bow::after {
  content: "🎀";
  position: absolute;
  top: -0.6em;
  left: 50%;
  transform: translateX(-50%) rotate(8deg);
  font-size: 0.45em;
  -webkit-text-fill-color: initial;
}

.baseline {
  margin: 0.5rem 0 0.15rem;
  font-weight: 600;
  color: var(--aubergine-soft);
}

.signature {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Onglets ---------- */

.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.tab-btn {
  border: 1.5px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  color: var(--aubergine-soft);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

:root[data-theme="dark"] .tab-btn,
@media (prefers-color-scheme: dark) {
  .tab-btn { background: rgba(255,255,255,0.06); }
}

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

.tab-btn.is-active {
  background: linear-gradient(135deg, var(--fuchsia), var(--rose-bonbon));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-rose);
}

.tab-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lilas);
  outline-offset: 2px;
}

/* ---------- Layout général ---------- */

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.tab-panel {
  display: none;
  animation: fade-in 0.35s ease;
}

.tab-panel.is-active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.7rem;
  margin: 0.5rem 0 0.25rem;
  color: var(--fuchsia);
}

.section-sub {
  margin: 0 0 1.5rem;
  color: var(--aubergine-soft);
}

/* ---------- Filtres ---------- */

.filters-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 0.25rem 1.1rem 0.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-rose);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .filters-panel { background: rgba(255,255,255,0.05); }
}
:root[data-theme="dark"] .filters-panel { background: rgba(255,255,255,0.05); }

.filters-summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filters-summary::-webkit-details-marker { display: none; }

.filters-count-pill {
  font-size: 0.78rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--lilas), var(--rose-bonbon));
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.filters-body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding-bottom: 0.75rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.filter-label {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.filter-hint {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--fuchsia);
}

.risque-slider {
  width: 100%;
  appearance: none;
  height: 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--r0), var(--r1), var(--r2), var(--r3), var(--r4), var(--r5));
  cursor: pointer;
}

.risque-slider::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--fuchsia);
  box-shadow: 0 2px 8px rgba(229, 57, 155, 0.4);
  cursor: pointer;
}

.risque-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--fuchsia);
  box-shadow: 0 2px 8px rgba(229, 57, 155, 0.4);
  cursor: pointer;
}

.risque-scale {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  padding: 0 2px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1.5px solid var(--border-soft);
  background: #fff;
  color: var(--aubergine-soft);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip { background: rgba(255,255,255,0.07); }
}
:root[data-theme="dark"] .chip { background: rgba(255,255,255,0.07); }

.chip:hover {
  transform: translateY(-1px);
  border-color: var(--rose-bonbon);
}

.chip.is-selected {
  background: linear-gradient(135deg, var(--fuchsia), var(--rose-bonbon));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(229, 57, 155, 0.35);
}

.filter-toggle-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-soft);
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.switch-label input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--fuchsia);
}

.btn-text {
  background: none;
  border: none;
  color: var(--fuchsia);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.btn-text:hover {
  background: var(--rose-poudre);
}

/* ---------- Compteur + bouton générer ---------- */

.result-count {
  text-align: center;
  font-weight: 700;
  color: var(--aubergine-soft);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.generate-zone {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn-generate {
  border: none;
  background: linear-gradient(135deg, var(--fuchsia) 0%, var(--rose-bonbon) 55%, var(--lilas) 100%);
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  padding: 1.1rem 2.2rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-rose-lg);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-generate:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-generate:active {
  transform: scale(0.96);
}

/* ---------- Animation de tirage ---------- */

.drawing-animation {
  text-align: center;
  padding: 2rem 0;
  font-weight: 700;
  color: var(--fuchsia);
}

.sparkle-burst {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sparkle-burst span {
  display: inline-block;
  animation: sparkle-pop 0.6s ease infinite;
}

.sparkle-burst span:nth-child(2) { animation-delay: 0.08s; }
.sparkle-burst span:nth-child(3) { animation-delay: 0.16s; }
.sparkle-burst span:nth-child(4) { animation-delay: 0.24s; }
.sparkle-burst span:nth-child(5) { animation-delay: 0.32s; }
.sparkle-burst span:nth-child(6) { animation-delay: 0.4s; }

@keyframes sparkle-pop {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-14px) scale(1.3); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle-burst span { animation: none; }
}

/* ---------- État vide ---------- */

.empty-state {
  text-align: center;
  background: var(--card-bg);
  border: 1.5px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
}

.empty-emoji {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
}

.empty-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  color: var(--fuchsia);
}

.empty-suggestion {
  margin: 0;
  color: var(--aubergine-soft);
}

.empty-simple {
  text-align: center;
  color: var(--aubergine-soft);
  padding: 2rem 1rem;
}

/* ---------- Carte bêtise ---------- */

.betise-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-rose-lg);
  position: relative;
  animation: card-in 0.4s ease;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--aubergine);
}

.fav-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  color: var(--fuchsia);
  transition: transform 0.15s ease;
}

.fav-btn:hover {
  transform: scale(1.15);
}

.fav-btn.is-active {
  animation: heart-pulse 0.4s ease;
}

.fav-btn.is-active .fav-heart::before {
  content: "♥";
}

.fav-heart::before {
  content: "♡";
}

@keyframes heart-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.betise-titre {
  font-family: var(--font-title);
  color: var(--fuchsia);
  font-size: 1.5rem;
  margin: 0 0 0.6rem;
}

.betise-description {
  margin: 0 0 1rem;
  font-size: 1.02rem;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.badge-soft {
  background: var(--rose-poudre);
  color: var(--aubergine);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.betise-meta {
  font-size: 0.88rem;
  color: var(--aubergine-soft);
  border-top: 1px dashed var(--border-soft);
  padding-top: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--fuchsia), var(--rose-bonbon));
  color: #fff;
  box-shadow: 0 6px 16px rgba(229, 57, 155, 0.3);
  flex: 1 1 auto;
}

.btn-secondary {
  background: var(--rose-poudre);
  color: var(--aubergine);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-secondary { background: rgba(255,255,255,0.1); color: var(--text); }
}
:root[data-theme="dark"] .btn-secondary { background: rgba(255,255,255,0.1); color: var(--text); }

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.95);
}

.btn-secondary.is-active {
  background: linear-gradient(135deg, var(--lilas), var(--rose-bonbon));
  color: #fff;
}

/* ---------- Favoris ---------- */

.favoris-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.favori-item {
  background: var(--card-bg);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-rose);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.favori-item h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-title);
  color: var(--fuchsia);
  font-size: 1.1rem;
}

.favori-item p {
  margin: 0;
  font-size: 0.9rem;
}

.favori-remove {
  border: none;
  background: none;
  color: var(--fuchsia);
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---------- Formulaire proposer ---------- */

.propose-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label,
.form-field-legend {
  font-weight: 700;
  font-size: 0.88rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
}

input[type="text"],
input[type="email"],
textarea,
select {
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="text"],
  :root:not([data-theme="light"]) input[type="email"],
  :root:not([data-theme="light"]) textarea,
  :root:not([data-theme="light"]) select { background: rgba(255,255,255,0.07); }
}
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select { background: rgba(255,255,255,0.07); }

textarea {
  resize: vertical;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.checkbox-grid input {
  accent-color: var(--fuchsia);
  width: 1.05rem;
  height: 1.05rem;
}

.btn-submit {
  align-self: center;
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.form-feedback {
  min-height: 1.4em;
  text-align: center;
  font-weight: 700;
  margin: 0;
}

.form-feedback.is-success { color: #2E8B57; }
.form-feedback.is-error { color: var(--fuchsia); }

/* ---------- Footer ---------- */

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  text-align: center;
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--aubergine-soft);
  opacity: 0.85;
  line-height: 1.5;
}

.footer-credit {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* ---------- Paillettes de tirage ---------- */

.confetti-piece {
  position: fixed;
  top: -20px;
  z-index: 999;
  pointer-events: none;
  font-size: 1.3rem;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-piece { display: none; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
