/*
 * BioFormen Generator — Styles v2.0
 * Palette : #FF3366 · #444444 · #FFFFFF · #FF5A4A · #D94E78
 * Fonts   : Gotham Rounded (titres) · Gotham (corps)
 *           Fallback Google Fonts : Nunito · Nunito Sans
 *
 * Pour activer Gotham : placer les fichiers dans /assets/fonts/
 * et décommenter les blocs @font-face ci-dessous.
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&family=Nunito+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/*
@font-face {
  font-family: 'Gotham Rounded';
  src: local('Gotham Rounded Bold'), local('GothamRounded-Bold'),
       url('fonts/GothamRounded-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: local('Gotham Book'), local('Gotham-Book'),
       url('fonts/Gotham-Book.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: local('Gotham Medium'), local('Gotham-Medium'),
       url('fonts/Gotham-Medium.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
*/

/* ── Variables ─────────────────────────────────────────────────────────────── */
.bf-wrap {
  --primary:      #FF3366;
  --primary-dark: #D94E78;
  --coral:        #FF5A4A;
  --dark:         #444444;
  --white:        #FFFFFF;
  --bg:           #FFFFFF;
  --border:       #FFD6E2;
  --muted:        #AA8899;
  --done:         #22C55E;
  --done-light:   #F0FDF4;
  --radius:       14px;
  --radius-pill:  999px;
  --font-title:   'Gotham Rounded', 'Nunito', sans-serif;
  --font-body:    'Gotham', 'Nunito Sans', sans-serif;

  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  padding: 0 0 4rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.bf-progress-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem 0.6rem;
  box-shadow: 0 2px 16px rgba(255, 51, 102, 0.08);
}

.bf-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.bf-progress-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.bf-progress-pct {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  transition: color 0.4s;
}

.bf-progress-pct.bf-pct-done { color: var(--done); }

.bf-progress-track {
  height: 7px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--coral));
  border-radius: var(--radius-pill);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  width: 28%;
}

.bf-progress-wrap.bf-progress-inline {
  position: static;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.bf-progress-fill.bf-fill-done {
  background: linear-gradient(90deg, var(--done), #16a34a);
}

.bf-progress-tagline {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin-top: 5px;
  font-style: italic;
  min-height: 1em;
  transition: opacity 0.3s;
}

/* ── Home intro ─────────────────────────────────────────────────────────────── */
.bf-home-intro {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
}

@media (min-width: 600px) {
  .entry-content .bf-wrap:not(.bf-mosaic-wrap) {
    margin-top: -2.5rem;
  }
}
.bf-home-intro p:first-child {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.bf-home-intro p:last-child {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 400;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.bf-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.bf-header h1,
.bf-header .bf-hero-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.bf-header h1 em,
.bf-header .bf-hero-title em {
  font-style: normal;
  color: var(--primary);
}

/* ── Already generated notice ─────────────────────────────────────────────── */
.bf-used-notice {
  font-size: 0.88rem;
  color: #888;
  text-align: center;
  margin-bottom: 1rem;
  font-style: italic;
}

/* ── Ticker app names ──────────────────────────────────────────────────────── */
.bf-ticker-wrap {
  display: inline-flex;
  overflow: hidden;
  vertical-align: 0.02em;
  line-height: 1;
  height: 1.1em;
  align-items: center;
}
.bf-ticker-word {
  display: block;
  font-style: normal;
  color: var(--primary);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s ease;
  white-space: nowrap;
}

.bf-header p {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.bf-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 0.875rem;
  transition: border-left-color 0.35s ease, box-shadow 0.35s ease;
}

.bf-card.bf-card-done {
  border-left-color: var(--done);
}

/* ── Card title ────────────────────────────────────────────────────────────── */
.bf-card-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
}

/* ── Step badge ────────────────────────────────────────────────────────────── */
.bf-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bf-step.bf-step-done {
  background: var(--done);
  transform: scale(1.15);
}

/* ── Chips ─────────────────────────────────────────────────────────────────── */
.bf-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.bf-chip {
  padding: 8px 16px;
  border: 1.5px solid #FF7AA0;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 400;
  cursor: pointer;
  background: var(--white);
  color: var(--dark);
  transition: all 0.15s ease;
  user-select: none;
}

.bf-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff5f8;
}

.bf-chip.bf-active-single {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

.bf-chip.bf-active-multi {
  background: var(--done-light);
  color: var(--done);
  border-color: var(--done);
  font-weight: 500;
}

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.bf-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.bf-wrap label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bf-required { color: var(--primary); }

.bf-wrap input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--dark);
  transition: border-color 0.15s;
  outline: none;
  box-sizing: border-box;
}

.bf-wrap input:focus { border-color: var(--primary); }

/* ── Age slider ──────────────────────────────────────────────────────────── */
.bf-age-val {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

.bf-wrap input.bf-age-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: #ddd !important;
  outline: none;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  margin-top: 10px;
}

.bf-age-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.bf-age-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.bf-age-slider:active::-webkit-slider-thumb { transform: scale(1.2); }
.bf-age-slider:focus { border-color: transparent !important; box-shadow: none !important; }

.bf-optional { font-size: 0.75rem; color: var(--muted); font-weight: 400; }

.bf-hint { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

/* ── Generate button ───────────────────────────────────────────────────────── */
.bf-generate-btn {
  width: 100%;
  padding: 15px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--coral) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.3s;
  margin-top: 0.5rem;
  display: block;
  letter-spacing: 0.01em;
}

.bf-generate-btn:hover {
  opacity: 0.92;
  box-shadow: 0 6px 24px rgba(255, 51, 102, 0.35);
}

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

.bf-generate-btn:disabled {
  background: #ddd;
  cursor: not-allowed;
  box-shadow: none;
}

@keyframes bf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.45); }
  50%       { box-shadow: 0 0 0 12px rgba(255, 51, 102, 0); }
}

.bf-generate-btn.bf-btn-ready {
  animation: bf-pulse 2s infinite;
}

/* ── Results ───────────────────────────────────────────────────────────────── */
.bf-results { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.bf-bio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bf-bio-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 16px rgba(255, 51, 102, 0.1);
}

.bf-bio-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: #fff0f4;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.bf-bio-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark);
  font-weight: 300;
}

.bf-bio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.bf-char-count { font-size: 0.8rem; color: var(--muted); }

.bf-copy-btn {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
}

.bf-copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.bf-copy-btn.bf-copied { background: var(--done-light); color: var(--done); border-color: var(--done); }

.bf-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.bf-error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}

/* ── Voir plus (step 1) ────────────────────────────────────────────────────── */
.bf-more-sites {
  margin-top: 10px;
}

.bf-more-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 0;
  user-select: none;
}

.bf-more-toggle::-webkit-details-marker { display: none; }

.bf-more-toggle::after {
  content: '▾';
  display: inline-block;
  transition: transform 0.2s ease;
}

.bf-more-sites[open] .bf-more-toggle::after {
  transform: rotate(180deg);
}

.bf-more-count {
  color: var(--muted);
  font-weight: 400;
}

/* ── FAQ ───────────────────────────────────────────────────────────────────── */
.bf-faq {
  margin-top: 3rem;
  border-top: 2px solid var(--border);
  padding-top: 2rem;
}

.bf-faq-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.bf-faq-item {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin: 0;
  outline: none !important;
  box-shadow: none !important;
}

.bf-faq-item:focus,
.bf-faq-item:focus-within,
.bf-faq-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.bf-faq-item:first-of-type {
  border-top: 1px solid var(--border);
}

.bf-faq-item[open] .bf-faq-q {
  color: var(--primary);
}

.bf-faq-q {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 1rem 0;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
  outline: none !important;
  box-shadow: none !important;
}

.bf-faq-q:focus,
.bf-faq-q:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.bf-faq-q::-webkit-details-marker { display: none; }

.bf-faq-q h3 {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  line-height: inherit;
}

.bf-faq-q::after {
  content: '+';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  transition: background 0.2s, transform 0.25s ease;
}

.bf-faq-item[open] .bf-faq-q::after {
  content: '−';
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
}

/* ── Carousel des apps ─────────────────────────────────────────────────────── */
.bf-car-wrap {
  position: relative;
  margin: 1.5rem 0 2.5rem;
}

.bf-car {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 12px 4px 16px;
  scrollbar-width: none;
}

.bf-car::-webkit-scrollbar { display: none; }

.bf-car-item {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.18s ease;
}

.bf-car-item:hover { transform: translateY(-3px); }

.bf-car-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.bf-car-item:hover .bf-car-logo {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(255,51,102,0.15);
}

.bf-car-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.bf-car-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  color: var(--dark);
  line-height: 1.3;
}

.bf-car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bf-car-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.bf-car-prev { left: -18px; }
.bf-car-next { right: -18px; }

@media (max-width: 480px) {
  .bf-car-prev { left: 0; }
  .bf-car-next { right: 0; }
  .bf-car { padding-left: 44px; padding-right: 44px; }
}

.bf-faq-a {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.7;
  color: #666;
  font-weight: 300;
  padding-bottom: 1rem;
}

/* ── Mosaïque des apps ─────────────────────────────────────────────────────── */
.bf-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 16px;
  padding: 1.5rem 0 2rem;
}

.bf-mosaic-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.18s ease;
}

.bf-mosaic-item:hover {
  transform: translateY(-3px);
}

.bf-mosaic-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}


.bf-mosaic-item:hover .bf-mosaic-logo {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(255,51,102,0.15);
}

/* L'image couvre la lettre quand elle charge correctement */
.bf-mosaic-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Quand l'image échoue, on la masque et la lettre ::after reste visible */
.bf-mosaic-logo img.bf-img-error {
  display: none;
}

.bf-mosaic-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  color: var(--dark);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .bf-mosaic {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 12px;
  }
}
