/*
   wpt-style.css (version harmonisée)
   - Style moderne / fun
   - N’oubliez pas d’inclure Font Awesome pour les icônes.
*/

/* ========================= */
/* ANIMATION scaleFadeIn     */
/* ========================= */
@keyframes scaleFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ========================= */
/* ANIMATION highlightFlash  */
/* ========================= */
@keyframes highlightFlash {
  0%   { background-color: #fff9c4; }
  100% { background-color: transparent; }
}

/* ========================= */
/* ANIMATION flashUrgent     */
/* ========================= */
@keyframes flashUrgent {
  0% { color: #ffffff; }
  100% { color: #ffefc3; }
}


/* ====================================================== */
/*           MODAL CLASSIQUE (#global-modal-container)    */
/* ====================================================== */

#global-modal-container {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999; 
  display: none; /* Par défaut masqué */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.5); 
}

/* Apparition via la classe .show */
#global-modal-container.show {
  display: block;
}

/* Overlay cliquable pour fermer si besoin */
#global-modal-container .modal-overlay {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Contenu principal */
#global-modal-container .modal-content {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%) translateY(20px); /* Position de départ */
  opacity: 0;
  
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: #fff;
  border-radius: 20px; /* Harmonisé à 10px */
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;

  /* Animation d’apparition */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Quand on affiche la modale */
#global-modal-container.show .modal-content {
  transform: translate(-50%, -50%) translateY(0);
  opacity: 1;
}

/* Corps */
#global-modal-container .modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Footer (boutons) */
#global-modal-container .modal-footer {
  padding: 12px 16px;
  background-color: #fafafa;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Bouton de fermeture (modal classique) */
#global-modal-container .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  background: #615eff;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 40px; 
  height: 40px;
  border-radius: 12px;
  z-index: 100000;
  transition: all 0.2s ease;
}
#global-modal-container .close-modal:hover {
  color: #FF746B;
  border-radius: 40px;
}
.modal-body {
  /* display: flex;*/
  justify-content: center;
}


/* ====================================================== */
/*           MODAL FUN (#global-modal-container3)         */
/* ====================================================== */

#global-modal-container3 {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(0,0,0,0.5);
}

/* Vous pouvez ajouter .show si vous voulez la même mécanique d’apparition */
#global-modal-container3.show {
  display: block;
}

/* Overlay */
#global-modal-container3 .modal-overlay3 {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  cursor: pointer;
}

/* ------------------------------ */
/* Contenu FUN => .fun-modal-content
   (on se passe de #global-modal-container3 .modal-content) 
   pour éviter la redondance. 
   On anime à l’apparition avec scaleFadeIn.
*/
.fun-modal-content {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 900px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: scaleFadeIn 0.4s ease-out;
}

/* Bouton de fermeture (modal fun, même style harmonisé) */
#global-modal-container3 .close-modal {
  position: absolute;
  top: 10px; 
  right: 10px;
  background: #615eff;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  z-index: 100000;
  transition: all 0.2s ease;
}
#global-modal-container3 .close-modal:hover {
  color: #FF746B;
  border-radius: 40px;
}

/* Header FUN */
.modal-header-fun {
  background: linear-gradient(
    144deg,
    #4535b9 0%,
    #df4ecd 60%,
    #3dffd2 100%
  );
  padding: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.modal-title-fun {
  font-size: 1.3rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  margin: 0;
}

/* Corps FUN (scroll) */
.fun-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Footer FUN */
.modal-footer-fun {
  background: linear-gradient(
    144deg,
    #fafaff 0%,
    #c1cdff36 60%,
    #f0f0f0 100%
  );
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  color: #333;
  border-top: 1px solid #ddd;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  height: 50px;
}



/*----------------------------------------------------
  BLOC 16) MODAL #2 (exemple supplémentaire)
-----------------------------------------------------*/

#global-modal-container2 {
  position: fixed;
  z-index: 99995;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* Par défaut masqué */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.5); 
}

.modal-overlay2 {
  position: absolute;
  z-index: 99996;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content2 {
  position: absolute;
  z-index: 99997;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 800px;
  background-color: #fff;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  /* display: flex; */
  justify-content: center;
}

/* Bouton de fermeture (modal classique) */
#global-modal-container2 .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  background: #615eff;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 40px; 
  height: 40px;
  border-radius: 12px;
  z-index: 100000;
  transition: all 0.2s ease;
}
#global-modal-container2 .close-modal:hover {
  color: #FF746B;
  border-radius: 40px;
}


/* ====================================== */
/*  SECTION WPT-PRESTATAIRE-PROFILE       */
/* ====================================== */

.wpt-prestataire-profile {
  margin: 0;
  color: #333;
}

/* HERO / SLIDER */
.wpt-hero-section {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  margin: 0;
}
.wpt-hero-carousel .slide {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wpt-hero-carousel .slide.no-image {
  display: flex;
  opacity: 1;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #666;
  font-size: 1rem;
}

/* NAV flèches carousel */
.carousel-nav {
  position: absolute;
  top: 50%; 
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s;
  z-index: 2;
}
.carousel-nav:hover {
  background: rgba(0,0,0,0.6);
}
.carousel-prev {
  left: 10px;
}
.carousel-next {
  right: 10px;
}

/* Puces (dots) */
.carousel-dots {
  position: absolute;
  bottom: 10px; 
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dot {
  display: inline-block;
  width: 10px; 
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.2s;
}
.dot:hover {
  background: rgba(255,255,255,0.9);
}
.dot.active {
  background: #fff;
}

/* Zone de contenu profil (après hero) */
.wpt-profile-content {
  padding: 20px;
}

/* HEADER DU PROFIL */
.wpt-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 15px;
}
.wpt-profile-avatar img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ff9671;
  margin: -20px 20px 0 20px;
}
.wpt-profile-avatar .avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #666;
}
.wpt-profile-primary-infos {
  flex: 1;
}
.prestataire-nom {
  margin: 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #4c36ba;
}
.prestataire-categorie {
  display: inline-block;
  background: #ffefc3;
  padding: 3px 6px;
  font-size: 0.85em;
  margin-top: 5px;
  border-radius: 4px;
  color: #444;
}
.prestataire-localisation {
  font-size: 0.9em;
  color: #777;
}
.prestataire-accroche {
  margin: 10px 0;
  font-style: italic;
  color: #444;
}

/* Bloc Promo principal */
.wpt-promo-hero-block {
  margin: 30px;
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(90deg, #ffdcb7, #cce9a3);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-light, 0 2px 8px rgba(0,0,0,0.1));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wpt-promo-hero-block::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.15) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.wpt-promo-hero-block:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.wpt-promo-hero-block:hover::before {
  opacity: 1;
  transform: rotate(15deg) scale(1.2);
}

/* Variations “expired” et “no-promo” */
.wpt-promo-hero-block.expired {
  background: #ff8080;
}
.wpt-promo-hero-block.no-promo {
  background: #f3f5ff;
  color: #444;
  border-radius: 10px;
}
.wpt-promo-hero-block .promo-title {
  margin: 0 0 10px;
  font-size: 1.3em;
  font-weight: bold;
  color: #4c36ba;
}
.promo-remise {
  font-size: 1.2em;
  margin: 0 0 5px;
  font-weight: bold;
}
.promo-restant {
  margin: 0;
  font-weight: bold;
  color: #8daf5a;
}

/* Bouton "Générer code" */
.generate-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #4c36ba;
  font-weight: bold;
  border: none;
  padding: 8px 16px;
  border-radius: 40px;
  margin-top: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.generate-code-btn:hover {
  transform: scale(1.05);
}
.generate-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Zone de résultat (code généré) */
.promo-result-zone .generated-code {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Boutons PDF / Partage */
.download-pdf-btn, .share-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #615eff;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-right: 5px;
  transition: background 0.2s ease;
}
.download-pdf-btn:hover,
.share-code-btn:hover {
  background: #4644bc;
}

/* Description / Avis / Actions */
.wpt-profile-description, 
.wpt-profile-avis {
  margin: 27px;
}

/* Exemple de zone “tarifs” */
.wpt-profile-tarifs {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
}
.wpt-profile-tarifs i {
  color: #4D96FF;
  font-size: 1.2rem;
}
.wpt-profile-tarifs strong {
  font-weight: 600;
  margin-right: 5px;
}

/* Surbrillance du code généré */
.generated-code.highlight {
  animation: highlightFlash 0.8s ease;
  background: #a2d166;
  margin: 5px 10px 20px 0;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
}


/* ======================== */
/* COUNTDOWN                */
/* ======================== */
.promo-countdown {
  color: #fff;
  font-size: 0.95em;
  font-weight: bold;
  margin-top: 10px;
  display: inline-block;
  background: #ff8787;
  padding: 5px 10px;
  border-radius: 6px;
}
.promo-countdown .countdown-number {
  color: #ffd96b;
}
.countdown-urgent {
  animation: flashUrgent 1.5s infinite alternate;
}
.countdown-expired {
  color: #ffefc3;
  text-decoration: line-through;
}

/* Bouton “Détails” + zone de description */
.toggle-description-btn {
  margin-left: 10px;
  padding: 8px 16px;
  border: none;
  background: #4D96FF;
  color: #fff;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle-description-btn:hover {
  background: #3A7ADB;
}
.promo-description-text {
  margin-top: 10px;
  background: rgba(255,255,255,0.2);
  padding: 10px;
  border-radius: 8px;
  display: none; /* caché par défaut */
}

/* Confettis */
.confetti-container {
  position: relative;
  width: 100%;
  height: 0;
  overflow: visible;
}
.confetti {
  position: absolute;
  top: 0;
  width: 10px; 
  height: 10px;
  border-radius: 2px;
  animation: none;
  opacity: 1;
  transition: top 2s ease, opacity 2s ease, transform 2s ease;
}


/* ========================== */
/* ZONE D’ACTIONS (boutons)   */
/* ========================== */
.wpt-profile-actions {
  background: #fafbff;
  padding: 15px;
  border-top: 1px solid #eee;
}

/* Conteneur flex */
.wpt-profile-actions .action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Boutons */
.wpt-profile-actions .action-button {
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  height: 45px;
}
.wpt-profile-actions .action-button:hover {
  background: #ff746b;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
  color: #fff;
}

/* Responsif : un bouton par ligne au max 768px */
@media (max-width: 768px) {
  .wpt-profile-header {
    flex-direction: column;
    align-items: center;
  }
  .wpt-hero-section {
    height: 160px;
  }
  .wpt-hero-carousel .slide {
    height: 160px;
  }
  .wpt-profile-actions .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .wpt-profile-actions .action-button {
    width: 100%;
    justify-content: center;
  }
}
