/**
 * SEN-PNA Projets - Styles
 * v2.1.0 - alignés sur les valeurs Tailwind du design cible
 */

/* ==========================================================================
   GRILLE
   ========================================================================== */

.pna-projets-grid {
    display: grid;
    gap: 32px; /* gap-8 */
    margin: 0;
    padding: 0;
    list-style: none;
}

.pna-projets-cols-1 { grid-template-columns: 1fr; }
.pna-projets-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pna-projets-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pna-projets-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* md: breakpoint Tailwind = 768px → en dessous on passe à 1 col par défaut comme le design ref (md:grid-cols-2) */
@media (max-width: 768px) {
    .pna-projets-grid { grid-template-columns: 1fr !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pna-projets-cols-3,
    .pna-projets-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   CARTE
   ========================================================================== */

.pna-projet-card {
    background: #FFFFFF;
    border-radius: 16px;
    /* aligné sur le template Elementor de référence */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pna-projet-card:hover {
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   IMAGE EN HAUT
   ========================================================================== */

.pna-projet-image {
    position: relative;
    height: 192px; /* h-48 */
    overflow: hidden;
    background: #F3F4F6;
}

.pna-projet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pna-projet-card:hover .pna-projet-image img {
    transform: scale(1.05);
}

.pna-projet-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

/* ==========================================================================
   BADGE STATUT
   ========================================================================== */

.pna-projet-badge {
    position: absolute;
    top: 16px; /* top-4 */
    right: 16px; /* right-4 */
    padding: 4px 12px; /* py-1 px-3 */
    border-radius: 9999px;
    font-size: 14px; /* text-sm */
    font-weight: 500; /* font-medium */
    line-height: 1.4;
    /* défaut = en_cours (yellow) */
    background: #FEF3C7; /* bg-yellow-100 */
    color: #92400E;      /* text-yellow-800 */
}

.pna-projet-status-en_cours {
    background: #FEF3C7;
    color: #92400E;
}

.pna-projet-status-planifie {
    background: #DBEAFE; /* bg-blue-100 */
    color: #1E40AF;      /* text-blue-800 */
}

.pna-projet-status-continu {
    background: #DCFCE7; /* bg-green-100 */
    color: #166534;      /* text-green-800 */
}

.pna-projet-status-termine {
    background: #E5E7EB; /* bg-gray-200 */
    color: #4B5563;      /* text-gray-600 */
}

/* ==========================================================================
   CORPS DE LA CARTE
   ========================================================================== */

.pna-projet-body {
    padding: 32px; /* p-8 */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pna-projet-cat-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px; /* mb-4 */
}

/* Container icône : padding-based comme Tailwind p-2 (= 8px) */
.pna-projet-icon {
    background: #DCFCE7; /* bg-green-100 */
    color: #16A34A;      /* text-green-600 */
    padding: 8px;        /* p-2 */
    border-radius: 8px;  /* rounded-lg */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;  /* mr-3 */
    flex-shrink: 0;
    line-height: 0;
}

.pna-projet-icon .pna-icon {
    display: block;
    width: 24px;  /* h-6 w-6 */
    height: 24px;
}

.pna-projet-cat {
    font-size: 14px;
    font-weight: 500;
    color: #16A34A;
    line-height: 1.4;
}

.pna-projet-title {
    font-size: 20px; /* text-xl */
    font-weight: 700;
    color: #111827; /* text-gray-900 */
    margin: 0 0 12px 0; /* mb-3 */
    line-height: 1.3;
}

.pna-projet-desc {
    color: #4B5563; /* text-gray-600 */
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px 0; /* mb-6 */
}

/* ==========================================================================
   LIEN "EN SAVOIR PLUS"
   ========================================================================== */

.pna-projet-link {
    display: inline-flex;
    align-items: center;
    color: #16A34A; /* text-green-600 */
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: auto;
}

.pna-projet-link:hover,
.pna-projet-link:focus {
    color: #15803D; /* text-green-700 */
}

.pna-projet-link-icon {
    margin-left: 8px; /* ml-2 */
    width: 16px;      /* h-4 w-4 */
    height: 16px;
    transition: transform 0.2s ease;
}

.pna-projet-link:hover .pna-projet-link-icon {
    transform: translateX(4px);
}

/* ==========================================================================
   ÉTATS VIDES / ERREURS
   ========================================================================== */

.pna-projets-empty,
.pna-projets-error {
    text-align: center;
    padding: 48px 16px;
    color: #6B7280;
    background: #F9FAFB;
    border-radius: 12px;
    font-size: 16px;
}

.pna-projets-error {
    color: #B91C1C;
    background: #FEE2E2;
}
