/* Conteneur des articles */
#lap-posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    grid-auto-rows: 1fr; /* Cela permet aux articles d'avoir la même hauteur */
}

/* Style pour chaque article */
.lap-post-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box; /* Important pour éviter que les articles ne débordent */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    height: 100%; /* Assure que chaque article ait la même hauteur */
    overflow: hidden; /* Évite que le contenu déborde */
}

.lap-post-item:hover {
    transform: translateY(-5px);
}

/* Style de l'image de l'article */
.lap-post-thumbnail {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lap-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Détails de l'article */
.lap-post-details {
    flex-grow: 1;
}

.lap-post-details h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    height: 50px; /* Limite la hauteur du titre */
    overflow: hidden; /* Empêche les débordements */
}

.lap-post-details p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    overflow: hidden; /* Empêche les débordements */
}

/* Pagination */
.lap-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    width: 100%;
}

.lap-pagination-button {
    padding: 12px 25px;
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.lap-pagination-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.lap-pagination-button:hover:not(:disabled) {
    background-color: #005177;
}

.lap-pagination-button:focus {
    outline: none;
}

#lap-prev {
    margin-left: 20px;
}

#lap-next {
    margin-right: 20px;
}


.lap-restore-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.lap-restore-button:hover {
    background-color: #218838;
}

.lap-restore-button:focus {
    outline: none;
}


.lap-delete-button {
    padding: 10px 20px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    
}

.lap-delete-button:hover {
    background-color: #c82333;
}

.lap-delete-button:focus {
    outline: none;
}


/* CHAMP DE RECHERCHE_____________________________________________ */

/* Conteneur du champ de recherche */
.ltp-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 */
#ltp-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 */
#ltp-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 */
#ltp-search-button:hover {
    background-color: #0056b3; /* Couleur plus foncée au survol */
}

/* Adaptation pour les petits écrans */
@media (max-width: 768px) {
    .ltp-search-container {
        gap: 5px; /* Réduit l'espace entre les éléments sur les petits écrans */
    }

    #ltp-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 */
    }

    #ltp-search-button {
        font-size: 14px; /* Ajuste la taille du texte */
        padding: 8px 15px; /* Réduit légèrement le padding du bouton */
    }
}