/* Page commerciale (visiteurs non connectés). S'appuie sur les variables et composants de app.css. */
.vitrine { background: var(--surface); font-size: 1rem; }
.vitrine section[id] { scroll-margin-top: 5rem; }
.v-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.v-container-narrow { max-width: 820px; }
.v-accent { color: var(--primary); }
.v-eyebrow { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary-dark); background: rgba(var(--primary-rgb), .1); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem; }

/* Navigation */
.v-nav { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--bs-border-color); }
.v-nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.v-nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.v-nav-links a { color: var(--nav-link-color); font-weight: 700; font-size: .9rem; }
.v-nav-links a:hover { color: var(--primary); }
@media (max-width: 991.98px) { .v-nav-links { display: none; } .v-nav-inner > div { margin-left: auto; } }

/* Accès aux deux espaces de connexion : orange = enseignant, bleu = étudiant */
.vitrine .espace-enseignant { --espace: #F77F00; --espace-fonce: #c96700; --espace-rgb: 247, 127, 0; }
.vitrine .espace-etudiant { --espace: #2f80ed; --espace-fonce: #1f63c0; --espace-rgb: 47, 128, 237; }
.v-btn-espace { --bs-btn-color: var(--espace-fonce); --bs-btn-bg: rgba(var(--espace-rgb), .1); --bs-btn-border-color: rgba(var(--espace-rgb), .5);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--espace); --bs-btn-hover-border-color: var(--espace);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--espace-fonce); --bs-btn-active-border-color: var(--espace-fonce);
  --bs-btn-focus-shadow-rgb: var(--espace-rgb); border-width: 1.5px; font-weight: 800; white-space: nowrap; }
[data-bs-theme="dark"] .v-btn-espace { --bs-btn-color: var(--espace); --bs-btn-bg: rgba(var(--espace-rgb), .16); }
.v-btn-espace:hover { box-shadow: 0 .5rem 1rem rgba(var(--espace-rgb), .3); transform: translateY(-1px); }
.v-nav .v-btn-espace { padding-left: .85rem; padding-right: .85rem; }
.v-deja-inscrit { margin: -.75rem 0 1.5rem; font-size: .9rem; color: var(--bs-secondary-color); }
.v-deja-inscrit a { font-weight: 800; color: var(--espace-fonce); white-space: nowrap; }
@media (max-width: 575.98px) {
  .v-nav-inner { gap: .75rem; }
  .v-nav-inner > div { gap: .35rem !important; }
  .v-nav #theme-toggle { display: none; }
  .v-nav .btn { padding-left: .65rem; padding-right: .65rem; }
}
.v-deja-inscrit a:hover { text-decoration: underline; }
.v-deja-inscrit span { margin: 0 .35rem; color: var(--bs-tertiary-color); }

/* Hero */
.v-hero { position: relative; overflow: hidden; padding: 5rem 0 6rem;
  background: radial-gradient(60rem 30rem at 85% -10%, rgba(var(--primary-rgb), .14), transparent 60%), var(--bs-body-bg); }
.v-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 991.98px) { .v-hero { padding: 3rem 0 4rem; } .v-hero-grid { grid-template-columns: 1fr; } }
.v-hero-title { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 1.25rem; }
.v-lead { font-size: 1.15rem; color: var(--bs-secondary-color); margin-bottom: 2rem; max-width: 36rem; }
.v-lead-sm { font-size: 1.05rem; color: var(--bs-secondary-color); }
.v-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.v-checks li { display: flex; gap: .6rem; align-items: baseline; color: var(--bs-body-color); font-weight: 600; }
.v-checks i { color: #25b003; }

.v-hero-visual { position: relative; }
.v-window { background: var(--surface); border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden;
  box-shadow: 0 1.5rem 3.5rem rgba(20, 24, 36, .14); }
.v-window-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid var(--bs-border-color);
  background: var(--nav-link-hover-bg); }
.v-window-bar span { width: .65rem; height: .65rem; border-radius: 50%; background: var(--bs-border-color); }
.v-window-bar span:first-child { background: #ff6b5f; } .v-window-bar span:nth-child(2) { background: #ffc130; } .v-window-bar span:nth-child(3) { background: #28c840; }
.v-window-bar em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--bs-tertiary-color); margin-left: .6rem; }
.v-window-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; background: var(--bs-body-bg); }
.v-float { position: absolute; display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; border-radius: .6rem; font-size: .85rem;
  font-weight: 800; background: var(--surface); border: 1px solid var(--bs-border-color); box-shadow: 0 .75rem 2rem rgba(20, 24, 36, .12); }
.v-float i { color: var(--primary); }
.v-float-1 { left: -1.5rem; bottom: 2.5rem; }
.v-float-2 { right: -1rem; top: -1.1rem; }
@media (max-width: 575.98px) { .v-float { display: none; } }

/* Sections */
.v-section { padding: 5.5rem 0; }
.v-section-alt { background: var(--bs-body-bg); }
.v-section-head { text-align: center; max-width: 44rem; margin: 0 auto 3rem; }
.v-section-head h2, .v-split h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -.01em; }
.v-section-head p { color: var(--bs-secondary-color); font-size: 1.05rem; margin: 0; }

.v-card { height: 100%; padding: 1.75rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--surface);
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.v-card:hover { transform: translateY(-3px); border-color: rgba(var(--primary-rgb), .35); box-shadow: 0 1rem 2rem rgba(20, 24, 36, .08); }
.v-card h3 { font-size: 1.1rem; font-weight: 800; margin: 1rem 0 .5rem; }
.v-card p { color: var(--bs-secondary-color); font-size: .95rem; }
.v-icon { width: 3rem; height: 3rem; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; background: rgba(var(--primary-rgb), .12); color: var(--primary-dark); }
.v-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.v-tags li { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--nav-link-hover-bg); color: var(--bs-secondary-color); }

/* Étapes */
.v-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: none; }
@media (max-width: 991.98px) { .v-steps { grid-template-columns: 1fr; } }
.v-steps li { position: relative; padding: 2rem 1.75rem 1.75rem; background: var(--surface); border: 1px solid var(--bs-border-color); border-radius: .75rem; }
.v-steps h3 { font-size: 1.15rem; font-weight: 800; margin: 1rem 0 .5rem; }
.v-steps p { color: var(--bs-secondary-color); margin: 0; }
.v-step-num { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; background: var(--primary); color: #fff; box-shadow: 0 .5rem 1rem rgba(var(--primary-rgb), .35); }

/* Zoom format texte */
.v-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 991.98px) { .v-split { grid-template-columns: 1fr; gap: 2.5rem; } }
.v-code-demo .exemple-format { font-size: .9rem; padding: 1.1rem 1.25rem; }
.v-arrow { text-align: center; color: var(--primary); padding: .6rem 0; font-size: 1.1rem; }

/* Bandeau CTA */
.v-band { background: linear-gradient(120deg, var(--primary), #ff9a2e); color: #fff; padding: 2.75rem 0; }
.v-band-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.v-band h2 { color: #fff; font-weight: 900; font-size: 1.75rem; margin: 0 0 .25rem; }
.v-band p { margin: 0; opacity: .92; font-size: 1.05rem; }
.v-band .btn-light { font-weight: 800; color: var(--primary-dark); }

/* Fonctionnalités */
.v-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; }
@media (max-width: 991.98px) { .v-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .v-features { grid-template-columns: 1fr; } }
.v-feature { display: flex; gap: 1rem; }
.v-feature > i { flex: none; width: 2.5rem; height: 2.5rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--primary-rgb), .1); color: var(--primary-dark); }
.v-feature h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .3rem; }
.v-feature p { font-size: .9rem; color: var(--bs-secondary-color); margin: 0; }
.v-soon > i { background: var(--nav-link-hover-bg); color: var(--bs-tertiary-color); }
.v-badge-soon { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; border-radius: .25rem;
  background: var(--nav-link-hover-bg); color: var(--bs-secondary-color); vertical-align: middle; margin-left: .3rem; }

/* Tarifs */
.v-price { position: relative; height: 100%; display: flex; flex-direction: column; gap: .75rem; padding: 2rem 1.75rem;
  background: var(--surface); border: 1px solid var(--bs-border-color); border-radius: .75rem; }
.v-price h3 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.v-price-amount { font-size: 2rem; font-weight: 900; color: var(--bs-emphasis-color); }
.v-price p { color: var(--bs-secondary-color); margin: 0; }
.v-price .v-checks { flex: 1; margin: .5rem 0 1rem; font-size: .92rem; }
.v-price-featured { border: 2px solid var(--primary); box-shadow: 0 1.25rem 2.5rem rgba(var(--primary-rgb), .15); }
.v-price-flag { position: absolute; top: -.8rem; left: 1.75rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: .2rem .65rem; border-radius: 999px; background: var(--primary); color: #fff; }

/* FAQ */
.v-faq { display: flex; flex-direction: column; gap: .75rem; }
.v-faq details { border: 1px solid var(--bs-border-color); border-radius: .6rem; background: var(--surface); padding: 0 1.25rem; }
.v-faq summary { cursor: pointer; list-style: none; font-weight: 800; padding: 1.1rem 0; display: flex; justify-content: space-between; gap: 1rem;
  color: var(--bs-emphasis-color); }
.v-faq summary::-webkit-details-marker { display: none; }
.v-faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); font-weight: 800; }
.v-faq details[open] summary::after { content: "−"; }
.v-faq details p { color: var(--bs-secondary-color); padding-bottom: 1.1rem; margin: 0; }

/* CTA final et pied de page */
.v-final { padding: 5.5rem 0; background: radial-gradient(50rem 22rem at 50% 120%, rgba(var(--primary-rgb), .14), transparent 70%), var(--bs-body-bg); }
.v-final h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; max-width: 40rem; margin: 0 auto 1rem; }
.v-final p { color: var(--bs-secondary-color); font-size: 1.05rem; margin-bottom: 2rem; }
.v-footer { border-top: 1px solid var(--bs-border-color); padding: 2rem 0; background: var(--surface); }
.v-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.v-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.v-footer nav a { color: var(--bs-secondary-color); font-weight: 600; font-size: .9rem; }
.v-footer nav a:hover { color: var(--primary); }
.v-footer p { margin: 0; color: var(--bs-tertiary-color); font-size: .85rem; }

/* ---------- Animations ---------- */
.v-nav { transition: box-shadow .25s; }
.v-nav.is-scrolled { box-shadow: 0 .5rem 1.5rem rgba(20, 24, 36, .08); }
.vitrine .btn { transition: transform .15s, box-shadow .15s, background-color .15s, color .15s; }
.vitrine .btn-primary:hover, .v-band .btn-light:hover { transform: translateY(-2px); box-shadow: 0 .6rem 1.2rem rgba(var(--primary-rgb), .3); }
.v-price { transition: transform .25s, box-shadow .25s; }
.v-price:hover { transform: translateY(-6px); box-shadow: 0 1.5rem 3rem rgba(20, 24, 36, .1); }
.v-feature > i { transition: transform .25s, background-color .25s, color .25s; }
.v-feature:hover > i { transform: rotate(-8deg) scale(1.1); background: var(--primary); color: #fff; }
.v-steps li { transition: transform .25s, box-shadow .25s; }
.v-steps li:hover { transform: translateY(-4px); box-shadow: 0 1rem 2rem rgba(20, 24, 36, .08); }
.v-window { transition: transform .3s ease-out; transform-style: preserve-3d; }
.v-faq details { transition: border-color .2s, box-shadow .2s; }
.v-faq details[open] { border-color: rgba(var(--primary-rgb), .4); box-shadow: 0 .5rem 1.25rem rgba(20, 24, 36, .05); }
.v-faq summary::after { transition: transform .25s; }
.v-faq details[open] summary::after { transform: rotate(180deg); }

@media (prefers-reduced-motion: no-preference) {
  /* Entrée du hero au chargement */
  .v-hero-grid > div:first-child > * { animation: v-monte .7s cubic-bezier(.2, .7, .2, 1) both; }
  .v-hero-grid > div:first-child > :nth-child(2) { animation-delay: .08s; }
  .v-hero-grid > div:first-child > :nth-child(3) { animation-delay: .16s; }
  .v-hero-grid > div:first-child > :nth-child(4) { animation-delay: .24s; }
  .v-hero-grid > div:first-child > :nth-child(5) { animation-delay: .32s; }
  .v-hero-grid > div:first-child > :nth-child(6) { animation-delay: .4s; }
  .v-hero-visual { animation: v-monte .9s .25s cubic-bezier(.2, .7, .2, 1) both; }
  .v-window-body .qc { animation: v-monte .6s cubic-bezier(.2, .7, .2, 1) both; }
  .v-window-body .qc:nth-child(1) { animation-delay: .6s; }
  .v-window-body .qc:nth-child(2) { animation-delay: .8s; }
  .v-float { animation: v-flotte 5s ease-in-out infinite, v-apparait .6s 1s both; }
  .v-float-2 { animation-delay: -2.5s, 1.2s; }
  .v-accent { background: linear-gradient(90deg, var(--primary), #ffb347, var(--primary)); background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: v-brille 6s linear infinite; }
  .v-band { background-size: 200% 100%; background-image: linear-gradient(120deg, var(--primary), #ff9a2e, var(--primary));
    animation: v-brille 10s linear infinite; }
  .v-step-num { animation: v-pulse 2.8s ease-in-out infinite; }
  .v-steps li:nth-child(2) .v-step-num { animation-delay: .9s; }
  .v-steps li:nth-child(3) .v-step-num { animation-delay: 1.8s; }

  /* Apparition au défilement (classe posée par vitrine.js uniquement) */
  .v-anim .v-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms),
    transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
  .v-anim .v-reveal.is-visible { opacity: 1; transform: none; }
  .v-anim .v-card.v-reveal.is-visible:hover { transform: translateY(-3px); }
  .v-anim .v-price.v-reveal.is-visible:hover { transform: translateY(-6px); }
  .v-anim .v-steps li.v-reveal.is-visible:hover { transform: translateY(-4px); }

  /* Démo de saisie : curseur pendant la frappe, puis la carte se révèle */
  .v-code-demo.is-typing pre::after { content: "▍"; color: var(--primary); animation: v-clignote .8s steps(1) infinite; }
  .v-code-demo.is-typing .qc, .v-code-demo.is-typing .v-arrow { opacity: 0; transform: translateY(12px); }
  .v-code-demo .qc, .v-code-demo .v-arrow { transition: opacity .5s, transform .5s; }
  .v-code-demo.is-done .v-arrow { animation: v-rebond 1.2s ease-in-out 2; }
  .v-code-demo.is-typing .qc-reponses li { opacity: 0; }
  .v-code-demo.is-done .qc-reponses li { animation: v-glisse .4s both; }
  .v-code-demo.is-done .qc-reponses li:nth-child(2) { animation-delay: .12s; }
  .v-code-demo.is-done .qc-reponses li:nth-child(3) { animation-delay: .24s; }
  .v-code-demo.is-done .qc-reponses li.is-correct i { animation: v-pop .5s .5s both; }
}

@keyframes v-monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes v-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes v-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes v-brille { to { background-position: -200% center; } }
@keyframes v-pulse { 0%, 100% { box-shadow: 0 .5rem 1rem rgba(var(--primary-rgb), .35), 0 0 0 0 rgba(var(--primary-rgb), .35); }
  50% { box-shadow: 0 .5rem 1rem rgba(var(--primary-rgb), .35), 0 0 0 .6rem rgba(var(--primary-rgb), 0); } }
@keyframes v-clignote { 50% { opacity: 0; } }
@keyframes v-rebond { 0%, 100% { transform: none; } 50% { transform: translateY(6px); } }
@keyframes v-glisse { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes v-pop { 0% { transform: scale(1); } 50% { transform: scale(1.6); } 100% { transform: scale(1); } }
