/* =============================================================
   Gestion des documents pédagogiques — Feuille de style publique
   Version : 1.0.1
   ============================================================= */

/* Les styles publics principaux sont gérés par le thème.
   Ce fichier ajoute seulement des styles spécifiques au plugin,
   notamment pour les cartes de secours et les shortcodes. */

.gdp-shortcode-wrapper {
    margin: 1.5rem 0;
}

.gdp-shortcode-wrapper .documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gdp-layout-list .documents-grid {
    grid-template-columns: 1fr;
}

/* Carte de secours (si thème non activé) */
.gdp-shortcode-wrapper .document-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gdp-shortcode-wrapper .document-card-title {
    font-size: 1.15rem;
    margin: 0 0 0.6em;
}

.gdp-shortcode-wrapper .document-card-title a {
    color: #0f1e33;
    text-decoration: none;
}

.gdp-shortcode-wrapper .document-card-meta {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gdp-shortcode-wrapper .document-card-niveau,
.gdp-shortcode-wrapper .document-card-cat {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

.gdp-shortcode-wrapper .document-card-niveau {
    background-color: #1e3a5f;
    color: #fff;
}

.gdp-shortcode-wrapper .document-card-cat {
    background-color: rgba(43, 167, 163, 0.12);
    color: #2ba7a3;
}

.gdp-shortcode-wrapper .document-card-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1rem;
    flex: 1;
}

.gdp-shortcode-wrapper .document-card-info {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.gdp-shortcode-wrapper .document-card-info li {
    margin-bottom: 0.3em;
}

.gdp-shortcode-wrapper .document-card-actions {
    display: flex;
    gap: 0.5rem;
}

.gdp-shortcode-wrapper .btn {
    display: inline-block;
    padding: 0.5em 1em;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
}

.gdp-shortcode-wrapper .btn-primary {
    background-color: #1e3a5f;
    color: #fff;
}

.gdp-shortcode-wrapper .btn-ghost {
    background: transparent;
    color: #1e3a5f;
    border-color: #e2e8f0;
}

/* Pagination */
.gdp-shortcode-wrapper .pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.gdp-shortcode-wrapper .pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.3rem;
}

.gdp-shortcode-wrapper .pagination .page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 500;
    background-color: #fff;
}

.gdp-shortcode-wrapper .pagination .page-number.current,
.gdp-shortcode-wrapper .pagination .page-number:hover {
    background-color: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
    text-decoration: none;
}

/* Message aucun résultat */
.gdp-shortcode-wrapper .no-documents {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    background-color: #f4f6f8;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* Filtres (rendu plugin secours) */
.gdp-shortcode-wrapper .document-filters {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.gdp-shortcode-wrapper .filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.gdp-shortcode-wrapper .filter-field {
    display: flex;
    flex-direction: column;
}

.gdp-shortcode-wrapper .filter-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 0.4rem;
}

.gdp-shortcode-wrapper .filter-field input,
.gdp-shortcode-wrapper .filter-field select {
    padding: 0.6em 0.8em;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #1a202c;
}

.gdp-shortcode-wrapper .filter-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .gdp-shortcode-wrapper .filter-row {
        grid-template-columns: 1fr;
    }
    .gdp-shortcode-wrapper .documents-grid {
        grid-template-columns: 1fr;
    }
}
