/* ============================================================
   OPT-IN ALLAUCH - Larhantec 2026
   Pop-up Niveau 1 + Modale Niveau 2 + Ecran final
   ============================================================ */

.optin-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 9, 6, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Force complete masking when hidden attribute is set (covers Safari quirks
   where display:flex parents may still intercept events). */
.optin-modal[hidden] {
  display: none !important;
}

.optin-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.optin-card {
  position: relative;
  background: #f5e6d3;
  color: #0a0906;
  max-width: 480px;
  width: 100%;
  padding: 36px 28px 28px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(10, 9, 6, 0.15);
  max-height: 92vh;
  overflow-y: auto;
}

.optin-card-wide {
  max-width: 560px;
}

.optin-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #0a0906;
  cursor: pointer;
  opacity: 0.6;
  padding: 6px 10px;
  font-family: inherit;
}
.optin-close:hover { opacity: 1; }

.optin-eyebrow {
  font-family: 'Major Mono Display', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #8b4513;
  margin: 0 0 14px;
}

.optin-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #0a0906;
}

.optin-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  color: #0a0906;
  margin: 0 0 20px;
  opacity: 0.85;
}

.optin-field {
  margin-bottom: 14px;
}

.optin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 460px) {
  .optin-field-row { grid-template-columns: 1fr; }
}

.optin-field label {
  display: block;
  font-family: 'Major Mono Display', 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: #0a0906;
  opacity: 0.7;
  margin-bottom: 5px;
}

.optin-field input,
.optin-field textarea {
  width: 100%;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(10, 9, 6, 0.18);
  color: #0a0906;
  border-radius: 0;
  box-sizing: border-box;
}

.optin-field textarea { resize: vertical; min-height: 70px; }

.optin-field input:focus,
.optin-field textarea:focus {
  outline: none;
  border-color: #0a0906;
  background: #fff;
}

.optin-rgpd {
  display: flex;
  gap: 10px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 12px;
  line-height: 1.5;
  color: #0a0906;
  opacity: 0.75;
  margin: 14px 0 16px;
  cursor: pointer;
}
.optin-rgpd input { margin-top: 2px; flex-shrink: 0; }

.optin-submit {
  display: block;
  width: 100%;
  font-family: 'Major Mono Display', 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  background: #0a0906;
  color: #f5e6d3;
  border: 0;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.optin-submit:hover:not(:disabled) { background: #1a1612; }
.optin-submit:disabled { opacity: 0.55; cursor: wait; }

.optin-status {
  margin-top: 12px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  min-height: 18px;
}
.optin-status.is-ok    { color: #5a7c3a; }
.optin-status.is-error { color: #8b4513; }

.optin-skip {
  display: block;
  margin: 14px auto 0;
  background: transparent;
  border: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #0a0906;
  opacity: 0.55;
  text-decoration: underline;
  cursor: pointer;
}
.optin-skip:hover { opacity: 0.85; }

/* === Bouton "Demander le prix" sur acte 2 === */
.btn-ask-price {
  display: inline-block;
  margin-top: 20px;
  font-family: 'Major Mono Display', 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  background: transparent;
  color: var(--accent-color, #c9a86a);
  border: 1px solid currentColor;
  padding: 16px 26px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-ask-price:hover {
  background: var(--accent-color, #c9a86a);
  color: #0a0906;
}

/* ============================================================
   RACCOURCI "demander le prix" sur acte 0 (avant ecoute)
   Lien discret sous le bouton "toucher pour entrer".
   Codes galerie : Cormorant Garamond italic, palette rouille,
   trait fin de soulignement, never CTA flottant.
   ============================================================ */
.acte0-ask-price {
  display: inline-block;
  margin-top: 28px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--rouille-color, #8b4513);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.78;
  transition: opacity 0.25s ease, color 0.25s ease;
  text-align: center;
  line-height: 1.4;
}
.acte0-ask-price:hover,
.acte0-ask-price:focus-visible {
  opacity: 1;
  color: var(--accent-color, #c9a86a);
  outline: none;
}
@media (max-width: 480px) {
  .acte0-ask-price {
    margin-top: 24px;
    font-size: 15px;
    max-width: 300px;
    padding-bottom: 3px;
  }
}

/* ============================================================
   Panneau succes apres envoi (remplace le formulaire)
   ============================================================ */
.optin-success {
  text-align: center;
  padding: 32px 8px 16px;
  animation: optinSuccessIn 0.5s ease;
}
.optin-success-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-color, #c9a86a);
  color: #fff;
  font-size: 34px;
  line-height: 64px;
  margin: 0 auto 22px;
  font-family: Helvetica, Arial, sans-serif;
}
.optin-success-msg {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ink, #0a0906);
  margin: 0 0 14px;
}
.optin-success-sub {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #5a5550);
  margin: 0;
}
@keyframes optinSuccessIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .optin-success { padding: 24px 4px 12px; }
  .optin-success-mark { width: 56px; height: 56px; font-size: 30px; line-height: 56px; }
  .optin-success-msg { font-size: 22px; }
  .optin-success-sub { font-size: 14px; }
}
