/* ============================================================
   HOPLION - Page d'accueil (refonte 2026)
   Hero + maquette produit, compteurs, bento d'essai gratuit,
   cartes fonctionnalités.
   ============================================================ */

/* ---------- Hero ---------- */
.hx-hero { padding-bottom: 72px; background: #fff; }
.hx-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hx-title { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 0 0 22px; }
.hx-line { display: block; }
.hx-flip { display: block; position: relative; color: var(--blue-primary); white-space: nowrap; perspective: 1200px; min-height: 1.02em; }
.hx-flip .hx-phrase { display: block; }
.hx-flip .hx-phrase.hx-next { position: absolute; inset: 0; }
.hx-flip .hx-ch { display: inline-block; backface-visibility: hidden; will-change: transform; }
.hx-note { font-size: .8125rem; color: var(--text-secondary); margin: 0; }

/* Maquette produit */
.hx-mock { position: relative; max-width: 440px; width: 100%; margin: 0 auto; }
.hx-back { position: absolute; inset: 0; border-radius: 24px; background: #FED766; transform: translate(-14px, -14px) rotate(5deg); }
.hx-card { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--border); background: #fff; box-shadow: 0 30px 60px -20px rgba(31,42,61,.35); }
.hx-cardbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: .75rem; color: var(--text-secondary); }
.hx-cardbar b { color: var(--text-primary); }
.hx-cardbody { display: grid; gap: 8px; padding: 20px; }
.hx-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid var(--border); border-radius: 12px; font-size: .82rem; font-weight: 600; color: var(--text-secondary); }
.hx-step i { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); color: var(--text-secondary); }
.hx-step svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hx-step.ok { border-color: #C3D0EE; background: var(--blue-light); color: var(--blue-primary); }
.hx-step.ok i { background: var(--blue-primary); color: #fff; }
.hx-chat { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border-radius: 16px; background: #E0ECF7; font-size: .8rem; line-height: 1.4; color: var(--text-primary); }
.hx-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(31,42,61,.08); }
.hx-msg.me { justify-self: end; border-top-right-radius: 4px; background: #FFF9E8; }
.hx-msg.ai { justify-self: start; border-top-left-radius: 4px; }
.hx-msg.ai b { display: block; font-size: .7rem; color: #FE4A49; margin-bottom: 2px; }

@media (max-width: 960px) {
  .hx-grid { grid-template-columns: 1fr; gap: 24px; }
  .hx-mock { max-width: 440px; margin-top: 16px; }
}
@media (max-width: 640px) {
  .hx-hero { padding-bottom: 40px; }
  .hx-back { display: none; }
}

/* ---------- Compteurs ---------- */
.hx-counts { padding: 56px 0; background: #fff; border-bottom: 1px solid #E9EEF4; }
.hx-counts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hx-count { text-align: center; padding: 28px 16px; border-radius: 24px; background: var(--blue-primary); color: #fff; }
.hx-count-num { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -.04em; color: inherit; font-variant-numeric: tabular-nums; }
.hx-count:nth-child(2) { background: #FE4A49; }
.hx-count:nth-child(3) { background: #FED766; color: var(--text-primary); }
.hx-count:nth-child(4) { background: #0057A8; }
.hx-count p { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: inherit; }
@media (max-width: 720px) { .hx-counts-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; } }

/* ---------- Bento essai gratuit ---------- */
.bx-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(190px, auto); gap: 18px; max-width: 1100px; margin: 0 auto; }
.bx-card { position: relative; overflow: hidden; border: 0; border-radius: 24px; padding: 28px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; text-decoration: none; transition: transform .25s cubic-bezier(.2,.9,.3,1.1), box-shadow .25s; }
.bx-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.bx-card[aria-disabled="true"] { cursor: default; }
.bx-card[aria-disabled="true"]:hover { transform: none; box-shadow: none; }
.bx-main { grid-column: span 2; grid-row: span 2; background: #fff; border: 1px solid #E9EEF4; padding: 40px; }
.bx-star { position: absolute; right: -60px; bottom: -60px; width: 340px; height: 340px; fill: var(--blue-light); transition: transform 2s cubic-bezier(.4,0,.2,1); }
.bx-main:hover .bx-star { transform: rotate(180deg); }
.bx-main > span { position: relative; z-index: 1; }
.bx-pill { align-self: flex-start; background: var(--blue-primary); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 7px 14px; border-radius: 99px; }
.bx-big { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--text-primary); }
.bx-text { font-size: 1.05rem; line-height: 1.6; color: var(--text-secondary); max-width: 380px; }
.bx-go { font-weight: 700; color: var(--blue-primary); }
.bx-teal { background: #FE4A49; color: #fff; } /* teal foncé : contraste AA du texte blanc */
.bx-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.bx-mid { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.bx-small { display: block; font-size: .85rem; opacity: .85; margin-top: 4px; }
.bx-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.3); overflow: hidden; }
.bx-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; box-shadow: 0 0 12px rgba(255,255,255,.8); }
.bx-dark { background: #244199; color: #fff; justify-content: center; }
.bx-dark .bx-small { opacity: .6; }
.bx-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-primary); display: grid; place-items: center; }
.bx-ico svg { width: 20px; height: 20px; }
.bx-blue { grid-column: span 2; background: var(--blue-primary); color: #fff; flex-direction: row; align-items: center; }
.bx-arrow { flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--blue-primary); display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; transition: transform .3s; }
.bx-blue:hover .bx-arrow { transform: translateX(4px); }
@media (max-width: 900px) {
  .bx-grid { grid-template-columns: 1fr 1fr; }
  .bx-main, .bx-blue { grid-column: span 2; }
  .bx-main { grid-row: span 1; }
}
@media (max-width: 560px) {
  .bx-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bx-main, .bx-blue { grid-column: span 1; }
  .bx-card { padding: 22px; min-height: 150px; }
  .bx-main { padding: 26px; }
  .bx-arrow { width: 56px; height: 56px; font-size: 1.4rem; }
}

/* ---------- Fonctionnalités (cartes douces) ---------- */
.fx-section { background: #fff; }
.fx-section .section-header { text-align: left; max-width: 1100px; margin: 0 auto 40px; }
.fx-section .section-subtitle { margin-left: 0; }
.fx-section .features-grid { max-width: 1100px; margin: 0 auto; gap: 16px; }
.fx-section .card { background: var(--bg); border: 0; box-shadow: none; padding: 26px; }
.fx-section .card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); background: #fff; }
.fx-section .feature-icon { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px; display: grid; place-items: center; }
.fx-section .feature-title { font-size: 1.1rem; }
.fx-section .feature-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .bx-star, .bx-card { transition: none; }
}

/* ---------- Avis d'élèves animés ---------- */
.at-section { padding: 96px 0; background: #fff; overflow: hidden; }
.at-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: center; max-width: 1100px; }
.at-side { opacity: 0; transform: translateY(20px); transition: opacity .5s ease-out .2s, transform .5s ease-out .2s; }
.at-stage { opacity: 0; transform: translateY(20px); transition: opacity .5s ease-out .3s, transform .5s ease-out .3s; }
.at-section.in .at-side, .at-section.in .at-stage { opacity: 1; transform: none; }
.at-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--blue-light); color: var(--blue-primary); font-size: .82rem; font-weight: 700; }
.at-badge svg { width: 14px; height: 14px; fill: currentColor; }
.at-side h2 { margin: 20px 0 16px; font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.04em; line-height: 1.05; }
.at-side p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.65; max-width: 460px; margin: 0; }
.at-dots { display: flex; gap: 10px; padding-top: 28px; }
.at-dot { height: 10px; width: 10px; padding: 0; border: 0; border-radius: 99px; background: rgba(31,42,61,.18); cursor: pointer; transition: width .3s, background-color .3s; }
.at-dot.is-active { width: 40px; background: var(--blue-primary); }
.at-dot:focus-visible { outline: 2px solid var(--blue-primary); outline-offset: 3px; }
.at-stage { position: relative; isolation: isolate; display: grid; min-height: 340px; margin-right: 24px; }
.at-card { grid-area: 1 / 1; position: relative; z-index: 0; margin: 0; background: #fff; border: 1px solid #E9EEF4; border-radius: 24px; box-shadow: 0 24px 50px -20px rgba(31,42,61,.22); padding: 34px; display: flex; flex-direction: column; opacity: 0; transform: translateX(100px) scale(.9); pointer-events: none; transition: opacity .5s ease-in-out, transform .5s ease-in-out; }
.at-card.is-active { z-index: 2; opacity: 1; transform: none; pointer-events: auto; }
.at-stars { display: flex; gap: 6px; margin-bottom: 22px; color: var(--yellow); }
.at-stars svg { width: 20px; height: 20px; fill: currentColor; }
.at-quote { position: relative; flex: 1; margin: 0 0 22px; }
.at-q { position: absolute; top: -10px; left: -8px; width: 36px; height: 36px; color: rgba(36,65,153,.12); transform: rotate(180deg); }
.at-quote p { position: relative; margin: 0; font-size: 1.15rem; font-weight: 500; line-height: 1.65; color: var(--text-primary); }
.at-author { display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid #E9EEF4; }
.at-av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; }
.at-av1 { background: var(--blue-primary); }
.at-av2 { background: var(--teal); }
.at-av3 { background: var(--pink); }
.at-author b { display: block; color: var(--text-primary); }
.at-author small { color: var(--text-secondary); font-size: .85rem; }
.at-deco { position: absolute; width: 96px; height: 96px; border-radius: 20px; background: rgba(36,65,153,.06); z-index: -1; }
.at-deco1 { bottom: -24px; left: -24px; } .at-deco2 { top: -24px; right: -24px; background: rgba(254,74,73,.1); }
@media (max-width: 860px) {
  .at-section { padding: 64px 0; }
  .at-grid { grid-template-columns: 1fr; gap: 40px; }
  .at-stage { min-height: 0; margin: 0 8px; }
  .at-card { padding: 24px; }
  .at-quote p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .at-side, .at-stage, .at-card, .at-dot { transition: none; } }

/* ---------- FAQ (aperçu, style faqs-02) ---------- */
.fq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; max-width: 1100px; margin: 0 auto; align-items: start; }
.fq-side { position: sticky; top: 100px; }
.fq-badge { display: inline-block; background: var(--blue-light); color: var(--blue-primary); font-size: .72rem; font-weight: 800; letter-spacing: .12em; padding: 6px 12px; border-radius: 99px; }
.fq-side h2 { margin: 14px 0 12px; font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.035em; line-height: 1.1; }
.fq-side p { color: var(--text-secondary); line-height: 1.65; margin: 0 0 22px; }
.fq-side p a { color: var(--blue-primary); font-weight: 600; }
.fq-help { background: #fff; border: 1px solid #E9EEF4; border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.fq-help-row { display: flex; gap: 12px; align-items: center; }
.fq-help-row b { display: block; font-size: .95rem; color: var(--text-primary); }
.fq-help-row small { color: var(--text-secondary); font-size: .8rem; }
.fq-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-light); color: #FE4A49; display: grid; place-items: center; flex-shrink: 0; }
.fq-ico svg { width: 20px; height: 20px; }
.fq-all { text-align: center; font-size: .875rem; font-weight: 600; color: var(--blue-primary); text-decoration: none; }
.fq-list.faq-teaser-list { max-width: none; margin: 0; background: none; border: 0; padding: 0; display: grid; gap: 12px; }
.fq-list .faq-item { background: #fff; border: 1px solid #E9EEF4 !important; border-radius: 18px; padding: 0 22px; transition: box-shadow .2s, border-color .2s; }
.fq-list .faq-item.open { border-color: rgba(36,65,153,.25) !important; box-shadow: var(--sh-md); }
.fq-list .faq-question { padding: 18px 0; }
@media (max-width: 860px) {
  .fq-grid { grid-template-columns: 1fr; gap: 28px; }
  .fq-side { position: static; }
}
@media (prefers-reduced-motion: reduce) { .rv-card.testi-card, .fq-list .faq-item { transition: none; } }

/* ---------- Bento : aperçu QCU, titres SSIAP, bouton lecture vidéos ---------- */
.bx-q { position: relative; z-index: 1; display: grid; gap: 7px; max-width: 360px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid #E9EEF4; box-shadow: 0 14px 28px -16px rgba(31,42,61,.25); transform: rotate(-1.5deg); transition: transform .3s; }
.bx-main:hover .bx-q { transform: rotate(0); }
.bx-q-top { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-secondary); }
.bx-q-top b { color: var(--blue-primary); }
.bx-q-txt { grid-column: 1 / -1; font-size: .85rem; font-weight: 700; line-height: 1.35; color: var(--text-primary); margin-bottom: 2px; }
.bx-q-opt { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; border: 2px solid #E3E9F1; font-weight: 600; font-size: .82rem; color: var(--text-primary); }
.bx-q-opt i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .72rem; background: var(--bg); }
.bx-q-opt.ok i { background: var(--success); color: #fff; }
.bx-q-opt.ok { border-color: var(--success); background: var(--success-light); color: #17733F; }
.bx-cta { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 99px; background: var(--blue-primary); color: #fff; font-weight: 700; font-size: 1rem; box-shadow: var(--sh-blue); transition: transform .2s, box-shadow .2s; }
.bx-cta svg { width: 18px; height: 18px; fill: currentColor; }
.bx-main:hover .bx-cta { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(36,65,153,.6); }
.bx-title { display: block; font-size: 2rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.bx-sub { margin-top: 6px; font-size: .95rem; font-weight: 600; opacity: .95; }
.bx-ico-w { background: rgba(255,255,255,.22); }
.bx-ico-w svg { color: #fff; }
.bx-dark .bx-title { color: #fff; }
.bx-dark { justify-content: space-between; }
.bx-play { position: relative; flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; box-shadow: 0 0 0 0 rgba(254,74,73,.55); animation: bxPulse 2.2s infinite; }
.bx-play svg { width: 30px; height: 30px; margin-left: 4px; }
@keyframes bxPulse { 0% { box-shadow: 0 0 0 0 rgba(254,74,73,.55); } 70% { box-shadow: 0 0 0 18px rgba(254,74,73,0); } 100% { box-shadow: 0 0 0 0 rgba(254,74,73,0); } }
.bx-blue { gap: 22px; }
.bx-vtxt { flex: 1; min-width: 0; }
.bx-blue:hover .bx-play { transform: scale(1.06); }
@media (max-width: 560px) { .bx-cta { white-space: nowrap; font-size: .92rem; padding: 13px 20px; align-self: stretch; justify-content: center; } .bx-play { width: 56px; height: 56px; } .bx-play svg { width: 24px; height: 24px; } .bx-blue .bx-arrow { display: none; } .bx-q { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .bx-play { animation: none; } .bx-q, .bx-cta { transition: none; } }

/* Prix sur l'accueil (cartes .fm-offer de guide.css) */
.hp-prices { background: #fff; }
.hp-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 auto 12px; }
.hp-tab { padding: 10px 20px; border-radius: 999px; border: 2px solid var(--border); background: #fff; font: inherit; font-weight: 700; color: var(--text-primary); cursor: pointer; }
.hp-tab:hover { border-color: var(--blue-primary); }
.hp-tab.is-active { background: var(--blue-primary); border-color: var(--blue-primary); color: #fff; }
.hp-prices .fm-offers { max-width: 1040px; margin-left: auto; margin-right: auto; }
.hp-prices .fm-offers:has(> .fm-offer:nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp-prices .fm-offers:has(> .fm-offer:only-child) { max-width: 380px; }
.hp-prices .fm-offers-note { max-width: 1040px; margin-left: auto; margin-right: auto; }
.hp-prices .fm-price small { white-space: nowrap; }

/* Hero : photo sur le bloc Mustard, carte de parcours en surimpression */
.hx-mock { max-width: 460px; padding: 0 0 40px 60px; }
.hx-back { left: 60px; bottom: 40px; }
.hx-photo { position: relative; overflow: hidden; border-radius: 24px; background: #F4F4F8; aspect-ratio: 856 / 1000; box-shadow: 0 30px 60px -20px rgba(31,42,61,.35); }
.hx-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hx-mock .hx-card { position: absolute; left: 0; bottom: 0; width: 290px; }
.hx-mock .hx-cardbar { padding: 10px 16px; font-size: .7rem; }
.hx-mock .hx-cardbody { gap: 6px; padding: 14px; }
.hx-mock .hx-step { padding: 6px 10px; font-size: .76rem; }
.hx-mock .hx-step i { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .hx-mock { max-width: 360px; padding: 0 0 120px 0; }
  .hx-mock .hx-card { left: 50%; transform: translateX(-50%); width: min(300px, 92%); }
}

/* Boutons du hero : format Mziane (coins arrondis 16px, contour épais) */
.hx-hero .hx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 140px; min-height: 48px; padding: 12px 24px; border-radius: 14px; font-size: 1rem; font-weight: 600; transition: transform .2s, background-color .2s, color .2s; }
.hx-hero .hx-btn.btn-primary { background: var(--blue-primary); border: 2px solid var(--blue-primary); color: #fff; box-shadow: 0 17px 20px -8px rgba(36,65,153,.4); }
.hx-hero .hx-btn.btn-primary:hover { background: #1A3278; border-color: #1A3278; transform: translateY(-2px); }
.hx-hero .hx-btn.btn-outline { background: transparent; border: 2px solid var(--blue-primary); color: var(--blue-primary); }
.hx-hero .hx-btn.btn-outline:hover { background: var(--blue-primary); color: #fff; }
.hx-hero .hx-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .hx-hero .hx-btn { width: 100%; } }
