/* ════════════════════════════════════════════════════════════════════════
   RG-HYDRAULIQUE — Encart Code Promo (avis Google)
   ────────────────────────────────────────────────────────────────────────
   Design : carte verte avec accent doré, ton « cadeau remerciement »
   Cohérent avec la charte du calculateur et du simulateur.
   ════════════════════════════════════════════════════════════════════════ */

/* ─── Carte d'invitation (placée entre calculateur tarif et simulateur) ─── */
.promo-card {
  background: linear-gradient(135deg, #f4faf2 0%, #fff8e7 100%);
  border: 2px solid #d4af37;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 32px 0;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.12);
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.promo-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.promo-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.promo-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d4029;
  line-height: 1.3;
}
.promo-card-title strong {
  color: #b8941f;
}

.promo-card-body {
  font-size: .95rem;
  color: #3a4d3f;
  margin: 0 0 16px 0;
  line-height: 1.55;
}

.promo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.promo-btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}
.promo-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.45);
}
.promo-btn-secondary {
  background: #fff;
  color: #1d4029;
  border: 1px solid #d8dfd6;
}
.promo-btn-secondary:hover {
  background: #f4f7f5;
}

/* ─── Modal Promo ─── */
.promo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 22, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: promoFadeIn .2s ease-out;
}
.promo-modal-overlay.is-open { display: flex; }

@keyframes promoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes promoSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.promo-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: promoSlideUp .25s ease-out;
}

.promo-modal-header {
  background: linear-gradient(135deg, #2d5a3d 0%, #1d4029 100%);
  color: #fff;
  padding: 24px 28px;
  border-radius: 18px 18px 0 0;
  position: relative;
}
.promo-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}
.promo-modal-header p {
  margin: 6px 0 0 0;
  font-size: .95rem;
  opacity: .9;
}
.promo-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.promo-modal-close:hover { background: rgba(255,255,255,0.25); }

.promo-modal-body {
  padding: 24px 28px;
}

/* ─── Étapes du flux ─── */
.promo-step {
  display: none;
}
.promo-step.is-active { display: block; }

.promo-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d4029;
  margin: 0 0 12px 0;
}
.promo-step-text {
  font-size: .95rem;
  color: #3a4d3f;
  line-height: 1.55;
  margin: 0 0 16px 0;
}

/* ─── Étape 1 : invitation à laisser un avis ─── */
.promo-reward-box {
  background: linear-gradient(135deg, #f9f5e7 0%, #fef3d1 100%);
  border: 2px dashed #d4af37;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  margin: 0 0 20px 0;
}
.promo-reward-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: #b8941f;
  margin: 0;
  line-height: 1;
}
.promo-reward-label {
  font-size: .85rem;
  color: #6b5410;
  margin: 4px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.promo-google-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #4285F4;
  color: #fff;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  transition: background .15s ease, transform .15s ease;
}
.promo-google-link:hover {
  background: #2b6cd5;
  transform: translateY(-1px);
}
.promo-google-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.promo-help-text {
  font-size: .85rem;
  color: #6b7268;
  text-align: center;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* ─── Étape 2 : formulaire email ─── */
.promo-form-group {
  margin-bottom: 14px;
}
.promo-form-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: #1d4029;
  margin-bottom: 6px;
}
.promo-form-label small {
  font-weight: 400;
  color: #6b7268;
}
.promo-form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d8dfd6;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: #1d2b21;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.promo-form-input:focus {
  outline: none;
  border-color: #4a8264;
  box-shadow: 0 0 0 3px rgba(74, 130, 100, 0.15);
}
.promo-form-input.has-error {
  border-color: #c43d3d;
  box-shadow: 0 0 0 3px rgba(196, 61, 61, 0.12);
}

.promo-honor-note {
  background: #f4f7f5;
  border-left: 3px solid #4a8264;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: .85rem;
  color: #3a4d3f;
  margin: 16px 0;
  line-height: 1.5;
}

.promo-modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.promo-modal-footer .promo-btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
}

/* ─── Étape 3 : confirmation ─── */
.promo-success-icon {
  text-align: center;
  font-size: 3.5rem;
  margin: 0 0 16px 0;
}
.promo-success-code {
  background: #f4f7f5;
  border: 2px dashed #4a8264;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin: 16px 0;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1d4029;
}

.promo-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .9rem;
  margin: 12px 0;
  line-height: 1.5;
}
.promo-alert-error {
  background: #fdecec;
  color: #8a1f1f;
  border: 1px solid #f5b5b5;
}
.promo-alert-info {
  background: #e8f1ec;
  color: #1d4029;
  border: 1px solid #b8d4c2;
}

/* ─── Loader bouton ─── */
.promo-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}
.promo-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: promoSpin .8s linear infinite;
  vertical-align: middle;
}
@keyframes promoSpin {
  to { transform: rotate(360deg); }
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .promo-card { padding: 18px 20px; }
  .promo-card-title { font-size: 1.05rem; }
  .promo-card-icon { font-size: 1.6rem; }
  .promo-modal-header { padding: 20px 22px; }
  .promo-modal-header h2 { font-size: 1.15rem; }
  .promo-modal-body { padding: 20px 22px; }
  .promo-reward-amount { font-size: 1.5rem; }
  .promo-modal-footer .promo-btn { width: 100%; flex: none; }
}
