.lpp-posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes par défaut */
    gap: 20px;
}

/* 2 colonnes sur les tablettes et petits écrans (max 1024px) */
@media (max-width: 1024px) {
    .lpp-posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 colonne sur mobile (max 600px) */
@media (max-width: 600px) {
    .lpp-posts-container {
        grid-template-columns: 1fr;
    }
}


.lpp-post-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Assure un alignement bas */
    border: 1px solid #daeafd; /* Mode nuit */
    background: #f9f9f9;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    height: 100%; /* Permet d'uniformiser la hauteur des cartes */
}

/* Style de l'image */
.lpp-post-thumbnail {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lpp-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.lpp-post-details h2 {
    font-size: 18px;
    margin: 10px 0;
}

.lpp-post-details h2 a {
    text-decoration: none !important;
    color: #0073aa !important;
    transition: color 0.3s ease !important;
}

.lpp-post-details h2 a:hover {
    color: #005580 !important;
}

.lpp-post-details p {
    font-size: 14px;
    color: #555;
}

.lpp-pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.lpp-pagination-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
}

.lpp-pagination-button:hover {
    background-color: #005177;
}

/* Conteneur principal des détails du post */
.lpp-post-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Permet d'aligner correctement les boutons */
    align-items: center;
    gap: 10px;
    padding: 15px;
    min-height: 200px; /* Hauteur minimale pour uniformiser la taille des blocs */
}

/* Conteneur des boutons */
.lpp-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

/* Conteneur des boutons du haut */
.lpp-buttons-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Conteneur des boutons du bas */
.lpp-buttons-bottom {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: auto; /* Pousse les boutons vers le bas */
}

/* Style des boutons */
.lpp-post-details button {
    flex: 1; /* Les boutons prennent la même largeur */
    padding: 12px 16px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: #fff;
    text-align: center;
}

/* Bouton rouge (Supprimer) */
.lpp-trash-button {
    background-color: #e74c3c;
}
.lpp-trash-button:hover {
    background-color: #c0392b;
}

/* Bouton jaune (Mettre en attente) */
.lpp-pending-button {
    background-color: #e67e22;
}
.lpp-pending-button:hover {
    background-color: #f39c12;
}

/* Bouton bleu (Afficher utilisateurs) */
.lpp-toggle-users {
    background-color: #3498db;
}
.lpp-toggle-users:hover {
    background-color: #2980b9;
}

/* Bouton de confirmation (rouge foncé) */
.lpp-trash-toggle-users {
    background-color: #a93226;
}
.lpp-trash-toggle-users:hover {
    background-color: #922b21;
}

/* Effet d'animation au clic */
.lpp-post-details button:active {
    transform: scale(0.95);
}



/* CHAMP DE RECHERCHE_____________________________________________ */

/* Conteneur du champ de recherche */
.lpp-search-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px; /* Espace entre l'input et le bouton */
    margin-bottom: 20px; /* Espacement en bas */
    width: 100%; /* Assure que le conteneur prend toute la largeur disponible */
}

/* Champ de recherche */
#lpp-search-input {
    flex: 1; /* Permet à l'input de s'étirer */
    min-width: 80%; /* Définit une largeur minimale */
    max-width: 80%; /* Limite la largeur maximale si nécessaire */
    padding: 10px; /* Espacement interne */
    font-size: 16px; /* Taille du texte */
    border: 1px solid #ccc; /* Bordure */
    border-radius: 4px; /* Coins arrondis */
    box-sizing: border-box; /* Inclut le padding dans la largeur totale */
    width: 100%; /* Forcer l'input à occuper toute la largeur possible */
    background-color: #ffffff;
}

/* Bouton de recherche */
#lpp-search-button {
    padding: 10px 20px; /* Espacement interne (haut/bas et gauche/droite) */
    font-size: 16px; /* Taille du texte */
    color: #fff; /* Couleur du texte */
    background-color: #007bff; /* Couleur de fond */
    border: none; /* Supprime la bordure */
    border-radius: 4px; /* Coins arrondis */
    cursor: pointer; /* Curseur pointeur */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

/* Bouton au survol */
#lpp-search-button:hover {
    background-color: #0056b3; /* Couleur plus foncée au survol */
}

/* Adaptation pour les petits écrans */
@media (max-width: 768px) {
    .lpp-search-container {
        gap: 5px; /* Réduit l'espace entre les éléments sur les petits écrans */
    }

    #lpp-search-input {
        font-size: 14px; /* Réduit légèrement la taille du texte pour s'adapter */
        padding: 8px; /* Réduit le padding pour éviter les débordements */
    }

    #lpp-search-button {
        font-size: 14px; /* Ajuste la taille du texte */
        padding: 8px 15px; /* Réduit légèrement le padding du bouton */
    }
}

/* CLIENT INTERESSE__________________________________________________________________ */

.lpp-menu {
    display: flex;
    justify-content: space-between; /* Espace égal entre les éléments */
    margin-bottom: 20px;
    border-bottom: 2px solid #eee; /* Ajout d'une ligne de séparation */
}

.lpp-menu button {
    padding: 12px 25px;
    cursor: pointer;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 30px; /* Coins arrondis pour un effet plus moderne */
    font-size: 16px; /* Texte plus grand pour une meilleure lisibilité */
    transition: all 0.3s ease; /* Transition fluide pour les changements */
    color: #333; /* Couleur de texte */
    font-weight: 600;
}

.lpp-menu button:hover {
    background-color: #e0e0e0; /* Changement de couleur au survol */
}

.lpp-menu button.active {
    background-color: #0073e6;
    color: white;
    border-color: #005bb5; /* Border plus foncé quand actif */
}

.lpp-users-list {
    display: none;
    padding-top: 15px; /* Espacement au-dessus des listes */
}

.lpp-users-list.active {
    display: block;
}


/* AJOUT COMMISSION POUR AGENCE__________________________________________________________________ */
.lpp-save-note {
    background: linear-gradient(135deg, #f0f4ff, #e6ecf9);
    border: 1px solid #cfdaf0;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lpp-save-note input[type="number"] {
    padding: 10px;
    border: 1px solid #ccd6eb;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.lpp-save-note button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lpp-save-note button:hover {
    background-color: #005580;
}

/* AFFICHAGE COMMISSION_________________________________________________________________ */
.lpp-completion {
    background: linear-gradient(135deg, #eaf3ff, #d8e6ff);
    color: #003366;
    border: 1px solid #bcd2f0;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
    width: fit-content;
}

.lpp-completion-box {
    background: #f9f9fb;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px 20px;
    font-family: "Segoe UI", sans-serif;
    max-width: 500px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
  }
  
  .lpp-total {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
  }
  
  .lpp-auto strong {
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
    color: #444;
  }
  
  .lpp-roles {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .lpp-role {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    border-left: 4px solid #ccc;
    transition: border-color 0.3s ease;
  }
  
  .lpp-role.promoteur { border-color: #4caf50; }
  .lpp-role.agence { border-color: #2196f3; }
  .lpp-role.admin { border-color: #ff9800; }
  
  .label {
    font-weight: 500;
    color: #333;
  }
  
  .value {
    font-weight: bold;
    color: #000;
  }


/* AFFICHAGE COMMISSION POUR AGENCE_________________________________________________________________ */
.lpp-note-display {
    background-color: #e8fce8;
    border-left: 5px solid #34a853;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
