/****************************************************
 * modules-selection-cards-fun.css
 * Gère l'aspect "fun" des cartes modules
 * et la grille responsive
 ****************************************************/

/* Grille pour wpt-modules-selection-cards.php */
.wpt-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Responsive : 1 colonne en mobile */
@media (max-width: 768px) {
  .wpt-modules-grid {
    grid-template-columns: 1fr;
  }
}

/* Carte principale */
.wpt-module-card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  padding: 0; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wpt-module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* MINI-HEADER Fun */
.wpt-card-header {
  background: linear-gradient(45deg, #ff7a7a, #ffa5a5);
  padding: 0.5rem;
  color: #fff;
  text-align: center;
  position: relative;
}
.wpt-header-badge {
  display: inline-block;
  background-color: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Corps de carte */
.wpt-card-body {
  padding: 1rem;
  text-align: center;
}
.wpt-icon-wrapper {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.5rem auto;
  background: radial-gradient(circle, #fff0f0 20%, #ffcccc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.wpt-module-card:hover .wpt-icon-wrapper {
  transform: rotate(3deg) scale(1.05);
}
.wpt-icon-wrapper img {
  max-height: 32px; 
}
.wpt-card-body h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}
.wpt-card-body p {
  font-size: 0.9rem;
  color: #555;
  min-height: 40px;
}
.wpt-card-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* Footer de la carte */
.wpt-card-footer {
  background: #fdfafa;
  border-top: 1px solid #eee;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #999;
}
.wpt-footer-fun-icon {
  margin-right: 4px;
  color: #ff7575;
  vertical-align: middle;
}

/* Switch ON/OFF */
.wpt-button-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.wpt-button-switch input[type="checkbox"] {
  width: 0; height: 0;
  position: absolute;
  opacity: 0;
}
.wpt-toggle-slider {
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}
.wpt-toggle-slider:before {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 1px; 
  left: 1px;
  transition: all 0.3s;
}
input[type="checkbox"]:checked + .wpt-toggle-slider {
  background: #4caf50;
}
input[type="checkbox"]:checked + .wpt-toggle-slider:before {
  transform: translateX(20px);
}

/* Bouton Voir + */
.wpt-btn-voirplus {
  background: #ff7979;
  border: none;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: background 0.3s;
  cursor: pointer;
}
.wpt-btn-voirplus:hover {
  background: #ff4c4c;
}


/****************************************************************
 * Styles pour la partie "class-wpt-module-selector"
 * (les .wpt-fun-* classes)
 * On peut conserver ou adapter selon vos besoins
 ****************************************************************/
.wpt-fun-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  padding: 0;
}
@media (max-width: 768px) {
  .wpt-fun-modules-grid {
    grid-template-columns: 1fr;
  }
}

.wpt-fun-module-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wpt-fun-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.wpt-fun-module-card-header {
  min-height: 80px;
  padding: 0.75rem;
  position: relative;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}
.wpt-fun-module-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.wpt-fun-module-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f84646;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wpt-fun-module-icon-container {
  width: 64px;
  height: 64px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.wpt-fun-module-icon {
  max-height: 40px;
  max-width: 40px;
  transition: transform 0.3s ease;
}
.wpt-fun-module-card:hover .wpt-fun-module-icon {
  transform: translateY(-3px);
}
.wpt-fun-module-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.4rem 0 0;
  text-align: center;
}
.wpt-fun-module-card-body {
  padding: 0.8rem;
  text-align: center;
  background: #fff;
}
.wpt-fun-module-short-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wpt-fun-module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
  border-top: 1px solid #eee;
  padding: 0.6rem 0.8rem;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}
.wpt-fun-module-footer-left .wpt-fun-module-usage {
  font-size: 0.8rem;
  color: #777;
}
.wpt-fun-module-footer-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wpt-fun-btn-voirplus,
.wpt-fun-share-button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.wpt-fun-btn-voirplus:hover,
.wpt-fun-share-button:hover {
  background: #e8e8e8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wpt-fun-share-button i {
  font-size: 1rem;
  color: #666;
}

/* Switch ON/OFF arrondi */
.wpt-fun-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.wpt-fun-switch input {
  opacity: 0; width: 0; height: 0;
}
.wpt-fun-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}
.wpt-fun-slider:before {
  position: absolute;
  content: "";
  height: 16px; 
  width: 16px;
  left: 2px; 
  bottom: 2px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.4s;
}
.wpt-fun-switch input:checked + .wpt-fun-slider {
  background-color: #4caf50;
}
.wpt-fun-switch input:checked + .wpt-fun-slider:before {
  transform: translateX(20px);
}

/********************************************
 * (Facultatif) si vous gérez vos propres modales
 * on n'utilise plus .wpt-fun-modal-overlay ici
 ********************************************/
/* ====================================================== */
/*           MODAL CLASSIQUE (#custom-modal-container-2025)    */
/* ====================================================== */


/* --- Réglages généraux du contenu --- */
.modal-header-2026 {
  padding: 10px 20px;
  border-bottom: 1px solid #eee;
  text-align: center; /* Centrer le titre, au choix */
}
.modal-title-2026 {
  margin: 0;           /* Retirer la marge par défaut du h2 */
  font-size: 1.8rem;   /* Adapter la taille */
  font-weight: 700;    /* Titre en gras */
  color: #333;
}

/* Corps de la modale, qu’on scinde en 2 blocs (image + texte) */
.modal-body-content-2026 {
  display: flex;
  flex-wrap: wrap;    /* Permet de passer sur 2 lignes en écran réduit */
  padding: 20px;
  gap: 20px;          /* Espace entre les colonnes */
}

/* Bloc image */
.modal-image-container-2026 {
  flex: 0 0 auto;     /* Largeur fixe/auto si souhaité */
  max-width: 300px;   /* Par exemple, limiter la taille */
  width: 100%;        /* Sur mobile, prend la largeur complète */
  display: flex;
  justify-content: center; 
  align-items: center;
}
.modal-image-container-2026 img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

/* Bloc texte */
.modal-text-container-2026 {
  flex: 1;           /* Le bloc texte peut s’étirer pour occuper l’espace restant */
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrer verticalement, au choix */
}
.modal-desc-2026 {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin: 0; /* On gère la marge via p + nth-of-type si besoin */
  text-align: justify;
  white-space: pre-line; 
}
