/* ============================================================
   YJ SITE — Livres (Mes ouvrages) v3.4.0
   Featured book (floating cover) + bibliography grid
============================================================ */

.yj-livres{
    position:relative;
    width:100%;
    padding:60px 5% 100px;
    box-sizing:border-box;
    font-family:var(--yj-body);
    color:var(--yj-ink);
}
.yj-livres__inner{
    position:relative; z-index:1;
    max-width:1300px;
    margin:0 auto;
}

/* ============ HEADER ============ */
.yj-livres__header{
    text-align:left;
    margin-bottom:70px;
    max-width:760px;
    opacity:0;transform:translateY(20px);
    animation:yjLivresReveal .9s var(--yj-ease-out) .1s forwards;
}
@keyframes yjLivresReveal{ to{opacity:1;transform:translateY(0);} }

.yj-livres__eyebrow{
    display:inline-block;
    font-family:var(--yj-body);
    font-size:12px; font-weight:600;
    letter-spacing:.18em; text-transform:uppercase;
    color:var(--yj-green-deep);
    padding-bottom:6px;
    border-bottom:2px solid var(--yj-terracotta);
    margin-bottom:18px;
}
.yj-livres__heading{
    font-family:var(--yj-display);
    font-size:clamp(40px, 5.5vw, 76px);
    font-weight:900; line-height:1;
    letter-spacing:-.035em;
    color:var(--yj-ink);
    margin:0 0 16px;
}
.yj-livres__heading span{
    color:var(--yj-green-deep);
    position:relative;
    display:inline-block;
}
.yj-livres__heading span::after{
    content:"";
    position:absolute;
    left:0;right:0;
    bottom:-0.15em;
    height:.12em;
    background:var(--yj-terracotta);
    border-radius:2px;
}
.yj-livres__subtitle{
    font-family:var(--yj-display);
    font-size:clamp(18px, 2vw, 24px);
    font-weight:300; line-height:1.4;
    color:var(--yj-muted);
    margin:0;
}

/* ============ FEATURED BOOK ============ */
.yj-livres__featured{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1.4fr);
    gap:80px;
    align-items:center;
    margin-bottom:120px;
}

.yj-livres__featured-cover{
    position:relative;
    margin:0;
    opacity:0;transform:translateY(20px);
    transition:opacity .9s var(--yj-ease-out), transform .9s var(--yj-ease-out);
    transition-delay:.15s;
}
.yj-livres__featured-cover.is-revealed{
    opacity:1; transform:translateY(0);
}

.yj-livres__featured-float{
    position:relative;
    aspect-ratio:2/3;
    max-width:380px;
    margin:0 auto;
    border-radius:6px;
    overflow:visible;
    /* Floating animation */
    animation:yjLivresFloat 8s ease-in-out infinite;
    transition:transform .8s var(--yj-ease);
    cursor:pointer;
}
@keyframes yjLivresFloat{
    0%, 100%{ transform:translateY(0) rotate(-2deg); }
    50%{ transform:translateY(-16px) rotate(-2deg); }
}
.yj-livres__featured-float img{
    display:block;
    width:100%; height:100%;
    object-fit:cover;
    border-radius:6px;
    /* Modern book shadow (multi-layer) */
    box-shadow:
        0 50px 90px -30px rgba(27,94,61,.5),
        0 30px 50px -25px rgba(199,93,58,.2),
        0 18px 30px -18px rgba(0,0,0,.25),
        /* Subtle inner spine effect */
        inset 4px 0 8px -4px rgba(0,0,0,.15);
    transition:transform 1s var(--yj-ease), box-shadow 1s var(--yj-ease), filter 1s var(--yj-ease);
    filter:saturate(1.05) contrast(1.04);
}
.yj-livres__featured-float:hover{
    animation-play-state:paused;
    transform:translateY(-8px) rotate(0) scale(1.04);
}
.yj-livres__featured-float:hover img{
    box-shadow:
        0 70px 110px -30px rgba(27,94,61,.6),
        0 40px 60px -25px rgba(199,93,58,.28),
        0 25px 40px -18px rgba(0,0,0,.3),
        inset 4px 0 8px -4px rgba(0,0,0,.15);
}

.yj-livres__featured-badge{
    position:absolute;
    bottom:-16px; right:-14px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:11px 16px;
    background:var(--yj-terracotta);
    color:#fff;
    border-radius:4px;
    font-family:var(--yj-body);
    font-size:11px; font-weight:600;
    letter-spacing:.08em;
    text-transform:uppercase;
    box-shadow:0 20px 40px -15px rgba(199,93,58,.55);
    z-index:2;
    transform:rotate(2deg);
    transition:transform .4s var(--yj-ease), box-shadow .4s var(--yj-ease);
}
.yj-livres__featured-badge-dot{
    width:7px; height:7px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 0 0 4px rgba(255,255,255,.25);
    animation:yjLivresPulse 2.4s ease-in-out infinite;
}
@keyframes yjLivresPulse{
    0%,100%{box-shadow:0 0 0 4px rgba(255,255,255,.25);}
    50%{box-shadow:0 0 0 9px rgba(255,255,255,.08);}
}
.yj-livres__featured-cover:hover .yj-livres__featured-badge{
    transform:rotate(0) scale(1.05);
    box-shadow:0 28px 50px -15px rgba(199,93,58,.7);
}

/* Featured text */
.yj-livres__featured-body{
    opacity:0;transform:translateY(20px);
    transition:opacity .9s var(--yj-ease-out), transform .9s var(--yj-ease-out);
    transition-delay:.3s;
}
.yj-livres__featured-body.is-revealed{
    opacity:1; transform:translateY(0);
}
.yj-livres__featured-meta{
    font-family:var(--yj-body);
    font-size:12px; font-weight:600;
    letter-spacing:.18em; text-transform:uppercase;
    color:var(--yj-terracotta);
    margin-bottom:14px;
}
.yj-livres__featured-title{
    font-family:var(--yj-display);
    font-size:clamp(30px, 4vw, 50px);
    font-weight:900;
    line-height:1.05;
    letter-spacing:-.03em;
    color:var(--yj-ink);
    margin:0 0 28px;
}
.yj-livres__featured-title span{
    color:var(--yj-green-deep);
    position:relative;
    display:inline-block;
    font-style:italic;
}
.yj-livres__featured-title span::after{
    content:"";
    position:absolute;
    left:0;right:0;
    bottom:-0.1em;
    height:.08em;
    background:var(--yj-terracotta);
    border-radius:2px;
}

.yj-livres__featured-quote{
    position:relative;
    padding:0 0 0 24px;
    border-left:3px solid var(--yj-terracotta);
    margin-bottom:32px;
}
.yj-livres__featured-quote p{
    font-family:var(--yj-body);
    font-size:14.5px;
    line-height:1.75;
    color:var(--yj-ink);
    margin:0 0 16px;
}
.yj-livres__featured-quote p:last-child{ margin-bottom:0; }
.yj-livres__featured-quote p:first-child::first-letter{
    font-family:var(--yj-display);
    font-size:36px;
    font-weight:900;
    line-height:1;
    color:var(--yj-green-deep);
    margin-right:2px;
}

/* CTA Denoël */
.yj-livres__featured-cta{
    display:inline-flex;
    align-items:center;
    gap:12px;
    padding:14px 22px;
    background:var(--yj-green-deep);
    color:#fff;
    text-decoration:none;
    border-radius:4px;
    font-family:var(--yj-body);
    font-size:13.5px;
    font-weight:600;
    letter-spacing:.005em;
    box-shadow:0 18px 36px -14px rgba(27,94,61,.45);
    transition:all .4s var(--yj-ease);
    position:relative;
    overflow:hidden;
}
.yj-livres__featured-cta::before{
    content:"";
    position:absolute;
    inset:0;
    background:var(--yj-terracotta);
    transform:translateY(100%);
    transition:transform .45s var(--yj-ease-out);
    z-index:0;
}
.yj-livres__featured-cta > *{ position:relative; z-index:1; }
.yj-livres__featured-cta:hover{
    transform:translateY(-3px);
    color:#fff;
    box-shadow:0 26px 50px -16px rgba(199,93,58,.55);
}
.yj-livres__featured-cta:hover::before{ transform:translateY(0); }
.yj-livres__featured-cta svg{
    width:14px; height:14px;
    transition:transform .35s var(--yj-ease);
}
.yj-livres__featured-cta:hover svg{ transform:translate(3px, -3px); }

/* ============ SHELF (older books) ============ */
.yj-livres__shelf-wrap{
    position:relative;
}
.yj-livres__shelf-label{
    display:inline-block;
    font-family:var(--yj-body);
    font-size:11px; font-weight:600;
    letter-spacing:.2em;
    text-transform:uppercase;
    color:var(--yj-green-deep);
    padding-bottom:6px;
    border-bottom:2px solid var(--yj-terracotta);
    margin-bottom:18px;
}
.yj-livres__shelf-title{
    font-family:var(--yj-display);
    font-size:clamp(28px, 3.6vw, 42px);
    font-weight:900;
    letter-spacing:-.025em;
    color:var(--yj-ink);
    margin:0 0 36px;
    line-height:1.15;
}
.yj-livres__shelf{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:30px;
}

/* Individual book card */
.yj-livres__book{
    display:flex;
    flex-direction:column;
    background:rgba(255,255,255,.7);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border:1px solid var(--yj-line);
    border-radius:8px;
    overflow:hidden;
    text-decoration:none;
    color:inherit;
    box-shadow:
        0 18px 36px -22px rgba(27,94,61,.25),
        0 8px 16px -12px rgba(0,0,0,.08);
    transition:all .45s var(--yj-ease);
    opacity:0;transform:translateY(20px);
    position:relative;
}
.yj-livres__book.is-revealed{ opacity:1; transform:translateY(0); }
.yj-livres__book:hover{
    transform:translateY(-8px);
    border-color:var(--yj-green-deep);
    background:#fff;
    box-shadow:
        0 35px 60px -25px rgba(27,94,61,.4),
        0 18px 30px -15px rgba(0,0,0,.15);
}

/* Book cover container */
.yj-livres__book-cover{
    position:relative;
    width:100%;
    aspect-ratio:3/4;
    overflow:hidden;
    background:linear-gradient(135deg, #E8F0E5, #D5E5D0);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px 30px;
}
.yj-livres__book-cover::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(135deg, transparent 60%, rgba(199,93,58,.15));
    opacity:0;
    transition:opacity .5s var(--yj-ease);
    pointer-events:none;
}
.yj-livres__book:hover .yj-livres__book-cover::after{ opacity:1; }
.yj-livres__book-cover img{
    display:block;
    max-width:100%;
    max-height:100%;
    width:auto; height:auto;
    object-fit:contain;
    box-shadow:
        0 30px 50px -20px rgba(0,0,0,.4),
        0 18px 30px -15px rgba(27,94,61,.3),
        inset 4px 0 8px -4px rgba(0,0,0,.15);
    transition:transform 1s var(--yj-ease), box-shadow .8s var(--yj-ease);
    transform:rotate(-1.5deg);
    filter:saturate(1.05) contrast(1.04);
}
.yj-livres__book:hover .yj-livres__book-cover img{
    transform:rotate(0) scale(1.05) translateY(-4px);
    box-shadow:
        0 40px 60px -20px rgba(0,0,0,.5),
        0 24px 40px -15px rgba(27,94,61,.4),
        inset 4px 0 8px -4px rgba(0,0,0,.15);
}

/* Book body (text) */
.yj-livres__book-body{
    flex:1;
    display:flex;
    flex-direction:column;
    padding:24px 22px 22px;
    gap:8px;
}
.yj-livres__book-year{
    font-family:var(--yj-display);
    font-size:14px;
    font-weight:900;
    letter-spacing:.05em;
    color:var(--yj-terracotta);
    transition:transform .4s var(--yj-ease);
}
.yj-livres__book:hover .yj-livres__book-year{ transform:translateX(3px); }

.yj-livres__book-title{
    font-family:var(--yj-display);
    font-size:19px;
    font-weight:900;
    line-height:1.2;
    letter-spacing:-.015em;
    color:var(--yj-ink);
    margin:0;
    transition:color .35s var(--yj-ease);
}
.yj-livres__book:hover .yj-livres__book-title{ color:var(--yj-green-deep); }

.yj-livres__book-sub{
    font-family:var(--yj-body);
    font-size:13px;
    line-height:1.5;
    color:var(--yj-muted);
    margin:0;
    flex:1;
}

.yj-livres__book-editor{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--yj-line);
    font-family:var(--yj-body);
    font-size:12px;
    font-weight:600;
    color:var(--yj-green-deep);
    letter-spacing:.005em;
    transition:color .35s var(--yj-ease), border-color .35s var(--yj-ease);
}
.yj-livres__book:hover .yj-livres__book-editor{
    color:var(--yj-terracotta);
    border-color:rgba(199,93,58,.3);
}
.yj-livres__book-editor svg{
    width:13px; height:13px;
    transition:transform .35s var(--yj-ease);
}
.yj-livres__book:hover .yj-livres__book-editor svg{
    transform:translate(3px, -3px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px){
    .yj-livres__featured{
        grid-template-columns:1fr;
        gap:50px;
    }
    .yj-livres__featured-float{ max-width:300px; }
}
@media (max-width: 720px){
    .yj-livres{ padding:40px 6% 80px; }
    .yj-livres__header{ margin-bottom:50px; }
    .yj-livres__featured{ margin-bottom:80px; }
    .yj-livres__featured-float{ max-width:240px; }
    .yj-livres__featured-quote{ padding-left:18px; }
    .yj-livres__featured-quote p{ font-size:14px; }
    .yj-livres__shelf{ gap:24px; }
    .yj-livres__book-body{ padding:20px 18px 18px; }
}
@media (max-width: 480px){
    .yj-livres__heading{ font-size:42px; }
    .yj-livres__featured-cta{ width:100%; justify-content:center; box-sizing:border-box; }
}
