/* ==================================================================
   POP-UPS FRONT-END - Styles pour l'affichage des pop-ups
   ================================================================== */

.lb-popup {
  position: fixed;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
  pointer-events: none;
}

.lb-popup.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Position centre */
.lb-popup--center {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lb-popup--center .lb-popup__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: -1;
}

.lb-popup--center .lb-popup__container {
  position: relative;
  max-width: 500px;
  width: 100%;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Position bas-droite */
.lb-popup--bottom-right {
  bottom: 2rem;
  right: 2rem;
  max-width: 380px;
}

.lb-popup--bottom-right .lb-popup__container {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 640px) {
  .lb-popup--bottom-right {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  .lb-popup--center .lb-popup__container {
    padding: 1.5rem;
  }
}

/* Bouton de fermeture */
.lb-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 1;
}

.lb-popup__close:hover {
  background: #f3f4f6;
  color: #000;
}

/* Icône */
.lb-popup__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  text-align: center;
}

.lb-popup--bottom-right .lb-popup__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

/* Contenu */
.lb-popup__content {
  padding-right: 2rem;
}

.lb-popup--bottom-right .lb-popup__content {
  padding-right: 1rem;
}

.lb-popup__title {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
}

.lb-popup--bottom-right .lb-popup__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.lb-popup__message {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
}

.lb-popup--bottom-right .lb-popup__message {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

/* CTA Button */
.lb-popup__cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-align: center;
}

.lb-popup__cta:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.lb-popup--bottom-right .lb-popup__cta {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

/* Types variants */
.lb-popup--type-information .lb-popup__icon {
  color: #2563eb;
}

.lb-popup--type-seasonal .lb-popup__icon {
  color: #10b981;
}

.lb-popup--type-promotion .lb-popup__icon {
  color: #f59e0b;
}

.lb-popup--type-promotion .lb-popup__cta {
  background: #f59e0b;
}

.lb-popup--type-promotion .lb-popup__cta:hover {
  background: #d97706;
}

/* Thèmes saisonniers */
.lb-popup--theme-christmas .lb-popup__container {
  background: linear-gradient(135deg, #fff 0%, #fef3f2 100%);
  border: 2px solid #dc2626;
}

.lb-popup--theme-christmas .lb-popup__title {
  color: #dc2626;
}

.lb-popup--theme-newyear .lb-popup__container {
  background: linear-gradient(135deg, #fff 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
}

.lb-popup--theme-newyear .lb-popup__title {
  color: #d97706;
}

.lb-popup--theme-easter .lb-popup__container {
  background: linear-gradient(135deg, #fff 0%, #fce7f3 100%);
  border: 2px solid #ec4899;
}

.lb-popup--theme-easter .lb-popup__title {
  color: #db2777;
}

.lb-popup--theme-summer .lb-popup__container {
  background: linear-gradient(135deg, #fff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
}

.lb-popup--theme-summer .lb-popup__title {
  color: #2563eb;
}

/* Animation */
@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lb-popup--bottom-right.is-visible .lb-popup__container {
  animation: popupSlideIn 0.3s ease;
}

/* ==================================================================
   FORMULAIRE DE CONTACT (dans lb-popup)
   ================================================================== */

.lb-contact-modal .lb-popup__container {
  max-width: 560px;
  padding: 2rem 2rem 1.5rem;
}

.lb-contact-form {
  margin-top: 1rem;
}

.lb-cf-row {
  margin-bottom: 1rem;
}

.lb-cf-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.lb-cf-optional {
  font-weight: 400;
  color: #9ca3af;
  font-size: 0.8125rem;
}

.lb-cf-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.lb-cf-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}

.lb-cf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.lb-cf-textarea {
  resize: vertical;
  min-height: 100px;
}

.lb-cf-error {
  padding: 0.625rem 0.875rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.lb-cf-success {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.lb-cf-success__icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.lb-cf-success__text {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

.lb-cf-submit {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 0.25rem;
}

.lb-cf-submit:hover {
  background: #1d4ed8;
}

.lb-cf-submit:active {
  transform: scale(0.98);
}

.lb-cf-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Spinner pendant l'envoi ── */
.lb-cf-submit--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.lb-cf-submit--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-spin 0.65s linear infinite;
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* ── Validation inline ── */
.lb-cf-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.lb-cf-field-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.3rem;
  margin-bottom: 0;
}

/* ── Input file ── */
.lb-cf-file {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: #374151;
  font-size: 0.875rem;
}

.lb-cf-file::-webkit-file-upload-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background 0.2s;
}

.lb-cf-file::-webkit-file-upload-button:hover {
  background: #e5e7eb;
}

/* ── Disclaimer (avertissement docs) ── */
.lb-cf-disclaimer {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #78350f;
  margin-bottom: 1rem;
  word-break: normal;
  overflow-wrap: break-word;
}

.lb-cf-disclaimer::before {
  content: '⚠️\00a0';
}

.lb-cf-disclaimer a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}

.lb-cf-disclaimer a:hover {
  color: #92400e;
}

