/* ========================================
   PAGE TOUS LES POÈMES - DESIGN WWW AWARDS
   ======================================== */

.poems-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(82px + 2rem) 2rem 3rem; /* Header fixe (82px) + espacement */
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--text-night);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

html.day-mode .hero-title {
    color: var(--text-primary);
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: rgba(231, 231, 231, 0.7);
    margin: 0;
    line-height: 1.6;
    font-style: italic;
}

html.day-mode .hero-subtitle {
    color: var(--text-secondary);
}

/* Section des poèmes */
.poems-section {
    margin-bottom: 3rem;
}

.poems-grid-container {
    width: 100%;
}

.poems-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Carte de poème moderne */
.poem-item {
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    animation: poemCardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes poemCardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation séquentielle pour les cartes */
.poem-item:nth-child(1) { animation-delay: 0.05s; }
.poem-item:nth-child(2) { animation-delay: 0.1s; }
.poem-item:nth-child(3) { animation-delay: 0.15s; }
.poem-item:nth-child(4) { animation-delay: 0.2s; }
.poem-item:nth-child(5) { animation-delay: 0.25s; }
.poem-item:nth-child(6) { animation-delay: 0.3s; }
.poem-item:nth-child(7) { animation-delay: 0.35s; }
.poem-item:nth-child(8) { animation-delay: 0.4s; }
.poem-item:nth-child(9) { animation-delay: 0.45s; }
.poem-item:nth-child(10) { animation-delay: 0.5s; }
.poem-item:nth-child(11) { animation-delay: 0.55s; }
.poem-item:nth-child(12) { animation-delay: 0.6s; }

.poem-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    background: rgba(231, 231, 231, 0.02);
    border: 1px solid rgba(231, 231, 231, 0.1);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.poem-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 231, 231, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.poem-link:hover {
    transform: translateY(-4px);
    border-color: rgba(231, 231, 231, 0.2);
    background: rgba(231, 231, 231, 0.04);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.poem-link:hover::before {
    opacity: 1;
}

html.day-mode .poem-link {
    background: rgba(90, 82, 73, 0.03);
    border-color: rgba(90, 82, 73, 0.15);
}

html.day-mode .poem-link:hover {
    background: rgba(90, 82, 73, 0.05);
    border-color: rgba(90, 82, 73, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Portrait de l'auteur */
.poem-link-author-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(231, 231, 231, 0.15);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.poem-link:hover .poem-link-author-portrait {
    transform: scale(1.05);
}

html.day-mode .poem-link-author-portrait {
    border-color: rgba(90, 82, 73, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.poem-link-author-portrait-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(231, 231, 231, 0.05);
    border: 2px solid rgba(231, 231, 231, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.poem-link:hover .poem-link-author-portrait-placeholder {
    transform: scale(1.05);
}

html.day-mode .poem-link-author-portrait-placeholder {
    background: rgba(90, 82, 73, 0.08);
    border-color: rgba(90, 82, 73, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.poem-link-author-initials {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(231, 231, 231, 0.4);
    letter-spacing: 0.05em;
}

html.day-mode .poem-link-author-initials {
    color: rgba(90, 82, 73, 0.4);
}

/* Titre du poème */
.poem-link-title {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1.25rem, 1.5vw, 1.5rem);
    font-weight: 500;
    color: var(--text-night);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.poem-link-title:hover {
    opacity: 0.8;
}

html.day-mode .poem-link-title {
    color: var(--text-primary);
}

/* Auteur */
.poem-link-author {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    color: rgba(231, 231, 231, 0.7);
    margin: 0 0 1rem 0;
    font-style: italic;
}

html.day-mode .poem-link-author {
    color: var(--text-secondary);
}

.poem-link-author-name {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.poem-link-author-name:hover {
    opacity: 0.8;
}

/* Extrait */
.poem-link-summary {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(231, 231, 231, 0.75);
    margin: 0 0 1.25rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.day-mode .poem-link-summary {
    color: var(--text-secondary);
}

/* Tags */
.poem-link-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(231, 231, 231, 0.1);
}

html.day-mode .poem-link-tags {
    border-top-color: rgba(90, 82, 73, 0.15);
}

.poem-tag {
    font-family: 'Lora', serif;
    font-size: 0.8125rem;
    color: rgba(231, 231, 231, 0.6);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

html.day-mode .poem-tag {
    background: rgba(90, 82, 73, 0.1);
    border-color: rgba(90, 82, 73, 0.2);
    color: rgba(90, 82, 73, 0.6);
}

html.day-mode .poem-tag:hover {
    background: rgba(90, 82, 73, 0.15);
    border-color: rgba(90, 82, 73, 0.3);
    color: rgba(90, 82, 73, 0.8);
}

/* Année */
.poem-link-year {
    font-family: 'Lora', serif;
    font-size: 0.8125rem;
    color: rgba(231, 231, 231, 0.5);
    margin-top: 0.75rem;
    font-style: italic;
}

html.day-mode .poem-link-year {
    color: var(--text-placeholder);
}

/* Pagination moderne */
.pagination {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(231, 231, 231, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

html.day-mode .pagination {
    border-top-color: rgba(90, 82, 73, 0.15);
}

.pagination-info {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    color: rgba(231, 231, 231, 0.7);
    font-style: italic;
}

html.day-mode .pagination-info {
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-link {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    color: rgba(231, 231, 231, 0.75);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(231, 231, 231, 0.2);
    background: rgba(231, 231, 231, 0.02);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 2.5rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-link:hover:not(.active):not(.disabled) {
    color: rgba(231, 231, 231, 0.95);
    border-color: rgba(231, 231, 231, 0.4);
    background: rgba(231, 231, 231, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pagination-link.active {
    background: rgba(231, 231, 231, 0.1) !important;
    border-color: rgba(231, 231, 231, 0.3) !important;
    color: rgba(231, 231, 231, 0.95) !important;
    font-weight: 500;
    pointer-events: none;
    cursor: default;
}

.pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

html.day-mode .pagination-link {
    color: var(--text-secondary);
    border-color: rgba(90, 82, 73, 0.2);
    background: rgba(90, 82, 73, 0.03);
}

html.day-mode .pagination-link:hover:not(.active):not(.disabled) {
    color: var(--text-primary);
    border-color: rgba(90, 82, 73, 0.4);
    background: rgba(90, 82, 73, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.day-mode .pagination-link.active {
    background: rgba(90, 82, 73, 0.1) !important;
    border-color: rgba(90, 82, 73, 0.3) !important;
    color: var(--text-primary) !important;
}

.pagination-ellipsis {
    padding: 0.75rem 0.5rem;
    color: rgba(231, 231, 231, 0.4);
    font-family: 'Lora', serif;
}

html.day-mode .pagination-ellipsis {
    color: rgba(90, 82, 73, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .poems-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .poems-page {
        padding: calc(40px + 1.5rem) 1.5rem 2rem; /* Header fixe (82px) + espacement */
    }

    .hero-section {
        margin-bottom: 3rem;
        padding: 2rem 0;
    }

    .poems-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .poem-link {
        padding: 1.5rem;
    }

    .pagination-controls {
        flex-direction: column;
        width: 100%;
    }

    .pagination-link {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .poem-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

