/* ═══════════════════════════════════════════════════════════════
   LEONIO : Composant "Recevoir ma démo"
   Bouton CTA + modale formulaire, à injecter sur les pages
   /animations/*.html pour les produits éligibles à la démo solo.
   Utilise les tokens design du site (--orange, --cream, etc.).
   ═══════════════════════════════════════════════════════════════ */

/* ─── Bouton CTA injecté ─── */
.demo-req-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  background: var(--teal, #1CBCB4);
  color: #fff;
  border: 1.5px solid var(--teal, #1CBCB4);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(28, 188, 180, 0.18);
}
.demo-req-btn:hover {
  background: var(--teal-hover, #14a39c);
  border-color: var(--teal-hover, #14a39c);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(28, 188, 180, 0.28);
}
.demo-req-btn:active { transform: translateY(0); }
.demo-req-btn svg, .demo-req-btn i { width: 18px; height: 18px; flex-shrink: 0; }

/* Variante pour le CTA final (fond sombre) : on garde le teal mais plus contrasté */
.cta-final .demo-req-btn {
  background: var(--teal, #1CBCB4);
  border-color: var(--teal, #1CBCB4);
  padding: 16px 32px;
  font-size: 17px;
}
.cta-final .demo-req-btn:hover {
  background: #fff;
  color: var(--black, #1a1816);
  border-color: #fff;
}

@media (max-width: 500px) {
  .demo-req-btn { padding: 12px 20px; font-size: 14px; }
  .cta-final .demo-req-btn { padding: 13px 22px; font-size: 15px; }
}

/* ─── Modale ─── */
.demo-req-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 22, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.demo-req-overlay.active { display: flex; opacity: 1; }

.demo-req-modal {
  background: var(--cream, #faf9f7);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.25, 1.2, 0.3, 1);
  position: relative;
}
.demo-req-overlay.active .demo-req-modal { transform: scale(1) translateY(0); }

.demo-req-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-charcoal, #55534e);
  transition: background 0.15s;
  z-index: 2;
}
.demo-req-close:hover { background: #fff; color: var(--black, #1a1816); }
.demo-req-close svg, .demo-req-close i { width: 18px; height: 18px; }

/* ─── En-tête modale ─── */
.demo-req-head {
  padding: 36px 32px 18px;
  text-align: center;
  border-bottom: 1px solid var(--oat-light, #eee9df);
}
.demo-req-eyebrow {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal, #1CBCB4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.demo-req-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  color: var(--black, #1a1816);
  margin-bottom: 8px;
  line-height: 1.2;
}
.demo-req-title em { font-style: italic; color: var(--teal, #1CBCB4); }
.demo-req-subtitle {
  font-size: 14px;
  color: var(--warm-charcoal, #55534e);
  line-height: 1.5;
  margin: 0;
}

/* ─── Callout "Aucune appli, zéro carte bancaire" : LA promesse à mettre en valeur ─── */
.demo-req-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(28, 188, 180, 0.12), rgba(28, 188, 180, 0.06));
  border: 1.5px solid rgba(28, 188, 180, 0.35);
  border-radius: 14px;
  text-align: left;
}
.demo-req-callout svg {
  width: 22px;
  height: 22px;
  color: var(--teal, #1CBCB4);
  flex-shrink: 0;
  margin-top: 1px;
  filter: drop-shadow(0 1px 2px rgba(28, 188, 180, 0.25));
}
.demo-req-callout span {
  font-size: 14px;
  color: var(--black, #1a1816);
  line-height: 1.45;
}
.demo-req-callout strong {
  color: var(--teal, #1CBCB4);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ─── Audience radio cards : Particulier / Professionnel ─── */
.demo-req-audience-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.demo-req-audience-card {
  position: relative;
  cursor: pointer;
  display: block;
}
.demo-req-audience-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.demo-req-audience-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px 14px;
  background: #fff;
  border: 1.5px solid var(--oat, #dad4c8);
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
}
.demo-req-audience-card:hover .demo-req-audience-card-inner {
  border-color: var(--warm-charcoal, #55534e);
  transform: translateY(-2px);
}
.demo-req-audience-card input[type="radio"]:checked + .demo-req-audience-card-inner {
  border-color: var(--teal, #1CBCB4);
  background: rgba(28, 188, 180, 0.06);
  box-shadow: 0 0 0 3px rgba(28, 188, 180, 0.12);
}
.demo-req-audience-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--oat-light, #eee9df);
  color: var(--warm-charcoal, #55534e);
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.demo-req-audience-card input[type="radio"]:checked + .demo-req-audience-card-inner .demo-req-audience-icon {
  background: var(--teal, #1CBCB4);
  color: #fff;
}
.demo-req-audience-icon svg {
  width: 20px;
  height: 20px;
}
.demo-req-audience-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--black, #1a1816);
}
.demo-req-audience-hint {
  font-size: 11.5px;
  color: var(--warm-charcoal, #55534e);
  line-height: 1.35;
}

/* ─── Variant navy : quand le prospect coche "Professionnel" ─── */
/* L'accent passe de teal à navy sur la card sélectionnée + le bouton submit. */
.demo-req-modal.audience-b2b .demo-req-audience-card input[type="radio"]:checked + .demo-req-audience-card-inner {
  border-color: var(--navy, #1A365D);
  background: rgba(26, 54, 93, 0.06);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}
.demo-req-modal.audience-b2b .demo-req-audience-card input[type="radio"]:checked + .demo-req-audience-card-inner .demo-req-audience-icon {
  background: var(--navy, #1A365D);
  color: #fff;
}
.demo-req-modal.audience-b2b .demo-req-submit {
  background: var(--navy, #1A365D);
  border-color: var(--navy, #1A365D);
}
.demo-req-modal.audience-b2b .demo-req-submit:hover:not(:disabled) {
  background: var(--navy-hover, #152d4e);
  border-color: var(--navy-hover, #152d4e);
}
.demo-req-modal.audience-b2b .demo-req-input:focus,
.demo-req-modal.audience-b2b .demo-req-select:focus {
  border-color: var(--navy, #1A365D);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
}

/* ─── Form ─── */
.demo-req-form { padding: 22px 32px 28px; }
.demo-req-field { margin-bottom: 16px; }
.demo-req-field.compact { margin-bottom: 10px; }
.demo-req-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.demo-req-row-2col .demo-req-field { margin-bottom: 0; }
@media (max-width: 380px) {
  .demo-req-row-2col { grid-template-columns: 1fr; gap: 16px; }
}
.demo-req-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--warm-charcoal, #55534e);
  margin-bottom: 6px;
}
.demo-req-label .req { color: var(--orange, #E8702A); margin-left: 2px; }
.demo-req-label .hint {
  font-weight: 400;
  color: var(--warm-silver, #9f9b93);
  font-size: 11.5px;
  margin-left: 4px;
}
.demo-req-input,
.demo-req-select {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--oat, #dad4c8);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--black, #1a1816);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.demo-req-input:focus,
.demo-req-select:focus {
  border-color: var(--teal, #1CBCB4);
  box-shadow: 0 0 0 3px rgba(28, 188, 180, 0.15);
}
.demo-req-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355534e' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

/* ─── Honeypot caché ─── */
.demo-req-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ─── Submit ─── */
.demo-req-submit {
  width: 100%;
  padding: 15px 24px;
  background: var(--teal, #1CBCB4);
  color: #fff;
  border: 1.5px solid var(--teal, #1CBCB4);
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.demo-req-submit:hover:not(:disabled) {
  background: var(--teal-hover, #14a39c);
  border-color: var(--teal-hover, #14a39c);
  transform: translateY(-1px);
}
.demo-req-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}
.demo-req-submit svg, .demo-req-submit i { width: 18px; height: 18px; }
.demo-req-submit .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: demo-req-spin 0.7s linear infinite;
  display: none;
}
.demo-req-submit.loading .spinner { display: block; }
.demo-req-submit.loading .submit-label,
.demo-req-submit.loading svg,
.demo-req-submit.loading i { display: none; }
@keyframes demo-req-spin { to { transform: rotate(360deg); } }

/* ─── Reassure note ─── */
.demo-req-reassure {
  font-size: 11.5px;
  color: var(--warm-silver, #9f9b93);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* ─── Error message ─── */
.demo-req-error {
  display: none;
  background: #fff4e6;
  border: 1px solid #f4c18a;
  color: #7a4a05;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.demo-req-error.active { display: block; }

/* ─── Success state ─── */
.demo-req-success {
  display: none;
  padding: 40px 32px 36px;
  text-align: center;
}
.demo-req-success.active { display: block; }
.demo-req-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(28, 188, 180, 0.12);
  color: var(--teal, #1CBCB4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.demo-req-success-icon svg, .demo-req-success-icon i { width: 32px; height: 32px; }
.demo-req-success-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--black, #1a1816);
  margin-bottom: 10px;
}
.demo-req-success-text {
  font-size: 14.5px;
  color: var(--warm-charcoal, #55534e);
  line-height: 1.55;
  margin: 0 0 22px;
}
.demo-req-success-email {
  font-weight: 700;
  color: var(--black, #1a1816);
  word-break: break-word;
}
.demo-req-success-close {
  display: inline-block;
  padding: 11px 22px;
  background: var(--black, #1a1816);
  color: #fff;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.demo-req-success-close:hover { background: var(--warm-charcoal, #55534e); }

/* ─── Mobile tweaks ─── */
@media (max-width: 480px) {
  .demo-req-modal { border-radius: 18px; }
  .demo-req-head { padding: 28px 22px 16px; }
  .demo-req-form { padding: 18px 22px 24px; }
  .demo-req-title { font-size: 22px; }
}
