/**
 * Partenaires & Actualités H-TIC — CSS Public v1.0
 * Reproduit la maquette : image arrondie, label coral, barres décoratives, icônes réseaux
 */

:root {
    --pa-accent:      #D4603A;   /* label de catégorie coral/orange */
    --pa-text:        #1a1a1a;
    --pa-text-light:  #666666;
    --pa-card-bg:     #ffffff;
    --pa-social-bg:   #1e3a5f;   /* cercles des icônes réseaux */
    --pa-social-size: 34px;
    --pa-radius:      16px;
    --pa-gap:         28px;
    --pa-transition:  all 0.3s ease;
}

/* =====================
   BOX SIZING
   ===================== */
.pa-wrap,
.pa-wrap * {
    box-sizing: border-box;
}

.pa-wrap {
    display: block !important;
    width: 100% !important;
    min-width: 0;
}

.pa-partenaires-wrap,
.pa-actualites-wrap {
    display: block !important;
    width: 100% !important;
}

/* =====================
   FILTRES
   ===================== */
.pa-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.pa-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pa-filter-btn {
    padding: 10px 22px;
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pa-text);
    cursor: pointer;
    transition: var(--pa-transition);
    font-family: inherit;
}

.pa-filter-btn:hover {
    border-color: var(--pa-accent);
    color: var(--pa-accent);
}

.pa-filter-btn.active {
    background: var(--pa-accent);
    border-color: var(--pa-accent);
    color: #fff;
}

/* =====================
   GRILLE
   ===================== */
.pa-grid {
    display: grid;
    gap: var(--pa-gap);
    width: 100%;
}

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

/* =====================
   CARTE BASE
   ===================== */
.pa-card {
    position: relative;
    background: var(--pa-card-bg);
    border-radius: var(--pa-radius);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    transition: var(--pa-transition);
    opacity: 0;
    animation: paFadeUp 0.5s ease forwards;
}

.pa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

/* =====================
   IMAGE
   ===================== */
.pa-card-image {
    position: relative;
    width: 100%;
    padding-top: 68%;
    overflow: hidden;
    border-radius: var(--pa-radius) var(--pa-radius) 0 0;
    background: #f0f0f0;
}

.pa-card-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pa-card:hover .pa-card-image img {
    transform: scale(1.04);
}

.pa-card-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #ccc;
}

/* =====================
   CORPS DE LA CARTE
   ===================== */
.pa-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pa-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label de catégorie (coral/orange) */
.pa-card-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--pa-accent);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.3;
}

/* Nom / Titre */
.pa-card-name {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--pa-text);
    line-height: 1.35;
}

/* Description courte */
.pa-card-desc {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--pa-text-light);
    line-height: 1.6;
}

/* Carte actualité = balise <a> — override les styles liens du thème */
a.pa-card-actu,
a.pa-card-actu:hover,
a.pa-card-actu:visited {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

a.pa-card-actu .pa-card-label,
a.pa-card-actu .pa-card-date,
a.pa-card-actu .pa-card-name,
a.pa-card-actu .pa-card-desc {
    text-decoration: none !important;
}

/* CTA Découvrir / En savoir plus */
.pa-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pa-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: gap 0.2s, color 0.2s;
}

.pa-card:hover .pa-card-cta {
    gap: 8px;
    color: var(--pa-text);
}

/* Nom cliquable */
.pa-card-name a {
    color: inherit;
    text-decoration: none;
}

.pa-card-name a:hover {
    color: var(--pa-accent);
}

/* =====================
   ICÔNES RÉSEAUX SOCIAUX
   ===================== */
.pa-card-socials {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
}

.pa-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pa-social-size);
    height: var(--pa-social-size);
    border-radius: 50%;
    background: var(--pa-social-bg);
    color: #ffffff;
    text-decoration: none;
    transition: var(--pa-transition);
    flex-shrink: 0;
}

.pa-social-btn svg {
    width: 15px;
    height: 15px;
}

.pa-social-btn:hover {
    transform: scale(1.12);
    opacity: 0.85;
}

/* =====================
   BARRES DÉCORATIVES (accent gauche)
   Reproduit les 3 barres verticales de la maquette
   ===================== */
.pa-card-accent {
    position: absolute;
    left: -2px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    pointer-events: none;
}

.pa-card-accent span {
    display: block;
    background: var(--pa-accent);
    border-radius: 0 2px 2px 0;
    width: 4px;
}

.pa-card-accent span:nth-child(1) { height: 28px; opacity: 1;    }
.pa-card-accent span:nth-child(2) { height: 18px; opacity: 0.65; }
.pa-card-accent span:nth-child(3) { height: 10px; opacity: 0.35; }

/* =====================
   ACTUALITÉS — META (date + catégorie)
   ===================== */
.pa-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pa-card-date {
    font-size: 12px;
    color: var(--pa-text-light);
    font-weight: 500;
}

/* =====================
   ANIMATION
   ===================== */
@keyframes paFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.pa-card:nth-child(1) { animation-delay: 0.05s; }
.pa-card:nth-child(2) { animation-delay: 0.10s; }
.pa-card:nth-child(3) { animation-delay: 0.15s; }
.pa-card:nth-child(4) { animation-delay: 0.20s; }
.pa-card:nth-child(5) { animation-delay: 0.25s; }
.pa-card:nth-child(6) { animation-delay: 0.30s; }
.pa-card:nth-child(n+7) { animation-delay: 0.35s; }

/* =====================
   NO RESULTS
   ===================== */
.pa-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--pa-text-light);
    font-size: 15px;
}

/* =====================
   LOADER AJAX
   ===================== */
.pa-grid-loading {
    position: relative;
    min-height: 120px;
}

.pa-grid-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pa-radius);
}

/* =====================
   RESPONSIVE
   ===================== */
@media screen and (max-width: 1200px) {
    .pa-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .pa-grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 900px) {
    .pa-grid-cols-3,
    .pa-grid-cols-4,
    .pa-grid-cols-5 { grid-template-columns: repeat(2, 1fr); }
    --pa-gap: 20px;
}

@media screen and (max-width: 600px) {
    .pa-grid-cols-2,
    .pa-grid-cols-3,
    .pa-grid-cols-4,
    .pa-grid-cols-5 { grid-template-columns: 1fr; }

    .pa-filters { flex-direction: column; gap: 10px; }

    .pa-filter-btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }
}

/* =====================
   SLIDER
   ===================== */
.pa-slider-outer {
    position: relative;
}

.pa-slider-nav {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.pa-slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--pa-accent);
    background: #fff;
    color: var(--pa-accent);
    cursor: pointer;
    transition: var(--pa-transition);
    flex-shrink: 0;
    line-height: 1;
}

.pa-slider-btn:hover:not(:disabled) {
    background: var(--pa-accent);
    color: #fff;
}

.pa-slider-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.pa-slider-track {
    display: flex;
    gap: var(--pa-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pa-slider-track::-webkit-scrollbar {
    display: none;
}

.pa-slider-track .pa-card {
    flex: 0 0 300px;
    min-width: 0;
    scroll-snap-align: start;
}

@media screen and (max-width: 700px) {
    .pa-slider-track .pa-card {
        flex: 0 0 260px;
    }
}

@media screen and (max-width: 480px) {
    .pa-slider-track .pa-card {
        flex: 0 0 calc(100% - 20px);
    }
}

