/* ==========================================================================
   Page Questionnaires — styles spécifiques
   ========================================================================== */

/* Hero */
.hero { background: linear-gradient(160deg, var(--mint) 0%, #fff 60%); padding: 80px 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); color: var(--teal); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 999px; margin-bottom: 22px; }
.pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.hero h1 { font-size: 48px; margin-bottom: 18px; line-height: 1.1; }
.hero p.lead { font-size: 18px; max-width: 500px; margin-bottom: 32px; color: var(--grey); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } .hero h1 { font-size: 36px; } }

/* Stats band */
.stats-band { background: var(--teal); padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-val { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; }
.stat-lbl { font-size: 13px; color: rgba(255, 255, 255, .7); margin-top: 6px; font-weight: 500; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* How it works */
.how { padding: 90px 0; background: #fff; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 52px; }
.how-card { background: var(--soft); border-radius: 20px; padding: 32px 28px; position: relative; }
.how-num { width: 38px; height: 38px; border-radius: 12px; background: var(--teal); color: #fff; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.how-card h3 { font-size: 18px; margin-bottom: 10px; }
.how-card p { font-size: 14px; color: var(--grey); line-height: 1.6; }
.how-arrow { position: absolute; right: -18px; top: 38px; color: var(--line); font-size: 28px; z-index: 2; }
@media (max-width: 800px) { .how-grid { grid-template-columns: 1fr; } .how-arrow { display: none; } }

/* Library mockup */
.lib-section { background: var(--soft); padding: 90px 0; }
.lib-mock { background: #fff; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; font-family: var(--ff); }
.lib-nav { background: #f8f9fa; border-bottom: 1px solid var(--line); padding: 0 20px; display: flex; align-items: center; gap: 4px; }
.lib-tab { padding: 14px 18px; font-size: 14px; font-weight: 600; color: #888; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.lib-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.lib-tab .badge { display: inline-block; background: var(--mint); color: var(--teal); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.lib-toolbar { padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.lib-search { display: flex; align-items: center; gap: 8px; background: #f5f6f7; border-radius: 999px; padding: 8px 16px; font-size: 13px; color: #999; min-width: 220px; }
.lib-chip { padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--grey); white-space: nowrap; }
.lib-chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.lib-body { padding: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.q-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.q-img { height: 120px; position: relative; overflow: hidden; }
.q-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-img-bg { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 10px 12px; background: linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, transparent 60%); }
.q-cat { display: inline-block; background: var(--teal); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; position: absolute; top: 10px; left: 10px; }
.q-cat.teal2 { background: var(--teal-2); }
.q-cat.purple { background: #5b21b6; }
.q-cat.rose { background: #be185d; }
.q-cat.orange { background: #c2410c; }
.q-cat.green { background: #15803d; }
.q-title { color: #fff; font-size: 12px; font-weight: 700; line-height: 1.3; }
.q-actions { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.q-btn-complete { display: flex; align-items: center; gap: 5px; background: #d1ebe8; color: var(--teal); font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 8px; flex: 1; justify-content: center; }
.q-btn-send { display: flex; align-items: center; gap: 5px; color: var(--grey); font-size: 11px; font-weight: 600; padding: 6px 12px; border-radius: 8px; flex: 1; justify-content: center; border: 1px solid var(--line); }

/* Categories */
.categories { padding: 90px 0; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.cat-card { background: var(--soft); border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; border: 1.5px solid transparent; transition: .2s; }
.cat-card:hover { border-color: var(--teal-2); background: #fff; box-shadow: var(--shadow); }
.cat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cat-card h3 { font-size: 16px; margin: 0; }
.cat-card p { font-size: 13px; color: var(--grey); margin: 0; }
.cat-count { font-size: 12px; font-weight: 700; color: var(--teal-2); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .cat-grid { grid-template-columns: 1fr; } }

/* Featured questionnaires */
.featured { padding: 0 0 90px; }
.q-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 48px; }
.q-item { display: flex; align-items: center; gap: 16px; background: var(--soft); border-radius: 14px; padding: 16px 20px; border: 1.5px solid transparent; transition: .2s; }
.q-item:hover { border-color: var(--line); background: #fff; box-shadow: 0 4px 20px -8px rgba(11, 87, 104, .15); }
.q-item-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal-2); flex-shrink: 0; }
.q-item-name { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
.q-item-cat { font-size: 11px; font-weight: 600; color: var(--teal-2); background: var(--mint); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 700px) { .q-list { grid-template-columns: 1fr; } }

/* Workflow detail */
.workflow { background: var(--teal); padding: 90px 0; color: #fff; }
.workflow h2 { color: #fff; }
.workflow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 48px; }
.wf-steps { display: flex; flex-direction: column; gap: 28px; }
.wf-step { display: flex; gap: 18px; align-items: flex-start; }
.wf-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wf-step h4 { font-size: 16px; color: #fff; margin-bottom: 5px; }
.wf-step p { font-size: 14px; color: rgba(255, 255, 255, .75); line-height: 1.6; }
.wf-screen { background: rgba(255, 255, 255, .1); border-radius: 20px; padding: 20px; border: 1px solid rgba(255, 255, 255, .15); }
.wf-row { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.wf-qname { font-size: 13px; font-weight: 600; color: #fff; flex: 1; }
.wf-score { font-size: 12px; font-weight: 700; color: var(--amber); }
.wf-bar-wrap { width: 80px; height: 6px; background: rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; }
.wf-bar { height: 100%; border-radius: 999px; background: var(--amber); }
.wf-date { font-size: 11px; color: rgba(255, 255, 255, .5); }
@media (max-width: 800px) { .workflow-grid { grid-template-columns: 1fr; } .wf-screen { display: none; } }

/* Cas d'usage : grille 2 col desktop, carousel scrollable sur mobile */
.usecase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) {
  .usecase-grid {
    display: flex; overflow-x: auto; gap: 16px;
    margin: 0 -18px; padding: 4px 18px 14px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .usecase-grid::-webkit-scrollbar { display: none; }
  /* 82% => on aperçoit une partie de la carte suivante (indice de scroll) */
  .usecase-grid > div { flex: 0 0 82%; scroll-snap-align: start; }
}

/* Échelles : marquee vertical avec pause au survol ------------------------- */
.q-marquee {
  position: relative; margin-top: 44px; max-height: 520px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 11%, #000 89%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 11%, #000 89%, transparent);
}
.q-marquee-track { display: flex; flex-direction: column; gap: 14px; animation: q-scroll var(--q-dur, 55s) linear infinite; will-change: transform; }
.q-marquee:hover .q-marquee-track { animation-play-state: paused; }
.q-marquee .q-list { margin-top: 0; }
@keyframes q-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--q-shift, 50%))); } }
@media (prefers-reduced-motion: reduce) {
  .q-marquee { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .q-marquee-track { animation: none; }
  .q-marquee .q-list + .q-list { display: none; }
}

/* Pricing CTA */
.pricing-cta { padding: 90px 0; }
.cta-box { background: linear-gradient(135deg, var(--mint), #fff); border-radius: 28px; padding: 64px 60px; text-align: center; border: 1.5px solid var(--line); }
.cta-box h2 { font-size: 38px; margin-bottom: 16px; }
.cta-box p { font-size: 18px; max-width: 560px; margin: 0 auto 36px; color: var(--grey); }
.cta-pills { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.cta-pill { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--teal); }
.cta-pill svg { color: var(--teal-2); }

/* FAQ */
.faq { padding: 0 0 90px; }
.faq-list { max-width: 760px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--soft); border-radius: 16px; padding: 22px 26px; cursor: pointer; }
.faq details[open] { background: #fff; border: 1.5px solid var(--line); }
.faq summary { font-weight: 700; font-size: 16px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--teal); font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 14px; font-size: 15px; color: var(--grey); line-height: 1.7; }
