/* ================================================
   PAGE FONCTIONNALITÉS > CAMPAGNES WHATSAPP
   Variables héritées de default.css et section-fonctionnalites.css
   --green-dark, --green-light, --bg-soft, --radius,
   --text-dark, --text-gray, --mono, --fonct-line, --fonct-code-bg
================================================ */

:root {
  --wa-brand: #25D366;
  --wa-bubble: #dcf8c6;
  --wa-read: #34b7f1;
}

/* ────────────────────────────────────────────────
   HERO — deux colonnes : texte + téléphone
──────────────────────────────────────────────── */
.wa-hero {
  padding: 150px 0 90px;
  background: linear-gradient(to bottom, #ffffff 0%, var(--bg-soft) 60%, #ffffff 100%);
}

.wa-hero-grid {
  display: grid;
  gap: 50px;
  align-items: center;
}

.wa-hero-content h1 {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.wa-hero-content .fonct-hero-subtitle {
  text-align: left;
  max-width: 540px;
}

.wa-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 16px;
}

.wa-hero-content .fonct-hero-micro {
  font-size: .85rem;
  color: #777;
}

.wa-hero-visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 992px) {
  .wa-hero-grid {
    grid-template-columns: 1.05fr .95fr;
  }

  .wa-hero-visual {
    justify-content: flex-end;
  }
}

/* ────────────────────────────────────────────────
   MAQUETTE TÉLÉPHONE — élément signature de la page
──────────────────────────────────────────────── */
.wa-phone {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 26px;
  border: 1px solid var(--fonct-line);
  box-shadow: 0 30px 60px rgba(15, 47, 34, .14);
  overflow: hidden;
}

.wa-phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-dark);
  color: #fff;
  padding: 14px 16px;
  font-size: .85rem;
}

.wa-phone-header > i {
  font-size: .8rem;
  opacity: .85;
  flex-shrink: 0;
}

.wa-phone-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.wa-phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--wa-brand);
}

.wa-phone-contact strong {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-phone-contact small {
  display: block;
  font-size: .7rem;
  color: rgba(255, 255, 255, .75);
}

.wa-phone-body {
  background: #ece5dd;
  padding: 20px 14px;
  min-height: 150px;
  display: flex;
  align-items: flex-start;
}

.wa-bubble {
  background: var(--wa-bubble);
  border-radius: 10px;
  padding: 8px 10px 6px;
  max-width: 92%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

.wa-bubble-image {
  height: 130px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.wa-bubble-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wa-bubble p {
  font-size: .82rem;
  line-height: 1.42;
  color: #111b0e;
  margin-bottom: 4px;
}

.wa-bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.wa-bubble-time {
  font-size: .66rem;
  color: rgba(0, 0, 0, .45);
}

.wa-bubble-ticks {
  display: inline-flex;
  font-size: .66rem;
  color: rgba(0, 0, 0, .45);
}

.wa-bubble-ticks i {
  margin-left: -3px;
}

.wa-bubble-ticks i:first-child {
  margin-left: 0;
}

.wa-bubble-ticks i:nth-child(2) {
  animation: wa-tick-read 4s ease-in-out infinite;
}

@keyframes wa-tick-read {
  0%, 55% { color: rgba(0, 0, 0, .45); }
  75%, 100% { color: var(--wa-read); }
}

.wa-phone-progress {
  padding: 14px 16px 18px;
  background: #fff;
  border-top: 1px solid var(--fonct-line);
}

.wa-phone-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.wa-phone-progress-row strong {
  color: var(--text-dark);
  font-family: var(--mono);
}

.wa-phone-progress-bar {
  height: 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-bottom: 10px;
}

.wa-progress-fill {
  display: block;
  height: 100%;
  width: 75%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--green-light), var(--green-dark));
  animation: wa-progress-grow 4s ease-in-out infinite;
}

@keyframes wa-progress-grow {
  0% { width: 40%; }
  60%, 100% { width: 75%; }
}

.wa-phone-progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-gray);
}

.wa-phone-progress-stats i {
  color: var(--green-dark);
  margin-right: 4px;
}

/* ────────────────────────────────────────────────
   ÉTAPES — "Comment ça marche" (vraie séquence)
──────────────────────────────────────────────── */
.wa-steps {
  list-style: none;
  max-width: 760px;
}

.wa-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  position: relative;
  padding-bottom: 34px;
}

.wa-step::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 46px;
  bottom: 0;
  width: 1px;
  background: var(--fonct-line);
}

.wa-step:last-child::before {
  display: none;
}

.wa-step:last-child {
  padding-bottom: 0;
}

.wa-step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--fonct-line);
  color: var(--green-dark);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.wa-step-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.wa-step-body p {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--text-gray);
}

/* ────────────────────────────────────────────────
   CAPTURE D'ÉCRAN PRODUIT
──────────────────────────────────────────────── */
.wa-screenshot {
  margin-top: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--fonct-line);
  box-shadow: 0 20px 45px rgba(15, 47, 34, .10);
  overflow: hidden;
  background: #fff;
}

.wa-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ────────────────────────────────────────────────
   CAS D'USAGE — grille de cartes
──────────────────────────────────────────────── */
.wa-usecases-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .wa-usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .wa-usecases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.wa-usecase-card {
  background: #fff;
  border: 1px solid var(--fonct-line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.wa-usecase-card i {
  font-size: 1.2rem;
  color: var(--green-dark);
  background: var(--fonct-code-bg);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.wa-usecase-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.wa-usecase-card p {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text-gray);
}

/* ────────────────────────────────────────────────
   COMPARATIF DE CHAÎNE DE VALEUR — outil classique vs zBilling.net
──────────────────────────────────────────────── */
.wa-flow-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.wa-flow-row {
  background: #fff;
  border: 1.5px solid var(--fonct-line);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.wa-flow-row--zbilling {
  border-color: rgba(89, 174, 52, .4);
  background: var(--bg-soft);
}

.wa-flow-label {
  display: block;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-gray);
  margin-bottom: 12px;
}

.wa-flow-row--zbilling .wa-flow-label {
  color: var(--green-dark);
}

.wa-flow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wa-flow-chain i {
  font-size: .65rem;
  color: var(--text-gray);
  flex-shrink: 0;
}

.wa-flow-step {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.wa-flow-row--zbilling .wa-flow-step {
  background: #fff;
  border: 1px solid rgba(89, 174, 52, .3);
  color: var(--green-dark);
}

/* ────────────────────────────────────────────────
   ACCESSIBILITÉ — mouvement réduit
──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wa-bubble-ticks i:nth-child(2),
  .wa-progress-fill {
    animation: none;
  }

  .wa-bubble-ticks i:nth-child(2) {
    color: var(--wa-read);
  }

  .wa-progress-fill {
    width: 75%;
  }
}
