/* ============================================================
   Feedback modal — shared success/error popup for forms
   Used by contact.php and offre-d-emploi.php (FR/EN/AR)
   ============================================================ */

.fb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.fb-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.fb-modal {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 440px;
  padding: 48px 36px 36px;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25), 0 10px 25px rgba(15, 23, 42, 0.12);
  text-align: center;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.fb-overlay.is-open .fb-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.fb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  color: #475569;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

[dir="rtl"] .fb-close {
  right: auto;
  left: 14px;
}

.fb-close:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: rotate(90deg);
}

.fb-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fb-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  opacity: 0.18;
  animation: fb-pulse 1.6s ease-out infinite;
}

@keyframes fb-pulse {
  0% { transform: scale(0.85); opacity: 0.35; }
  100% { transform: scale(1.25); opacity: 0; }
}

.fb-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 2.5;
  position: relative;
  z-index: 1;
}

.fb-modal--success .fb-icon { background: #DCFCE7; color: #16A34A; }
.fb-modal--success .fb-icon::before { background: #22C55E; }

.fb-modal--error .fb-icon { background: #FEE2E2; color: #DC2626; }
.fb-modal--error .fb-icon::before { background: #EF4444; }

.fb-title {
  font-family: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

[dir="rtl"] .fb-title {
  font-family: 'Noto Sans Arabic', 'DM Sans', sans-serif;
}

.fb-message {
  font-size: 15px;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 28px;
}

.fb-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  background: #0F172A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  min-width: 140px;
}

[dir="rtl"] .fb-action {
  font-family: 'Noto Sans Arabic', 'DM Sans', sans-serif;
}

.fb-action:hover {
  background: #0284C7;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.fb-modal--success .fb-action { background: #16A34A; }
.fb-modal--success .fb-action:hover { background: #15803D; box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3); }

.fb-modal--error .fb-action { background: #DC2626; }
.fb-modal--error .fb-action:hover { background: #B91C1C; box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3); }

@media (max-width: 480px) {
  .fb-modal { padding: 40px 24px 28px; border-radius: 14px; }
  .fb-icon { width: 68px; height: 68px; margin-bottom: 16px; }
  .fb-icon svg { width: 32px; height: 32px; }
  .fb-title { font-size: 20px; }
  .fb-message { font-size: 14px; margin-bottom: 22px; }
}

/* Body scroll lock when open */
body.fb-locked { overflow: hidden; }
