/* ============================================================================
   VEXTRA — landing hybride : sections ajoutées (P1-LANDING-IMPL-02)
   ----------------------------------------------------------------------------
   Aucun token n'est redéfini ici : couleurs, espacements, typographie et
   rayons viennent de /assets/v2.css (déjà chargé par index.html). Les valeurs
   `var(--line)`, `var(--surface)`, `var(--accent)`… sont donc les tokens
   existants du site, pas de nouvelles variables parallèles.
   ========================================================================== */

/* ── §2 Portefeuille produits ─────────────────────────────────────────────── */

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-3);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(2, 10, 23, 0.55);
}

.product-ico {
  color: var(--accent);
  line-height: 1;
}

.product-card h3 {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.2;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}

.product-card a {
  margin-top: auto;
  font-size: var(--step--1);
  font-weight: 600;
}

/* ── §3 Plans & tarifs ────────────────────────────────────────────────────── */

.billing-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-4) 0;
}

.billing-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

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

.billing-hint {
  color: var(--muted);
  font-size: var(--step--1);
  margin: 0;
}

.billing-save {
  color: var(--ok);
  font-weight: 700;
}

#plans-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-4);
  align-items: stretch;
  margin-top: var(--sp-4);
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  background: var(--surface);
}

.plan-highlight {
  border: 2px solid var(--accent);
  box-shadow: 0 8px 30px rgba(34, 201, 240, 0.16);
  transform: scale(1.02);
}

.plan-badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.plan-greek {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  text-align: center;
  font-family: var(--font-mono);
}

.plan-name {
  margin: 0;
  font-size: var(--step-1);
  text-align: center;
  line-height: 1.2;
}

.plan-target {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: var(--step--1);
}

.plan-tagline {
  margin: 0;
  text-align: center;
  font-size: var(--step--1);
  color: var(--fg);
  opacity: 0.9;
}

.plan-price {
  margin: var(--sp-2) 0;
  text-align: center;
  min-height: 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}

.price-amount {
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1;
}

.price-period {
  font-size: var(--step--1);
  color: var(--muted);
}

.price-free,
.price-devis {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--accent-strong);
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.plan-features .tick {
  color: var(--ok);
  font-weight: 700;
  margin-right: 0.4rem;
}

.plan-cta {
  margin-top: auto;
  text-align: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

.plan-highlight .plan-cta,
.plan-card[data-plan-id="beta"] .plan-cta {
  background: var(--accent);
  color: var(--accent-fg);
}

.plan-cta:hover {
  background: var(--accent-strong);
  color: var(--accent-fg);
  border-color: var(--accent-strong);
}

.compare-toggle {
  margin-top: var(--sp-4);
}

#plans-compare {
  margin-top: var(--sp-4);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 52rem;
}

.cmp-table th,
.cmp-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.cmp-table thead th {
  background: var(--surface-2);
  color: var(--fg);
  font-size: var(--step--1);
  white-space: nowrap;
}

.cmp-table tbody th {
  color: var(--muted);
  font-weight: 600;
}

.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td {
  border-bottom: 0;
}

.cmp-greek {
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 0.4rem;
}

#pricing-status[hidden] {
  display: none;
}

#pricing-status {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  color: var(--fg);
  background: rgba(245, 158, 11, 0.12);
}

/* ── §4 Timeline Beta ────────────────────────────────────────────────────── */

#beta-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.beta-phase {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.beta-phase-1 {
  border-top: 4px solid #10b981;
}

.beta-phase-2 {
  border-top: 4px solid #f59e0b;
}

.beta-phase-3 {
  border-top: 4px solid #6b7280;
}

.phase-step {
  margin: 0;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.phase-badge {
  margin: 0.25rem 0 0.15rem;
  font-size: var(--step-1);
}

.phase-days {
  margin: 0 0 var(--sp-2);
  font-size: var(--step--1);
  color: var(--muted);
  font-family: var(--font-mono);
}

.beta-phase ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--step--1);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.beta-phase li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.beta-phase li svg {
  flex: none;
  color: var(--accent);
  margin-top: 0.32em;
}

.beta-upsell {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.beta-upsell p {
  margin: 0;
}

/* ── §5 Accompagnement ───────────────────────────────────────────────────── */

#accompaniment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.accomp-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.accomp-card h3 {
  margin: 0;
  font-size: var(--step-1);
}

.accomp-format {
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}

.accomp-price {
  margin: var(--sp-2) 0 0;
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--accent-strong);
  line-height: 1.1;
}

.accomp-unit {
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--muted);
}

.accomp-eligible {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}

.accomp-cta {
  margin-top: auto;
  text-align: center;
  justify-content: center;
}

/* ── §6 Simulateur ───────────────────────────────────────────────────────── */

#simulator {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-top: var(--sp-4);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--sp-5);
}

.sim-field {
  margin: 0 0 var(--sp-4);
}

.sim-field:last-child {
  margin-bottom: 0;
}

.sim-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.sim-range-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

#sim-users {
  width: 100%;
  accent-color: var(--accent);
}

#sim-users-value {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--accent);
  min-width: 3ch;
  text-align: right;
}

.sim-modules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.sim-modules label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--step--1);
  cursor: pointer;
}

.sim-modules input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

#sim-hosting {
  width: 100%;
  max-width: 22rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.sim-result-box {
  border-left: 2px solid var(--line);
  padding-left: var(--sp-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-2);
}

#sim-result {
  font-size: var(--step-1);
  font-weight: 700;
  margin: 0;
  color: var(--accent);
  line-height: 1.4;
}

#sim-detail {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--step--1);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sim-cta {
  align-self: flex-start;
}

/* ── §7 Services d'agence ────────────────────────────────────────────────── */

#services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.service-card h3 {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.25;
}

.service-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}

.service-meta {
  min-height: 1.15em;
}

.service-price {
  margin: auto 0 var(--sp-3);
  font-weight: 700;
  color: var(--accent-strong);
  text-wrap: balance;
}

.service-card .btn {
  margin-top: 0;
  text-align: center;
  justify-content: center;
}

.regie-line {
  margin: var(--sp-4) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.regie-line strong {
  color: var(--fg);
}

/* ── §11 CTA final ───────────────────────────────────────────────────────── */

.final-cta {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-3);
}

.final-cta h2 {
  margin: 0;
  max-width: 30ch;
}

.final-cta p {
  margin: 0;
  color: var(--muted);
}

.final-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.final-choice {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.final-choice:hover,
.final-choice:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.final-choice strong {
  font-size: var(--step-0);
}

.final-choice span {
  font-size: var(--step--1);
  color: var(--muted);
}

/* ── Repli sans JS ───────────────────────────────────────────────────────── */

.nojs {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--step--1);
}

.nojs ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  #plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-highlight {
    transform: none;
  }
}

@media (max-width: 900px) {
  #beta-timeline,
  #accompaniment-grid,
  #simulator,
  .final-choices {
    grid-template-columns: 1fr;
  }

  .sim-result-box {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: var(--sp-3);
  }
}

@media (max-width: 640px) {
  #plans-grid,
  .products-grid,
  #services-grid {
    grid-template-columns: 1fr;
  }

  .plan-badge {
    position: static;
    display: inline-block;
    transform: none;
    margin: 0 auto var(--sp-1);
  }

  .plan-card {
    align-items: stretch;
  }
}

/* Respecte la préférence système de réduction des animations (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .final-choice,
  .plan-highlight {
    transition: none;
    transform: none;
  }
}
