/**
 * Projects Gallery - Styles
 *
 * Design system inspiré Next.js/Vercel
 * @package DiviPascaline
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */

.pg-container {
    --pg-radius-sm: 0.5rem;
    --pg-radius-md: 1rem;
    --pg-radius-lg: 1.5rem;
    --pg-radius-xl: 2rem;

    --pg-zinc-50: #fafafa;
    --pg-zinc-100: #f4f4f5;
    --pg-zinc-200: #e4e4e7;
    --pg-zinc-300: #d4d4d8;
    --pg-zinc-400: #a1a1aa;
    --pg-zinc-500: #71717a;
    --pg-zinc-600: #52525b;
    --pg-zinc-700: #3f3f46;
    --pg-zinc-800: #27272a;
    --pg-zinc-900: #18181b;
    --pg-zinc-950: #09090b;

    --pg-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --pg-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --pg-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --pg-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --pg-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --pg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --pg-ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --pg-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    --pg-duration-fast: 150ms;
    --pg-duration-normal: 300ms;
    --pg-duration-slow: 500ms;
    --pg-duration-slower: 700ms;
}

/* ==========================================================================
   Container
   ========================================================================== */

.pg-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==========================================================================
   Filters Bar
   ========================================================================== */

.pg-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.pg-filters-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Indicateur animé - masqué pour le style tags */
.pg-filter-indicator {
    display: none;
}

.pg-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #00522c;
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: color var(--pg-duration-normal) var(--pg-ease-out);
    white-space: nowrap;
}

.pg-filter-btn:hover:not(.pg-filter-active) {
    color: #001f10;
}

.pg-filter-btn.pg-filter-active {
    color: white;
    background: #00522c;
}

.pg-filter-btn:focus-visible {
    outline: 2px solid #00522c;
    outline-offset: 2px;
}

/* ==========================================================================
   Grid
   ========================================================================== */

.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .pg-grid {
        grid-template-columns: 1fr;
    }

    .pg-card-badges {
        display: none;
    }
}

/* ==========================================================================
   Card
   ========================================================================== */

.pg-card {
    position: relative;
    border-radius: 5px;
    border: 1px solid var(--pg-zinc-200);
    background: white;
    overflow: hidden;
}

.pg-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}



/* ==========================================================================
   Card Image
   ========================================================================== */

.pg-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--pg-zinc-100);
}

.pg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--pg-duration-slower) var(--pg-ease-out);
}

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

.pg-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pg-zinc-100), var(--pg-zinc-200));
}


/* ==========================================================================
   Badges
   ========================================================================== */

.pg-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-start;
    z-index: 5;
    pointer-events: none;
}

.pg-badge {
    padding: 0.1rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: none;
}

.pg-badge-category {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pg-badge-result {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Card Content
   ========================================================================== */

.pg-card-content {
    display: none;
}

/* ==========================================================================
   Card Button
   ========================================================================== */

.pg-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--pg-duration-normal) var(--pg-ease-out),
                transform var(--pg-duration-normal) var(--pg-ease-out);
}

.pg-card:hover .pg-card-button {
    opacity: 1;
    transform: translateY(0);
}

.pg-card-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform var(--pg-duration-normal) var(--pg-ease-spring);
}

.pg-card:hover .pg-card-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Filter Animations
   ========================================================================== */

.pg-card.pg-hidden {
    display: none;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.pg-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.pg-empty-state[hidden] {
    display: none;
}

.pg-empty-state.pg-visible {
    display: flex;
}

.pg-empty-icon {
    width: 3rem;
    height: 3rem;
    color: var(--pg-zinc-300);
    margin-bottom: 1rem;
}

.pg-empty-text {
    font-size: 1rem;
    color: var(--pg-zinc-500);
    margin: 0;
}

.pg-no-projects {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--pg-zinc-500);
}

/* ==========================================================================
   Focus States (Accessibility)
   ========================================================================== */

.pg-card-link:focus-visible {
    outline: none;
}

.pg-card:has(.pg-card-link:focus-visible) {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .pg-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .pg-filter-indicator,
    .pg-card-image img,
    .pg-card-button,
    .pg-card-arrow,
    .pg-card-spotlight,
    .pg-card::before {
        transition: none;
    }

    .pg-card.pg-filtering-out,
    .pg-card.pg-filtering-in {
        animation: none;
    }
}
