/* ===== Opt-in avant la vidéo de présentation (VSL) =====
   Ajout isolé : ne modifie aucun style existant de la landing. */

/* Bouclier invisible posé sur le lecteur tant que l'opt-in n'est pas validé :
   la miniature et le bouton Lecture de Wistia restent visibles, mais le clic ouvre la pop-up. */
.video .vsl-shield {
  all: unset; position: absolute; inset: 0; z-index: 2; cursor: pointer;
  border-radius: inherit; -webkit-tap-highlight-color: transparent;
}
.video .vsl-shield:focus-visible { outline: 2px solid var(--gold, #c9a65e); outline-offset: 3px; }

/* Pop-up */
.optin {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.optin[hidden] { display: none; }
.optin-fond {
  position: fixed; inset: 0;
  background: rgba(9, 14, 28, 0.62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.3s ease;
}
.optin-boite {
  position: relative; width: 100%; max-width: 440px; margin: auto;
  padding: 36px 28px 26px; border-radius: 28px;
  background: #ffffff; color: #111318;
  font-family: var(--text, "Geist", "Helvetica Neue", Arial, sans-serif);
  box-shadow: 0 40px 90px -30px rgba(9, 14, 28, 0.55), 0 0 0 1px rgba(17, 19, 24, 0.04);
  opacity: 0; transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.optin.is-open .optin-fond { opacity: 1; }
.optin.is-open .optin-boite { opacity: 1; transform: none; }
.optin.is-closing .optin-fond { transition-duration: 0.22s; }
.optin.is-closing .optin-boite { transition: opacity 0.2s ease, transform 0.22s ease; transform: scale(0.97); }

.optin-x {
  all: unset; position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: #5a5f6b;
  transition: background 0.2s, color 0.2s;
}
.optin-x:hover { background: #f1f2f4; color: #111318; }
.optin-x:focus-visible { outline: 2px solid #111318; outline-offset: 2px; }
.optin-x svg { width: 18px; height: 18px; }

.optin h2 {
  margin: 0 36px 10px 0; font-family: var(--display, inherit);
  font-size: clamp(1.45rem, 5.4vw, 1.75rem); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; color: #111318;
}
.optin-sous { margin: 0 0 22px; font-size: 0.98rem; line-height: 1.5; color: #4b505c; max-width: none; text-align: left; }

.optin-form { display: grid; gap: 14px; }
.optin-champ { display: grid; gap: 6px; }
.optin-champ label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.optin-champ input[type="text"], .optin-champ input[type="email"], .optin-champ input[type="tel"] {
  width: 100%; box-sizing: border-box; min-height: 54px; padding: 14px 16px;
  font: inherit; font-size: 16px; color: #111318; background: #ffffff;
  border: 1px solid #d5d8de; border-radius: 16px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.optin-champ input::placeholder { color: #8a8f99; opacity: 1; }
.optin-champ input:focus { border-color: #0e1a38; box-shadow: 0 0 0 3px rgba(14, 26, 56, 0.12); }
.optin-champ input[aria-invalid="true"] { border-color: #c4322b; box-shadow: 0 0 0 3px rgba(196, 50, 43, 0.1); }
.optin-erreur { margin: 0; padding-left: 4px; font-size: 0.84rem; line-height: 1.35; color: #b42a23; max-width: none; text-align: left; }
.optin-erreur:empty { display: none; }

/* Sélecteur d'indicatif (intl-tel-input) */
.optin .iti { width: 100%; display: block; }
.optin .iti__selected-country { border-radius: 16px 0 0 16px; }
.optin .iti__selected-dial-code { color: #111318; font-size: 16px; }
.iti--container { z-index: 1100; }
.iti__country-list, .iti__search-input { font-family: var(--text, inherit); }

.optin-case { display: flex; gap: 10px; align-items: flex-start; margin-top: 2px; font-size: 0.86rem; line-height: 1.4; color: #4b505c; cursor: pointer; }
.optin-case input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #0e1a38; }

.optin-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.optin-rassure { display: flex; gap: 8px; align-items: center; margin: 2px 0 0; font-size: 0.86rem; color: #4b505c; max-width: none; text-align: left; }
.optin-rassure svg { width: 16px; height: 16px; flex: none; color: #1f7a4d; }

.optin-general { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fdecea; color: #8f211b; font-size: 0.88rem; line-height: 1.4; max-width: none; text-align: left; }
.optin-general:empty { display: none; }

.optin .optin-envoyer { width: 100%; margin-top: 4px; }
.optin .optin-envoyer[disabled] { cursor: progress; opacity: 0.85; }
.optin-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: optin-tour 0.8s linear infinite; }
.optin-envoyer.is-loading .optin-spinner { display: inline-block; }
.optin-envoyer.is-loading svg { display: none; }
@keyframes optin-tour { to { transform: rotate(360deg); } }

.optin-info { margin: 2px 0 0; font-size: 0.76rem; line-height: 1.45; color: #6b707b; max-width: none; text-align: left; }
.optin-info a { color: #111318; text-decoration: underline; text-underline-offset: 2px; }

html.optin-ouvert, html.optin-ouvert body { overflow: hidden; }

@media (max-width: 420px) {
  .optin-boite { padding: 30px 20px 22px; border-radius: 24px; }
  .optin-x { top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .optin-fond, .optin-boite, .optin.is-closing .optin-boite { transition: none; transform: none; }
  .optin-spinner { animation-duration: 2s; }
}
.iti__search-input { font-size: 16px !important; padding: 10px 12px !important; }
