/* poem_show_bundle.css â€” daily_poem.css + poem_show.css (sans lyreval_shell). RÃ©gÃ©nÃ©rer : scripts/merge-layout-css.ps1 */
/* ========================================
   Page poème (show) — lecture, exploration
   Design: moment de découverte, envie d'explorer
   ======================================== */

.poem-show {
    min-height: 100vh;
    padding-top: .5rem;
    padding-bottom: 0;
    background: var(--bg-day);
    color: var(--text-primary);
}

html:not(.day-mode) .poem-show {
    background: var(--bg-night);
    color: var(--text-night);
}

/* Zone de lecture : bande centrée, légèrement mise en avant */
.poem-show__reading-zone {
    max-width: 40rem;
    margin: 0 auto;
    padding: 3.5rem 2rem 4rem;
    position: relative;
}

@keyframes poemShowFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Ligne décorative qui s’anime sous la phrase */
/* Article poème — centre de l'expérience */
.poem-show__article {
    opacity: 0;
    animation: poemShowFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

@media (prefers-reduced-motion: reduce) {
    .poem-show__article {
        animation: none;
        opacity: 1;
    }
}

.poem-show__poem-title {
    font-family: 'Crimson Pro', 'Lora', serif;
    font-size: clamp(2.4rem, 4.5vw, 2.5rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 0 0 .25rem;
    color: var(--text-primary);
}

html:not(.day-mode) .poem-show__poem-title {
    color: rgba(231, 231, 231, 0.98);
}

.poem-show__author {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.9375rem;
    font-style: italic;
    letter-spacing: 0.01em;
    margin: 0 0 2.5rem;
}

.poem-show__author,
.poem-show__author a {
    color: #767068;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.poem-show__author a:hover {
    color: var(--text-primary);
    border-bottom-color: transparent;
}

html:not(.day-mode) .poem-show__author,
html:not(.day-mode) .poem-show__author a {
    color: rgba(231, 231, 231, 0.68);
}

html:not(.day-mode) .poem-show__author a:hover {
    color: rgba(231, 231, 231, 0.95);
}

/* Titre + auteur */
.poem-show__heading {
    display: block;
}

/* Like toggle — minimal heart + label */
.poem-show__like-row {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 0;
}

.poem-like-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    transition: background 0.25s ease;
    outline: none;
}

.poem-like-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

html:not(.day-mode) .poem-like-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.poem-like-toggle:focus-visible {
    outline: 1.5px solid var(--text-secondary);
    outline-offset: 3px;
}

.poem-like-toggle__icon {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    flex-shrink: 0;
}

.poem-like-toggle__icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    color: rgba(90, 82, 73, 0.4);
    transition: color 0.3s ease;
}

html:not(.day-mode) .poem-like-toggle__icon::before {
    color: rgba(231, 231, 231, 0.35);
}

.poem-like-toggle.liked .poem-like-toggle__icon::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    color: #c06060;
}

html:not(.day-mode) .poem-like-toggle.liked .poem-like-toggle__icon::before {
    color: #d47070;
}

.poem-like-toggle.liked:hover .poem-like-toggle__icon::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    color: rgba(90, 82, 73, 0.65);
}

html:not(.day-mode) .poem-like-toggle.liked:hover .poem-like-toggle__icon::before {
    color: rgba(231, 231, 231, 0.55);
}

.poem-like-toggle:hover .poem-like-toggle__icon {
    transform: scale(1.1);
}

.poem-like-toggle:active .poem-like-toggle__icon {
    transform: scale(0.92);
}

@keyframes poemLikePulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.25); }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.poem-like-toggle.liked .poem-like-toggle__icon {
    animation: poemLikePulse 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poem-like-toggle__label {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.8125rem;
    font-style: italic;
    color: rgba(90, 82, 73, 0.45);
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    user-select: none;
}

.poem-like-toggle__text {
    display: none;
}

.poem-like-toggle:not(.liked) .poem-like-toggle__text--default {
    display: inline;
}

.poem-like-toggle.liked .poem-like-toggle__text--liked {
    display: inline;
}

.poem-like-toggle.liked:hover .poem-like-toggle__text--liked {
    display: none;
}

.poem-like-toggle.liked:hover .poem-like-toggle__text--unlike {
    display: inline;
}

html:not(.day-mode) .poem-like-toggle__label {
    color: rgba(231, 231, 231, 0.35);
}

.poem-like-toggle:hover .poem-like-toggle__label {
    color: rgba(90, 82, 73, 0.65);
}

html:not(.day-mode) .poem-like-toggle:hover .poem-like-toggle__label {
    color: rgba(231, 231, 231, 0.55);
}

.poem-like-toggle.liked .poem-like-toggle__label {
    color: rgba(192, 96, 96, 0.85);
}

html:not(.day-mode) .poem-like-toggle.liked .poem-like-toggle__label {
    color: rgba(212, 112, 112, 0.85);
}

.poem-like-toggle.liked:hover .poem-like-toggle__label {
    color: rgba(90, 82, 73, 0.65);
}

html:not(.day-mode) .poem-like-toggle.liked:hover .poem-like-toggle__label {
    color: rgba(231, 231, 231, 0.55);
}

/* ---- Add to playlist (inline, same row as like) ---- */
.poem-show__like-row {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.poem-playlist-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    transition: background 0.25s ease;
    outline: none;
}
.poem-playlist-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}
html:not(.day-mode) .poem-playlist-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}
.poem-playlist-toggle:focus-visible {
    outline: 1.5px solid var(--text-secondary);
    outline-offset: 3px;
}
.poem-playlist-toggle__icon {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.poem-playlist-toggle__icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    color: rgba(90, 82, 73, 0.35);
}
html:not(.day-mode) .poem-playlist-toggle__icon::before {
    color: rgba(231, 231, 231, 0.35);
}
.poem-playlist-toggle:hover .poem-playlist-toggle__icon {
    transform: scale(1.1);
}
.poem-playlist-toggle:hover .poem-playlist-toggle__icon::before {
    color: rgba(90, 82, 73, 0.55);
}
html:not(.day-mode) .poem-playlist-toggle:hover .poem-playlist-toggle__icon::before {
    color: rgba(231, 231, 231, 0.6);
}
.poem-playlist-toggle__label {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.8125rem;
    font-style: italic;
    color: rgba(90, 82, 73, 0.45);
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    user-select: none;
}
html:not(.day-mode) .poem-playlist-toggle__label {
    color: rgba(231, 231, 231, 0.35);
}
.poem-playlist-toggle:hover .poem-playlist-toggle__label {
    color: rgba(90, 82, 73, 0.65);
}
html:not(.day-mode) .poem-playlist-toggle:hover .poem-playlist-toggle__label {
    color: rgba(231, 231, 231, 0.55);
}

/* ---- Playlist picker dropdown ---- */
.poem-playlist-picker {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
    animation: poemShowFadeIn 0.2s ease forwards;
}
.poem-playlist-picker__inner {
    width: 100%;
    max-width: 18rem;
    background: rgba(250, 247, 242, 0.95);
    border: 1px solid rgba(224, 214, 202, 0.4);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
html:not(.day-mode) .poem-playlist-picker__inner {
    background: rgba(26, 26, 26, 0.95);
    border-color: rgba(231, 231, 231, 0.12);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.poem-playlist-picker__list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 12rem;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}
.poem-playlist-picker__item {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(43, 43, 43, 0.08);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.poem-playlist-picker__item:hover {
    background: rgba(43, 43, 43, 0.04);
    border-color: rgba(43, 43, 43, 0.2);
}
html:not(.day-mode) .poem-playlist-picker__item {
    border-color: rgba(231, 231, 231, 0.08);
    color: rgba(231, 231, 231, 0.85);
}
html:not(.day-mode) .poem-playlist-picker__item:hover {
    background: rgba(231, 231, 231, 0.05);
    border-color: rgba(231, 231, 231, 0.2);
}
.poem-playlist-picker__new {
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem 0;
    transition: color 0.2s ease;
}
.poem-playlist-picker__new:hover {
    color: var(--text-primary);
}
html:not(.day-mode) .poem-playlist-picker__new {
    color: rgba(231, 231, 231, 0.5);
}
html:not(.day-mode) .poem-playlist-picker__new:hover {
    color: rgba(231, 231, 231, 0.85);
}
.poem-playlist-picker__feedback {
    font-family: 'Lora', serif;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0.35rem 0 0;
    min-height: 1em;
    text-align: center;
}
.poem-playlist-picker__input {
    width: 100%;
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(43, 43, 43, 0.15);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.poem-playlist-picker__input:focus {
    border-color: var(--text-secondary);
}
.poem-playlist-picker__input::placeholder {
    color: var(--text-placeholder);
    font-style: italic;
}
html:not(.day-mode) .poem-playlist-picker__input {
    border-color: rgba(231, 231, 231, 0.15);
    color: rgba(231, 231, 231, 0.9);
}
html:not(.day-mode) .poem-playlist-picker__input:focus {
    border-color: rgba(231, 231, 231, 0.35);
}
.poem-playlist-picker__row {
    display: flex;
    gap: 0.5rem;
}
.poem-playlist-picker__submit,
.poem-playlist-picker__cancel {
    font-family: 'Crimson Pro', serif;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.poem-playlist-picker__submit {
    color: var(--text-primary);
    background: none;
    border: 1px solid rgba(43, 43, 43, 0.2);
}
.poem-playlist-picker__submit:hover {
    border-color: rgba(43, 43, 43, 0.4);
    background: rgba(43, 43, 43, 0.03);
}
.poem-playlist-picker__cancel {
    color: var(--text-secondary);
    background: none;
    border: 1px solid transparent;
}
.poem-playlist-picker__cancel:hover {
    color: var(--text-primary);
}
html:not(.day-mode) .poem-playlist-picker__submit {
    color: rgba(231, 231, 231, 0.85);
    border-color: rgba(231, 231, 231, 0.2);
}
html:not(.day-mode) .poem-playlist-picker__submit:hover {
    border-color: rgba(231, 231, 231, 0.4);
    background: rgba(231, 231, 231, 0.04);
}
html:not(.day-mode) .poem-playlist-picker__cancel {
    color: rgba(231, 231, 231, 0.5);
}
html:not(.day-mode) .poem-playlist-picker__cancel:hover {
    color: rgba(231, 231, 231, 0.85);
}

/* Scroll hint — invite discrète à défiler */
.poem-show__scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-bottom: 1rem;
    opacity: 0;
    animation: poemShowFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

.poem-show__scroll-hint-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(110, 106, 100, 0.45);
}

html:not(.day-mode) .poem-show__scroll-hint-label {
    color: rgba(170, 166, 158, 0.4);
}

.poem-show__scroll-hint-line {
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(to bottom, rgba(100, 96, 90, 0.3), transparent);
    animation: poemScrollPulse 2.4s ease-in-out 1.8s infinite;
}

html:not(.day-mode) .poem-show__scroll-hint-line {
    background: linear-gradient(to bottom, rgba(210, 206, 198, 0.22), transparent);
}

/* Repères catalogue — après « Pour prolonger la lecture » */
.poem-show__reading-refs {
    max-width: 42rem;
    margin: 1.75rem auto 0;
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.poem-show__reading-refs__intro {
    margin: 0 0 0.85rem;
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.9rem;
    line-height: 1.55;
    font-style: italic;
    color: var(--text-secondary);
}

html:not(.day-mode) .poem-show__reading-refs__intro {
    color: rgba(231, 231, 231, 0.55);
}

.poem-show__reading-refs__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.45rem 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.poem-show__reading-refs__chip-item {
    margin: 0;
    padding: 0;
}

.poem-show__reading-refs__chip {
    display: inline-block;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 106, 100, 0.2);
    background: rgba(255, 255, 255, 0.35);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: rgba(75, 72, 68, 0.78);
    text-decoration: none;
    line-height: 1.35;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.poem-show__reading-refs__chip:hover {
    border-color: rgba(110, 106, 100, 0.35);
    background: rgba(255, 255, 255, 0.55);
    color: rgba(55, 52, 48, 0.9);
}

.poem-show__reading-refs__chip:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 2px;
}

.poem-show__reading-refs__chip--static {
    cursor: default;
    border-style: dashed;
    opacity: 0.88;
}

.poem-show__reading-refs__chip--static:hover {
    border-color: rgba(110, 106, 100, 0.2);
    background: rgba(255, 255, 255, 0.35);
    color: rgba(75, 72, 68, 0.78);
}

html.day-mode .poem-show__reading-refs__chip {
    border-color: rgba(43, 43, 43, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-primary);
}

html.day-mode .poem-show__reading-refs__chip:hover {
    border-color: rgba(43, 43, 43, 0.2);
    background: rgba(255, 255, 255, 0.92);
}

html.day-mode .poem-show__reading-refs__chip--static:hover {
    border-color: rgba(43, 43, 43, 0.12);
    background: rgba(255, 255, 255, 0.65);
}

html:not(.day-mode) .poem-show__reading-refs__chip {
    border-color: rgba(200, 196, 188, 0.22);
    background: rgba(40, 40, 42, 0.35);
    color: rgba(220, 218, 212, 0.82);
}

html:not(.day-mode) .poem-show__reading-refs__chip:hover {
    border-color: rgba(210, 206, 198, 0.38);
    background: rgba(48, 48, 50, 0.5);
    color: rgba(235, 233, 228, 0.95);
}

html:not(.day-mode) .poem-show__reading-refs__chip--static:hover {
    border-color: rgba(200, 196, 188, 0.22);
    background: rgba(40, 40, 42, 0.35);
    color: rgba(220, 218, 212, 0.82);
}

@keyframes poemScrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50%      { transform: scaleY(1.12); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
    .poem-show__scroll-hint {
        animation: none;
        opacity: 1;
    }
    .poem-show__scroll-hint-line {
        animation: none;
    }
    .poem-like-toggle.liked .poem-like-toggle__icon {
        animation: none;
    }
}

/* Corps du poème — colonne de lecture, respiration généreuse */
.poem-show__text-wrap {
    margin: 0;
}

.poem-show .poem-body {
    font-family: 'Lora', 'Georgia', serif;
    font-size: clamp(1.125rem, 2.2vw, 1.25rem);
    line-height: 2;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    max-width: 100%;
}

html:not(.day-mode) .poem-show .poem-body {
    color: rgba(231, 231, 231, 0.92);
}

/* Actions : cœur uniquement (comme page poème classique) */
/* Ligne poème + cœur : poème à gauche, like à droite */
.poem-show__poem-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0;
}

.poem-show__article {
    flex: 1;
    min-width: 0;
}

.poem-show__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
    opacity: 0;
    animation: poemShowFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@media (prefers-reduced-motion: reduce) {
    .poem-show__actions {
        animation: none;
        opacity: 1;
    }
}

/* ========================================
   EXPLORATION — Continuer par résonance,
   cards de suggestion
   ======================================== */

.poem-show__explore {
    padding: 0 1.5rem 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: poemShowFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

html:not(.day-mode) .poem-show__explore {
    background: transparent;
}

.poem-show__explore-inner {
    max-width: 60rem;
    margin: 0 auto;
}

/* Titre + sous-titre */
.poem-show__explore-head {
    text-align: center;
    margin-bottom: 2rem;
}

.poem-show__headline {
    margin: 0 0 0.35rem;
    font-family: 'Crimson Pro', 'Lora', serif;
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
    opacity: 0;
    animation: poemShowFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

html:not(.day-mode) .poem-show__headline {
    color: rgba(231, 231, 231, 0.98);
}

.poem-show__supporting-line {
    margin: 0;
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: poemShowFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.0s forwards;
}

html:not(.day-mode) .poem-show__supporting-line {
    color: rgba(231, 231, 231, 0.55);
}

/* Grille de cards — 3 colonnes desktop */
.poem-show__cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

/* Card de suggestion */
.poem-show__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(43, 43, 43, 0.07);
    border-radius: 8px;
    padding: 1.25rem 1.25rem 1.35rem;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    animation: poemShowFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    cursor: pointer;
}

.poem-show__card:nth-child(1) { animation-delay: 1.05s; }
.poem-show__card:nth-child(2) { animation-delay: 1.2s; }
.poem-show__card:nth-child(3) { animation-delay: 1.35s; }

.poem-show__card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(43, 43, 43, 0.12);
    box-shadow: 0 3px 16px rgba(43, 43, 43, 0.06);
}

.poem-show__card:focus-visible {
    outline: 1.5px solid var(--text-secondary);
    outline-offset: 3px;
}

html:not(.day-mode) .poem-show__card {
    color: rgba(231, 231, 231, 0.96);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(231, 231, 231, 0.08);
}

html:not(.day-mode) .poem-show__card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(231, 231, 231, 0.14);
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.18);
}

/* Badges (thèmes / tags du poème suggéré) — en fin de carte, sous l’extrait */
.poem-show__card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.poem-show__card-badge {
    display: inline-block;
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.6875rem;
    font-style: italic;
    letter-spacing: 0.02em;
    color: #8B7355;
    background: rgba(180, 155, 120, 0.12);
    border: 1px solid rgba(180, 155, 120, 0.2);
    border-radius: 3px;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0;
}

html:not(.day-mode) .poem-show__card-badge {
    color: rgba(220, 195, 160, 0.9);
    background: rgba(200, 175, 140, 0.1);
    border-color: rgba(200, 175, 140, 0.18);
}

/* Titre du poème dans la card */
.poem-show__card-title {
    display: block;
    font-family: 'Crimson Pro', 'Lora', serif;
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

/* Auteur */
.poem-show__card-author {
    display: block;
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
}

html:not(.day-mode) .poem-show__card-author {
    color: rgba(231, 231, 231, 0.55);
}

/* Tags chips */
.poem-show__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.poem-show__card-tag {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    border: 1px solid rgba(43, 43, 43, 0.12);
    border-radius: 10rem;
    padding: 0.15rem 0.55rem;
}

html:not(.day-mode) .poem-show__card-tag {
    color: rgba(231, 231, 231, 0.6);
    border-color: rgba(231, 231, 231, 0.15);
}

/* Extrait en italique */
.poem-show__card-excerpt {
    display: block;
    font-family: 'Lora', 'Georgia', serif;
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-top: auto;
}

html:not(.day-mode) .poem-show__card-excerpt {
    color: rgba(231, 231, 231, 0.5);
}

/* Card "Ouvrir ailleurs" — pleine largeur, accent chaud */
.poem-show__card--random {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    background: rgba(180, 155, 120, 0.08);
    border-color: rgba(180, 155, 120, 0.14);
    padding: 1.1rem 1.35rem;
}

.poem-show__card--random:hover {
    background: rgba(180, 155, 120, 0.15);
    border-color: rgba(180, 155, 120, 0.22);
    box-shadow: 0 2px 12px rgba(160, 140, 110, 0.08);
}

html:not(.day-mode) .poem-show__card--random {
    background: rgba(200, 175, 140, 0.06);
    border-color: rgba(200, 175, 140, 0.1);
}

html:not(.day-mode) .poem-show__card--random:hover {
    background: rgba(200, 175, 140, 0.12);
    border-color: rgba(200, 175, 140, 0.18);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.poem-show__card-random-icon {
    font-size: 0.875rem;
    color: #8B7355;
    flex-shrink: 0;
}

html:not(.day-mode) .poem-show__card-random-icon {
    color: rgba(220, 195, 160, 0.8);
}

.poem-show__card-random-text {
    display: flex;
    flex-direction: column;
}

.poem-show__card--random .poem-show__card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.1rem;
}

.poem-show__card--random .poem-show__card-author {
    margin-bottom: 0;
    font-size: 0.8rem;
}

/* Animation de sortie douce */
.poem-show--leaving {
    transition: opacity 0.18s ease, transform 0.18s ease;
    opacity: 0;
    transform: translateY(6px);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .poem-show__cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .poem-show__cards-grid .poem-show__card:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .poem-show {
        padding-top: .5rem;
    }

    .poem-show__reading-zone {
        padding: 2.5rem 7.6923% 3rem;
    }

    .poem-show__date {
        font-size: 0.6875rem;
        letter-spacing: 0.15em;
    }

    .poem-show__explore {
        padding: 0rem 1rem 1.5rem;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }

    .poem-show__cards-grid {
        grid-template-columns: 1fr;
    }

    .poem-show__card {
        padding: 1rem 1rem 1.15rem;
    }

    .poem-show__card-title {
        font-size: 1.05rem;
    }
}


/* Container principal (conservé pour d'autres contextes si besoin) */
.poem-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

/* Page poème : colonne de lecture (40rem) */
.poem-show .section-separator {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.poem-show .poem-footer {
    max-width: 40rem;
    margin: 0 auto 4rem;
    text-align: center;
}

/* Page poème : pas de délais d'animation sur le bloc continuation */
#poem-main-container .poem-show__explore,
#poem-main-container .poem-show__headline,
#poem-main-container .poem-show__supporting-line,
#poem-main-container .poem-show__card,
#poem-main-container .poem-show__reading-refs,
#poem-main-container .poem-show__reading-refs__intro,
#poem-main-container .poem-show__reading-refs__chips,
#poem-main-container .poem-show__reading-refs__chip {
    animation-delay: 0s;
}

/* Titre du poème (contexte .poem-container) */
.poem-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.poem-title {
    font-size: 2.2rem;
    font-family: 'Crimson Pro', serif;
    font-weight: 500;
    color: var(--text-night);
    margin-bottom: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    flex: 1;
}

/* Container pour le bouton like (legacy context) */
.poem-like-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Bouton cœur avec animation */
.poem-heart,
.poem-like-container .poem-heart {
    background-image: url(/img/web_heart_animation.png);
    background-position: left top;
    background-repeat: no-repeat;
    background-size: 2900%;
    cursor: pointer;
    display: block;
    width: 50px;
    height: 50px;
    border: none;
    padding: 0;
    background-color: transparent;
    position: relative;
    transition: transform 0.2s ease;
}

.poem-heart:hover,
.poem-like-container .poem-heart:hover {
    transform: scale(1.05);
}

/* Pendant l’animation, ne pas forcer la position du sprite au survol */
.poem-heart:hover:not(.on),
.poem-like-container .poem-heart:hover:not(.on) {
    background-position: right top;
}

.poem-heart.on,
.poem-like-container .poem-heart.on {
    animation: heartAnim 1s steps(28) forwards;
    transition: none;
}

@keyframes heartAnim {
    from {
        background-position: left top;
    }
    to {
        background-position: right top;
    }
}

/* État « liked » : frame final + retours au survol après l’animation */
.poem-heart.liked,
.poem-like-container .poem-heart.liked {
    background-position: right top;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .poem-title-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1rem;
    }

    .poem-title {
        flex: 1;
        min-width: 0;
    }

    .poem-heart {
        width: 45px;
        height: 45px;
    }
}

html.day-mode .poem-title {
    color: var(--text-primary);
}

.poem-title::selection {
    background: rgba(139, 116, 169, 0.4);
    color: #E7E7E7;
}

.poem-title::-moz-selection {
    background: rgba(139, 116, 169, 0.4);
    color: #E7E7E7;
}

html.day-mode .poem-title::selection {
    background: rgba(200, 162, 200, 0.35);
    color: #1A1A1A;
}

html.day-mode .poem-title::-moz-selection {
    background: rgba(200, 162, 200, 0.35);
    color: #1A1A1A;
}

/* Auteur */
.poem-author {
    font-size: 1rem;
    color: rgba(231, 231, 231, 0.7);
    margin-bottom: 1rem;
    font-family: 'Lora', serif;
}

html.day-mode .poem-author {
    color: var(--text-secondary);
}

.poem-author a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.poem-author a:hover {
    opacity: 0.8;
}

.poem-reading-time {
    font-size: 0.875rem;
    color: var(--color-ui-muted, rgba(231, 231, 231, 0.6));
    margin: 0.5rem 0 0;
}
html.day-mode .poem-reading-time {
    color: var(--color-ui-muted);
}

.poem-metadata-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.poem-metadata-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--color-chip-bg);
    border: 1px solid var(--color-chip-border);
    color: var(--color-chip-text);
    border-radius: 4px;
}

.poem-save-label {
    font-size: 0.8125rem;
    color: var(--color-action-text);
}

/* Bloc continuation — calme, hiérarchie claire */
.poem-continuation {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--color-divider);
}
.poem-continuation-title {
    font-family: 'Crimson Pro', 'Lora', serif;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 1.25rem;
    letter-spacing: 0.02em;
    color: var(--color-ui-muted);
}
html.day-mode .poem-continuation-title {
    color: var(--text-secondary);
}
.poem-continuation-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}
.poem-continuation-item {
    margin-bottom: 0.75rem;
}
.poem-continuation-item:last-child {
    margin-bottom: 0;
}
.poem-continuation-link {
    display: block;
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-decoration: none;
    color: var(--color-text-main);
    transition: opacity 0.2s ease;
}
.poem-continuation-link:hover {
    opacity: 0.88;
}
.poem-continuation-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--color-ui-muted);
    margin-bottom: 0.2rem;
}
.poem-continuation-promenade {
    margin: 0;
    padding-top: 0.5rem;
}
.poem-continuation-promenade-link {
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--color-text-main);
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.06em;
    transition: opacity 0.2s ease;
}
.poem-continuation-promenade-link:hover {
    opacity: 0.85;
}

/* Panneau Garder ce vers — sobre, intégré */
.poem-text-section {
    position: relative;
}
.verse-save-panel {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    max-width: calc(100vw - 1rem);
    flex-wrap: wrap;
    padding: 0.5rem 0.875rem;
    background: var(--bg-day);
    border: 1px solid rgba(43, 43, 43, 0.15);
    border-radius: 2px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    font-family: 'Lora', serif;
}
html:not(.day-mode) .verse-save-panel {
    background: var(--bg-night);
    border-color: rgba(231, 231, 231, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}
.verse-save-btn {
    font-size: 0.875rem;
    padding: 0.4rem 0.875rem;
    background: transparent;
    border: 1px solid currentColor;
    color: var(--text-primary);
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease, background 0.2s ease;
}
.verse-save-btn:hover:not(:disabled) {
    opacity: 0.9;
    background: rgba(43, 43, 43, 0.05);
}
html:not(.day-mode) .verse-save-btn {
    color: var(--text-night);
    border-color: rgba(231, 231, 231, 0.5);
}
html:not(.day-mode) .verse-save-btn:hover:not(:disabled) {
    background: rgba(231, 231, 231, 0.06);
}
.verse-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.verse-save-feedback {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
html:not(.day-mode) .verse-save-feedback {
    color: rgba(231, 231, 231, 0.7);
}
.verse-save-feedback.success {
    color: var(--text-primary);
}
html:not(.day-mode) .verse-save-feedback.success {
    color: rgba(231, 231, 231, 0.95);
}

/* Signature de l'auteur en fin de poème */
.poem-author-signature {
    margin: 2rem 0 0;
    text-align: right;
    width: 75%;
}
.poem-author-signature__img {
    display: inline-block;
    max-width: 250px;
    height: auto;
    opacity: 0.65;
    filter: grayscale(0.2);
    transition: opacity 0.2s ease;
}
.poem-author-signature:hover .poem-author-signature__img {
    opacity: 0.85;
}
html:not(.day-mode) .poem-author-signature__img {
    opacity: 0.5;
}
html:not(.day-mode) .poem-author-signature:hover .poem-author-signature__img {
    opacity: 0.75;
}

@media (max-width: 520px) {
    .poem-author-signature {
        width: 100%;
        margin-top: 1.5rem;
    }
    .poem-author-signature__img {
        max-width: 190px;
    }
}

/* ========================================
   Variantes layout page poème (utilise poem_show.css uniquement)
   ======================================== */
.poem-show.poem-container {
    padding-top: 5rem;
    padding-bottom: 4rem;
    max-width: 42rem;
}
.poem-show-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.poem-show-date {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}
html:not(.day-mode) .poem-show-date {
    color: rgba(231, 231, 231, 0.65);
}
.poem-show-title-lead {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0;
    color: var(--text-primary);
}
html:not(.day-mode) .poem-show-title-lead {
    color: var(--text-night);
}
.poem-show-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.poem-show-link-canonical {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.06em;
    transition: opacity 0.2s ease;
}
.poem-show-link-canonical:hover {
    opacity: 0.85;
}
html:not(.day-mode) .poem-show-link-canonical {
    color: rgba(231, 231, 231, 0.8);
}
.poem-show-related {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(43, 43, 43, 0.1);
}
html:not(.day-mode) .poem-show-related {
    border-top-color: rgba(231, 231, 231, 0.1);
}
.poem-show-related-title {
    font-family: 'Crimson Pro', serif;
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
}
html:not(.day-mode) .poem-show-related-title {
    color: rgba(231, 231, 231, 0.7);
}
.poem-show-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.poem-show-related-list li {
    margin-bottom: 0.5rem;
}
.poem-show-related-link {
    font-size: 0.9375rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.poem-show-related-link:hover {
    opacity: 0.8;
}
html:not(.day-mode) .poem-show-related-link {
    color: var(--text-night);
}

/* Design tokens pour le footer */
:root {
    --color-text-main: rgba(231, 231, 231, 0.85);
    --color-ui-muted: rgba(231, 231, 231, 0.6);
    --color-border-soft: rgba(224, 214, 202, 0.3);
    --color-chip-bg: rgba(231, 231, 231, 0.05);
    --color-chip-border: rgba(224, 214, 202, 0.25);
    --color-chip-text: rgba(231, 231, 231, 0.8);
    --color-button-bg: rgba(231, 231, 231, 0.08);
    --color-button-hover: rgba(231, 231, 231, 0.12);
    --color-action-text: rgba(231, 231, 231, 0.65);
    --color-divider: rgba(230, 224, 215, 0.4);
}

html.day-mode {
    --color-text-main: rgba(90, 82, 73, 0.9);
    --color-ui-muted: rgba(90, 82, 73, 0.6);
    --color-border-soft: rgba(224, 214, 202, 0.4);
    --color-chip-bg: rgb(247, 243, 236);
    --color-chip-border: rgba(224, 214, 202, 0.4);
    --color-chip-text: rgba(90, 82, 73, 0.9);
    --color-button-bg: #f7f3ec;
    --color-button-hover: #f3eee6;
    --color-action-text: rgba(180, 175, 167, 0.8);
    --color-divider: rgba(230, 224, 215, 0.7);
}

/* Texte du poème */
.poem-text-section {
    margin: 0;
}

.poem-body {
    display: block;
    font-family: 'Lora', 'Georgia', 'Times New Roman', serif;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
    white-space: pre-wrap;
    font-size: 18px;
    line-height: 1.85;
    color: var(--text-night);
    margin: 0;
    padding: 0;
    font-weight: 450;
    text-indent: 0;
    letter-spacing: 0;
    word-spacing: 0;
    word-break: break-word;
    max-width: 100%;
    text-align: left;
}

html.day-mode .poem-body {
    color: var(--text-primary);
}

.poem-body::selection {
    background: rgba(139, 116, 169, 0.4);
    color: #E7E7E7;
}

.poem-body::-moz-selection {
    background: rgba(139, 116, 169, 0.4);
    color: #E7E7E7;
}

html.day-mode .poem-body::selection {
    background: rgba(200, 162, 200, 0.35);
    color: #1A1A1A;
}

html.day-mode .poem-body::-moz-selection {
    background: rgba(200, 162, 200, 0.35);
    color: #1A1A1A;
}

.verse-highlight {
    background: rgba(139, 116, 169, 0.25);
    color: inherit;
    border-radius: 2px;
    padding: 0.1em 0;
    animation: verseHighlightPulse 2s ease-in-out;
}
html.day-mode .verse-highlight {
    background: rgba(200, 162, 200, 0.3);
}
@keyframes verseHighlightPulse {
    0%   { background: rgba(139, 116, 169, 0.5); }
    100% { background: rgba(139, 116, 169, 0.25); }
}
html.day-mode .verse-highlight {
    animation-name: verseHighlightPulseDay;
}
@keyframes verseHighlightPulseDay {
    0%   { background: rgba(200, 162, 200, 0.55); }
    100% { background: rgba(200, 162, 200, 0.3); }
}

/* .section-separator est défini dans common.css */

/* Article avec flex pour pousser le footer en bas */
.poem-container > article {
    flex: 1;
}

/* Séparateur et footer (contexte .poem-container) */
.poem-container .section-separator {
    margin-top: auto;
}

/* Bas de page - Footer */
.poem-footer {
    max-width: 680px;
    padding: 0 1.5rem;
    text-align: center;
}


/* Métadonnées (chips) */
.poem-footer__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 18px;
}

.poem-footer__meta-label {
    font-size: 0.875rem;
    color: rgba(231, 231, 231, 0.7);
    font-family: 'Lora', serif;
    font-style: italic;
    margin: 0;
    text-align: center;
}

html.day-mode .poem-footer__meta-label {
    color: var(--text-secondary);
}

.poem-footer__meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 10px;
    justify-content: center;
    align-items: center;
}

.poem-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(224, 214, 202, 0.35);
    background: transparent;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--text-night);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    opacity: 0.75;
    box-shadow: none;
}

html.day-mode .poem-chip {
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--border-button);
}

.poem-chip:hover {
    background: rgba(231, 231, 231, 0.08);
    border-color: rgba(224, 214, 202, 0.5);
    color: rgba(231, 231, 231, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 1;
}

html.day-mode .poem-chip:hover {
    background: var(--bg-button-hover);
    border-color: var(--border-button);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Hover spécifiques pour chaque type */
.poem-chip--major:hover {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(224, 214, 202, 0.6);
    opacity: 1;
}

html.day-mode .poem-chip--major:hover {
    background: rgba(247, 243, 236, 0.6);
    border-color: rgba(207, 196, 186, 0.7);
}

.poem-chip--emotion:hover {
    background: rgba(231, 231, 231, 0.06);
    border-color: rgba(224, 214, 202, 0.4);
    opacity: 0.85;
}

html.day-mode .poem-chip--emotion:hover {
    background: rgba(247, 243, 236, 0.3);
    border-color: rgba(207, 196, 186, 0.5);
}

.poem-chip--form:hover {
    background: rgba(231, 231, 231, 0.06);
    border-color: rgba(224, 214, 202, 0.5);
    border-style: dashed;
    opacity: 0.9;
}

html.day-mode .poem-chip--form:hover {
    background: rgba(247, 243, 236, 0.3);
    border-color: rgba(207, 196, 186, 0.6);
}

/* Effet hover sur le footer pour mettre tous les chips à opacité 1 */
.poem-footer:hover .poem-chip {
    opacity: 1;
}

.poem-chip:focus {
    outline: none;
}

.poem-chip:active {
    transform: none;
    background: rgba(231, 231, 231, 0.08);
    outline: none;
}

html.day-mode .poem-chip:active {
    background: var(--bg-button-hover);
}

.poem-footer__separator {
    color: var(--color-border-soft);
    padding: 0 2px;
}

/* Bouton aléatoire */
.poem-random {
    margin: 8px auto 20px auto;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-family: 'Lora', serif;
    font-weight: 400;
    color: var(--text-night);
    /* Contour fin (pas de fond plein) - couleur neutre */
    background: transparent;
    border: 1px solid rgba(224, 214, 202, 0.35);
    /* Forme arrondie douce */
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Pas d'ombre */
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
    text-decoration: none;
}

/* Sur mobile : styliser comme signet/carte papier */
@media (max-width: 768px) {
    .poem-random {
        margin: 12px auto 24px auto;
        padding: 12px 24px;
        border: 1px solid rgba(224, 214, 202, 0.25);
        border-radius: 8px;
        background: rgba(231, 231, 231, 0.02);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: opacity 0.4s ease, transform 0.4s ease;
        transform: translateY(0);
    }

    html.day-mode .poem-random {
        background: rgba(247, 243, 236, 0.3);
        border-color: rgba(207, 196, 186, 0.3);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    }

    .poem-random:active {
        opacity: 0.7;
        transform: translateY(1px);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .poem-random__label {
        font-size: 0.875rem;
    }
}

html.day-mode .poem-random {
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--border-button);
}

/* Hover : effet doux avec variation de fond, bordure et couleur du texte */
.poem-random:hover:not(:disabled) {
    background: rgba(231, 231, 231, 0.08);
    border-color: rgba(224, 214, 202, 0.5);
    color: rgba(231, 231, 231, 0.95);
    transform: translateY(-1px);
}

html.day-mode .poem-random:hover:not(:disabled) {
    background: var(--bg-button-hover);
    border-color: var(--border-button);
    color: var(--text-primary);
}

.poem-random:active:not(:disabled) {
    transform: none;
    background: rgba(231, 231, 231, 0.08);
}

html.day-mode .poem-random:active:not(:disabled) {
    background: var(--bg-button-hover);
}

.poem-random__icon {
    width: 40px;
    object-fit: contain;
    opacity: 0.7;
}

/* Icône de parchemin spécifique */
.poem-random__icon[src*="parchment"] {
    width: 27px;
}

.poem-random:hover .poem-random__icon {
    opacity: 0.85;
}

.poem-random.loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.poem-random:focus {
    outline: none;
}

.poem-random:focus-visible {
    outline: none;
}

/* Séparateur */
.poem-footer__divider {
    border: 0;
    border-top: 1px solid var(--color-divider);
    margin: 10px 0 10px 0;
    width: 100%;
}

/* Actions */
.poem-footer__actions,
.poem-footer__explore {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-auto-flow: row;
    justify-items: stretch;
    align-items: center;
    gap: 0;
    max-width: 100%;
    width: 100%;
}

.poem-footer__action {
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #8d817a;
    text-decoration: none;
    font-family: 'Lora', serif;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    outline: none;
    white-space: nowrap;
}

html.day-mode .poem-footer__action {
    color: #767068;
}

/* Alignement des actions : texte à droite du point central (colonne 1) */
.poem-footer__action:has(+ .poem-footer__dot) {
    grid-column: 1;
    justify-self: end;
    padding-right: 8px;
    text-align: right;
}

/* Alignement des actions : texte à gauche du point central (colonne 3) */
.poem-footer__dot + .poem-footer__action {
    grid-column: 3;
    justify-self: start;
    padding-left: 15px;
    text-align: left;
}

/* Action seule (sans point) : centrée sur toute la largeur */
.poem-footer__action:only-child,
.poem-footer__action:first-child:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
    padding: 0;
}

.poem-footer__action:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.poem-footer__action:focus,
.poem-footer__action:active {
    outline: none;
}

/* Alignement des séparateurs sur un axe vertical unique (colonne 2) */
.poem-footer__dot {
    color: var(--color-ui-muted);
    line-height: 1;
    vertical-align: baseline;
    grid-column: 2 !important;
    justify-self: center;
    width: 0;
    text-align: center;
    flex-shrink: 0;
    /* Tous les points sont forcés dans la colonne centrale (2), formant un axe vertical unique */
    /* Le !important garantit que cette règle est toujours appliquée, même sur plusieurs lignes */
}

/* Micro-texte "Poursuivre la lecture" sur mobile */
@media (max-width: 768px) {

    .poem-footer__actions,
    .poem-footer__explore {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 24px;
    }

    .poem-footer__action {
        font-size: 11px;
        padding: 8px 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(224, 214, 202, 0.2);
        border-radius: 4px;
        background: transparent;
        width: 100%;
        max-width: 280px;
    }

    .poem-footer__action:hover {
        background: rgba(231, 231, 231, 0.04);
        border-color: rgba(224, 214, 202, 0.3);
        text-decoration: none;
    }

    html.day-mode .poem-footer__action:hover {
        background: var(--bg-button-hover);
        border: 1px solid var(--border-button);
    }

    .poem-footer__dot {
        display: none;
    }
}

/* Bloc auteur */
.poem-author {
    margin-top: 2rem; /* 32px après le séparateur */
}

.poem-author .author-link {
    display: inline-block;
    color: rgba(231, 231, 231, 0.7);
    text-decoration: none;
    font-size: 0.9em;
    font-family: 'Lora', serif;
    transition: all 0.2s ease;
    outline: none;
}

html.day-mode .poem-author .author-link {
    color: var(--text-secondary);
}

.poem-author .author-link:focus,
.poem-author .author-link:active {
    outline: none;
}

.poem-author .author-link:hover {
    color: rgba(231, 231, 231, 0.9);
    text-decoration: underline;
}

html.day-mode .poem-author .author-link:hover {
    color: var(--text-primary);
}

.nav-link {
    color: rgba(231, 231, 231, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    font-family: 'Lora', serif;
}

html.day-mode .nav-link {
    color: var(--text-secondary);
}

.nav-link:hover {
    color: rgba(231, 231, 231, 0.9);
    border-bottom-color: rgba(231, 231, 231, 0.3);
}

html.day-mode .nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-button);
}

.nav-separator {
    color: rgba(231, 231, 231, 0.3);
    font-size: 14px;
}

html.day-mode .nav-separator {
    color: rgba(26, 26, 26, 0.3);
}

.print-button {
    color: rgba(231, 231, 231, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    font-family: 'Lora', serif;
    cursor: pointer;
    background: none;
    border: none;
}

html.day-mode .print-button {
    color: var(--text-secondary);
}

.print-button:hover {
    color: rgba(231, 231, 231, 0.9);
    border-bottom-color: rgba(231, 231, 231, 0.3);
}

html.day-mode .print-button:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-button);
}

/* ============================================
   Menu burger mobile - Design élégant
   ============================================ */

/* Bouton toggle du menu burger */
.poem-mobile-menu-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(231, 231, 231, 0.08);
    border: 1px solid rgba(224, 214, 202, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.poem-mobile-menu-toggle.is-visible {
    opacity: 0.5;
    transform: translateY(0);
    pointer-events: all;
}

html.day-mode .poem-mobile-menu-toggle {
    background: rgba(247, 243, 236, 0.85);
    border-color: rgba(224, 214, 202, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.poem-mobile-menu-toggle:hover {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(224, 214, 202, 0.35);
    transform: scale(1.05);
}

.poem-mobile-menu-toggle:active {
    transform: scale(0.95);
}

.poem-mobile-menu-toggle:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-toggle:focus-visible {
    outline-color: rgba(90, 82, 73, 0.4);
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 18px;
    position: relative;
}

.menu-toggle-line {
    width: 100%;
    height: 2px;
    background: rgba(231, 231, 231, 0.75);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

html.day-mode .menu-toggle-line {
    background: rgba(90, 82, 73, 0.75);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.poem-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.3s;
}

.poem-mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s;
}

.poem-mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 14, 17, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.day-mode .poem-mobile-menu-overlay {
    background: rgba(250, 246, 238, 0.85);
}

.poem-mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: rgba(11, 14, 17, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

html.day-mode .poem-mobile-menu-content {
    background: rgba(250, 247, 242, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.poem-mobile-menu.is-open .poem-mobile-menu-content {
    transform: translateY(0);
}

.poem-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(231, 231, 231, 0.08);
}

html.day-mode .poem-mobile-menu-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.poem-mobile-menu-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(231, 231, 231, 0.9);
    margin: 0;
    letter-spacing: -0.01em;
}

html.day-mode .poem-mobile-menu-title {
    color: rgba(74, 66, 58, 0.95);
}

.poem-mobile-menu-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: rgba(231, 231, 231, 0.7);
    font-size: 1.75rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    font-weight: 300;
}

html.day-mode .poem-mobile-menu-close {
    color: rgba(74, 66, 58, 0.7);
}

.poem-mobile-menu-close:hover {
    background: rgba(231, 231, 231, 0.08);
    color: rgba(231, 231, 231, 0.95);
}

html.day-mode .poem-mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(74, 66, 58, 0.95);
}

.poem-mobile-menu-close:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-close:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.poem-mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 2rem;
}

.poem-mobile-menu-section {
    margin-bottom: 2rem;
}

.poem-mobile-menu-section:last-child {
    margin-bottom: 0;
}

.poem-mobile-menu-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.poem-mobile-chip {
    font-size: 11px;
    padding: 6px 12px;
}

.poem-mobile-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: rgba(231, 231, 231, 0.05);
    border: 1px solid rgba(224, 214, 202, 0.15);
    border-radius: 12px;
    color: rgba(231, 231, 231, 0.85);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-align: left;
}

html.day-mode .poem-mobile-menu-item {
    background: rgba(247, 243, 236, 0.6);
    border-color: rgba(224, 214, 202, 0.3);
    color: #767068;
}

.poem-mobile-menu-item:hover {
    background: rgba(231, 231, 231, 0.1);
    border-color: rgba(224, 214, 202, 0.25);
    color: rgba(231, 231, 231, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.day-mode .poem-mobile-menu-item:hover {
    background: rgba(247, 243, 236, 0.85);
    border-color: rgba(224, 214, 202, 0.4);
    color: rgba(90, 82, 73, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.poem-mobile-menu-item:active {
    transform: translateY(0);
}

.poem-mobile-menu-item:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-item:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.poem-mobile-menu-item-text {
    width: 100%;
    line-height: 1.4;
}

/* Masquer le menu burger en desktop */
@media (min-width: 769px) {
    .poem-mobile-menu-toggle,
    .poem-mobile-menu {
        display: none !important;
    }
}

/* Media queries - Responsive */
/* ============================================
   Menu burger mobile - Design élégant
   ============================================ */

/* Bouton toggle du menu burger */
.poem-mobile-menu-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(231, 231, 231, 0.08);
    border: 1px solid rgba(224, 214, 202, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.poem-mobile-menu-toggle.is-visible {
    opacity: 0.5;
    transform: translateY(0);
    pointer-events: all;
}

html.day-mode .poem-mobile-menu-toggle {
    background: rgba(247, 243, 236, 0.85);
    border-color: rgba(224, 214, 202, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.poem-mobile-menu-toggle:hover {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(224, 214, 202, 0.35);
    transform: scale(1.05);
}

.poem-mobile-menu-toggle:active {
    transform: scale(0.95);
}

.poem-mobile-menu-toggle:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-toggle:focus-visible {
    outline-color: rgba(90, 82, 73, 0.4);
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 18px;
    position: relative;
}

.menu-toggle-line {
    width: 100%;
    height: 2px;
    background: rgba(231, 231, 231, 0.75);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

html.day-mode .menu-toggle-line {
    background: rgba(90, 82, 73, 0.75);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.poem-mobile-menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.poem-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.3s;
}

.poem-mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s;
}

.poem-mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 14, 17, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.day-mode .poem-mobile-menu-overlay {
    background: rgba(250, 246, 238, 0.85);
}

.poem-mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: rgba(11, 14, 17, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

html.day-mode .poem-mobile-menu-content {
    background: rgba(250, 247, 242, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.poem-mobile-menu.is-open .poem-mobile-menu-content {
    transform: translateY(0);
}

.poem-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(231, 231, 231, 0.08);
}

html.day-mode .poem-mobile-menu-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.poem-mobile-menu-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(231, 231, 231, 0.9);
    margin: 0;
    letter-spacing: -0.01em;
}

html.day-mode .poem-mobile-menu-title {
    color: rgba(74, 66, 58, 0.95);
}

.poem-mobile-menu-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: rgba(231, 231, 231, 0.7);
    font-size: 1.75rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    font-weight: 300;
}

html.day-mode .poem-mobile-menu-close {
    color: rgba(74, 66, 58, 0.7);
}

.poem-mobile-menu-close:hover {
    background: rgba(231, 231, 231, 0.08);
    color: rgba(231, 231, 231, 0.95);
}

html.day-mode .poem-mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(74, 66, 58, 0.95);
}

.poem-mobile-menu-close:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-close:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.poem-mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 2rem;
}

.poem-mobile-menu-section {
    margin-bottom: 2rem;
}

.poem-mobile-menu-section:last-child {
    margin-bottom: 0;
}

.poem-mobile-menu-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.poem-mobile-chip {
    font-size: 11px;
    padding: 6px 12px;
}

.poem-mobile-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: rgba(231, 231, 231, 0.05);
    border: 1px solid rgba(224, 214, 202, 0.15);
    border-radius: 12px;
    color: rgba(231, 231, 231, 0.85);
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-align: left;
}

html.day-mode .poem-mobile-menu-item {
    background: rgba(247, 243, 236, 0.6);
    border-color: rgba(224, 214, 202, 0.3);
    color: #767068;
}

.poem-mobile-menu-item:hover {
    background: rgba(231, 231, 231, 0.1);
    border-color: rgba(224, 214, 202, 0.25);
    color: rgba(231, 231, 231, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.day-mode .poem-mobile-menu-item:hover {
    background: rgba(247, 243, 236, 0.85);
    border-color: rgba(224, 214, 202, 0.4);
    color: rgba(90, 82, 73, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.poem-mobile-menu-item:active {
    transform: translateY(0);
}

.poem-mobile-menu-item:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .poem-mobile-menu-item:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.poem-mobile-menu-item-text {
    width: 100%;
    line-height: 1.4;
}

/* Masquer le menu burger en desktop */
@media (min-width: 769px) {
    .poem-mobile-menu-toggle,
    .poem-mobile-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Scroll fluide sans inertie excessive */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    /* Aucun sticky element pendant la lecture */
    .musevia-home-link {
        position: absolute;
    }

    .poem-container {
        padding: 0 1.5rem;
        max-width: 100%;
        margin-top: 0.5rem;
    }

    /* Afficher le menu burger en mobile */
    .poem-mobile-menu-toggle {
        display: flex;
    }

    /* Titre : légèrement plus grand, plus d'espace avant le premier vers */
    .poem-title {
        font-size: 1.65rem;
        text-align: left;
        margin-bottom: 2.5rem;
        margin-top: 2.75rem;
        line-height: 1.3;
    }

    /* Bloc poème = zone sacrée : interlignage 1.65, marges latérales augmentées */
    .poem-text-section {
        margin: 0;
        padding: 0;
    }

    .poem-body {
        font-size: 0.9rem;
        line-height: 1.65;
        margin: 0;
        padding: 0;
        /* Zone sacrée : pas de rupture visuelle */
    }

    /* Auteur : remonté, traitement éditorial, zone cliquable large */
    .poem-author {
        text-align: left;
        margin-top: 2.5rem;
        margin-bottom: 0;
        font-size: 0.975rem;
        font-variant: small-caps;
        letter-spacing: 0.03em;
        padding: 0.5rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .poem-author a {
        display: block;
        width: 100%;
        padding: 0.25rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Footer : actions moins visibles */
    .poem-footer {
        padding: 0 1.5rem;
        margin-top: 3rem;
    }

    .poem-footer__meta {
        gap: 4px 6px;
        margin-top: 14px;
        margin-bottom: 16px;
    }

    /* Tap zones généreuses (minimum 44px) */
    .poem-footer__action,
    .poem-random,
    .poem-author a {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .poem-container {
        padding: 0 1.25rem;
    }

    .poem-title {
        font-size: 1.9rem;
        margin-bottom: 2rem;
        margin-top: 2.5rem;
    }

    .poem-body {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .poem-author {
        font-size: .95rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .poem-footer {
        padding: 0 1.25rem;
        margin-top: 2.5rem;
    }

    .poem-random {
        width: 100%;
        justify-content: center;
    }

    .poem-footer__actions,
    .poem-footer__explore {
        flex-direction: column;
        gap: 8px;
    }

    .poem-footer__dot {
        display: none;
    }
}

@media (min-width: 40em) {
    .poem-container {
        max-width: 680px;
        padding: 1.75rem 2rem;
    }

    .poem-body {
        font-size: 19px;
    }
}

@media (min-width: 55em) {
    .poem-container {
        max-width: 680px;
        padding: 2rem 2rem;
    }

    .poem-body {
        font-size: 20px;
    }
}

@media (min-width: 75em) {
    .poem-container {
        padding: 2.5rem 3rem;
    }
}

/* Caveat — poème imprimé / PDF navigateur */
@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat/Caveat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat/Caveat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat/Caveat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat/Caveat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Styles d'impression */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-family: 'Caveat', cursive !important;
    }

    /* Site chrome & interactive UI */
    .home2-header,
    .search-overlay,
    .home2-sidebar,
    .home2-sidebar-overlay,
    .musevia-header,
    .musevia-divider,
    .lyreval-breadcrumb,
    .poem-footer,
    .poem-footer__meta,
    .poem-scans-action,
    .poem-mobile-menu-toggle,
    .poem-mobile-menu,
    .poem-show__like-row,
    .poem-like-toggle,
    .poem-playlist-toggle,
    .poem-playlist-picker,
    .verse-save-panel,
    .poem-show__scroll-hint,
    .section-separator,
    .poem-show__reading-refs,
    .poem-show__explore,
    .poem-continuation,
    .scan-viewer-modal,
    .poem-like-container,
    #poem-navigation-data {
        display: none !important;
    }

    /* Poem content only */
    .poem-show,
    .poem-show__reading-zone,
    .lyreval-page-content {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

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

    .poem-show,
    .poem-show__heading,
    .poem-show__text-wrap,
    .poem-title,
    .poem-show__poem-title,
    .poem-author,
    .poem-show__author,
    .poem-show__author a,
    .poem-body {
        font-family: 'Caveat', cursive !important;
    }

    .poem-title,
    .poem-show__poem-title {
        color: black !important;
        font-size: 28pt;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

    .poem-author,
    .poem-show__author {
        color: rgba(0, 0, 0, 0.7) !important;
        font-size: 18pt;
        margin-bottom: 1.5rem;
    }

    .poem-show__author a {
        color: inherit !important;
        text-decoration: none !important;
    }

    .poem-body {
        color: black !important;
        font-size: 16pt;
        line-height: 1.65;
        margin: 0;
        max-width: 100%;
        white-space: pre-wrap;
    }

    .verse-highlight {
        background: transparent !important;
        color: inherit !important;
    }

    .poem-author-signature {
        margin-top: 2rem;
    }

    .poem-author-signature__img {
        max-height: 4rem;
        filter: none !important;
    }
}

/* ============================================
   Visionneuse de scans - Design repensé
   ============================================ */
   
.scan-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scan-viewer-modal[style*="flex"] {
    opacity: 1;
    pointer-events: all;
}

.scan-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 14, 17, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.day-mode .scan-viewer-overlay {
    background: rgba(250, 246, 238, 0.92);
}

.scan-viewer-container {
    position: relative;
    width: 95vw;
    max-width: 1600px;
    height: 95vh;
    max-height: 1000px;
    background: rgba(11, 14, 17, 0.98);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
    transform: scale(0.96);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scan-viewer-modal[style*="flex"] .scan-viewer-container {
    transform: scale(1);
}

html.day-mode .scan-viewer-container {
    background: rgba(250, 247, 242, 0.98);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

/* En-tête minimaliste */
.scan-viewer-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(231, 231, 231, 0.08);
    background: transparent;
    flex-shrink: 0;
}

html.day-mode .scan-viewer-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.scan-viewer-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scan-viewer-title-group {
    flex: 1;
}

.scan-viewer-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: rgba(231, 231, 231, 0.92);
    margin: 0 0 0.3rem 0;
    font-family: 'Crimson Pro', serif;
    letter-spacing: -0.01em;
}

html.day-mode .scan-viewer-title {
    color: rgba(74, 66, 58, 0.95);
}

.scan-viewer-subtitle {
    font-size: 0.875rem;
    color: rgba(231, 231, 231, 0.65);
    margin: 0;
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
}

html.day-mode .scan-viewer-subtitle {
    color: rgba(142, 131, 123, 0.85);
}

.scan-viewer-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: rgba(231, 231, 231, 0.75);
    font-size: 1.75rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    font-weight: 300;
}

html.day-mode .scan-viewer-close {
    color: rgba(74, 66, 58, 0.75);
}

.scan-viewer-close:hover {
    background: rgba(231, 231, 231, 0.08);
    color: rgba(231, 231, 231, 0.95);
    transform: scale(1.05);
}

html.day-mode .scan-viewer-close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(74, 66, 58, 0.95);
}

.scan-viewer-close:active {
    transform: scale(0.95);
}

.scan-viewer-close:focus {
    outline: none;
}

.scan-viewer-close:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .scan-viewer-close:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

/* Zone d'affichage principale */
.scan-viewer-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: rgba(11, 14, 17, 1);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.day-mode .scan-viewer-viewport {
    background: rgba(245, 240, 232, 1);
}

.scan-viewer-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.scan-viewer-image-wrapper:active {
    cursor: grabbing;
}

.scan-viewer-image {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    display: block;
}

/* État de chargement */
.scan-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    z-index: 10;
}

.scan-viewer-spinner {
    width: 44px;
    height: 44px;
    border: 2.5px solid rgba(231, 231, 231, 0.15);
    border-top-color: rgba(231, 231, 231, 0.6);
    border-radius: 50%;
    animation: scan-viewer-spin 0.9s linear infinite;
}

html.day-mode .scan-viewer-spinner {
    border-color: rgba(142, 131, 123, 0.15);
    border-top-color: rgba(142, 131, 123, 0.6);
}

@keyframes scan-viewer-spin {
    to { transform: rotate(360deg); }
}

.scan-viewer-loading-text {
    color: rgba(231, 231, 231, 0.65);
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

html.day-mode .scan-viewer-loading-text {
    color: rgba(142, 131, 123, 0.75);
}

/* État d'erreur */
.scan-viewer-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem;
    text-align: center;
    z-index: 10;
}

.scan-viewer-error-text {
    color: rgba(231, 231, 231, 0.65);
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

html.day-mode .scan-viewer-error-text {
    color: rgba(142, 131, 123, 0.75);
}

.scan-viewer-error-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-family: 'Lora', serif;
    color: rgba(231, 231, 231, 0.9);
    background: rgba(231, 231, 231, 0.08);
    border: 1px solid rgba(231, 231, 231, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-weight: 400;
}

html.day-mode .scan-viewer-error-button {
    color: rgba(74, 66, 58, 0.9);
    background: rgba(74, 66, 58, 0.08);
    border-color: rgba(74, 66, 58, 0.15);
}

.scan-viewer-error-button:hover {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(231, 231, 231, 0.2);
}

html.day-mode .scan-viewer-error-button:hover {
    background: rgba(74, 66, 58, 0.12);
    border-color: rgba(74, 66, 58, 0.2);
}

.scan-viewer-error-button:focus {
    outline: none;
}

.scan-viewer-error-button:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .scan-viewer-error-button:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

/* Contrôles flottants */
.scan-viewer-controls-wrapper {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.scan-viewer-modal:hover .scan-viewer-controls-wrapper,
.scan-viewer-controls-wrapper:focus-within {
    opacity: 1;
    pointer-events: all;
}

/* Navigation entre pages */
.scan-viewer-nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(11, 14, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(231, 231, 231, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html.day-mode .scan-viewer-nav-controls {
    background: rgba(250, 247, 242, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.scan-viewer-nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(231, 231, 231, 0.15);
    background: rgba(231, 231, 231, 0.06);
    color: rgba(231, 231, 231, 0.85);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    font-weight: 300;
    line-height: 1;
}

html.day-mode .scan-viewer-nav-btn {
    border-color: rgba(74, 66, 58, 0.15);
    background: rgba(74, 66, 58, 0.06);
    color: rgba(74, 66, 58, 0.85);
}

.scan-viewer-nav-btn:hover:not(:disabled) {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(231, 231, 231, 0.25);
    color: rgba(231, 231, 231, 1);
    transform: translateY(-1px);
}

html.day-mode .scan-viewer-nav-btn:hover:not(:disabled) {
    background: rgba(74, 66, 58, 0.12);
    border-color: rgba(74, 66, 58, 0.25);
    color: rgba(74, 66, 58, 1);
}

.scan-viewer-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.scan-viewer-nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.scan-viewer-nav-btn:focus {
    outline: none;
}

.scan-viewer-nav-btn:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .scan-viewer-nav-btn:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.scan-viewer-page-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    color: rgba(231, 231, 231, 0.75);
    font-weight: 400;
    min-width: 60px;
    justify-content: center;
}

html.day-mode .scan-viewer-page-indicator {
    color: rgba(74, 66, 58, 0.75);
}

.scan-viewer-page-current {
    font-weight: 500;
    color: rgba(231, 231, 231, 0.9);
}

html.day-mode .scan-viewer-page-current {
    color: rgba(74, 66, 58, 0.9);
}

.scan-viewer-page-separator {
    opacity: 0.5;
}

.scan-viewer-page-total {
    opacity: 0.7;
}

/* Contrôles de zoom */
.scan-viewer-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(11, 14, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.625rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(231, 231, 231, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html.day-mode .scan-viewer-zoom-controls {
    background: rgba(250, 247, 242, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.scan-viewer-zoom-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(231, 231, 231, 0.15);
    background: rgba(231, 231, 231, 0.06);
    color: rgba(231, 231, 231, 0.85);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    font-weight: 300;
    line-height: 1;
}

html.day-mode .scan-viewer-zoom-btn {
    border-color: rgba(74, 66, 58, 0.15);
    background: rgba(74, 66, 58, 0.06);
    color: rgba(74, 66, 58, 0.85);
}

.scan-viewer-zoom-btn:hover {
    background: rgba(231, 231, 231, 0.12);
    border-color: rgba(231, 231, 231, 0.25);
    color: rgba(231, 231, 231, 1);
    transform: translateY(-1px);
}

html.day-mode .scan-viewer-zoom-btn:hover {
    background: rgba(74, 66, 58, 0.12);
    border-color: rgba(74, 66, 58, 0.25);
    color: rgba(74, 66, 58, 1);
}

.scan-viewer-zoom-btn:active {
    transform: translateY(0);
}

.scan-viewer-zoom-btn:focus {
    outline: none;
}

.scan-viewer-zoom-btn:focus-visible {
    outline: 2px solid rgba(231, 231, 231, 0.4);
    outline-offset: 2px;
}

html.day-mode .scan-viewer-zoom-btn:focus-visible {
    outline-color: rgba(74, 66, 58, 0.4);
}

.scan-viewer-zoom-level {
    font-family: 'Lora', serif;
    font-size: 0.8125rem;
    color: rgba(231, 231, 231, 0.7);
    font-weight: 400;
    min-width: 48px;
    text-align: center;
}

html.day-mode .scan-viewer-zoom-level {
    color: rgba(74, 66, 58, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .scan-viewer-container {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .scan-viewer-header {
        padding: 1.25rem 1.5rem;
    }

    .scan-viewer-title {
        font-size: 1rem;
    }

    .scan-viewer-subtitle {
        font-size: 0.8125rem;
    }

    .scan-viewer-controls-wrapper {
        bottom: 1.5rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        width: auto;
    }

    .scan-viewer-nav-controls,
    .scan-viewer-zoom-controls {
        width: 100%;
        justify-content: space-between;
    }

    .scan-viewer-nav-btn {
        width: 48px;
        height: 48px;
        flex: 1;
    }

    .scan-viewer-zoom-btn {
        width: 44px;
        height: 44px;
    }

    .scan-viewer-controls-wrapper {
        opacity: 1;
        pointer-events: all;
    }
}

@media (max-width: 480px) {
    .scan-viewer-header {
        padding: 1rem 1.25rem;
    }

    .scan-viewer-controls-wrapper {
        bottom: 1rem;
        left: 0.75rem;
        right: 0.75rem;
        gap: 0.75rem;
    }

    .scan-viewer-nav-controls,
    .scan-viewer-zoom-controls {
        padding: 0.625rem 0.875rem;
    }
}

/* Animations d'apparition douces */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* État initial : éléments cachés */
.poem-title {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.poem-body {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.poem-author {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

/* Premier séparateur (après l'article) */
.poem-container > .section-separator {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.6s forwards;
}

.poem-footer__meta {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

/* Deuxième séparateur (après les métadonnées) */
.poem-footer .section-separator {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1s forwards;
}

.poem-footer__explore {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1.2s forwards;
}

.poem-footer__divider {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1.3s forwards;
}

.poem-footer__actions {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1.4s forwards;
}

/* Le poem-footer lui-même n'a plus besoin d'animation car ses enfants sont animés */
.poem-footer {
    opacity: 1;
}

/* Respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .scan-viewer-modal,
    .scan-viewer-container,
    .scan-viewer-image,
    .scan-viewer-controls-wrapper,
    .scan-viewer-nav-btn,
    .scan-viewer-zoom-btn,
    .scan-viewer-close {
        transition: none;
    }

    .scan-viewer-spinner {
        animation: none;
    }

    .poem-title,
    .poem-body,
    .poem-author,
    .section-separator,
    .poem-footer__meta,
    .poem-footer__explore,
    .poem-footer__divider,
    .poem-footer__actions,
    .poem-footer {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

