/* Les polices Google sont chargées via <link rel="stylesheet"> dans base.html.twig
   (en parallèle, avec display=swap) : plus de @import bloquant ici. */

html{
    scroll-behavior: smooth;
}

/* Thème du site : variables surchargées depuis l'admin (page « Apparence »)
   via un <style> injecté dans le <head>. Les valeurs ci-dessous sont les
   défauts d'origine, donc le rendu est identique tant que rien n'est réglé. */
:root{
    --accent: #f3b85f;      /* le doré (boutons, liens, accents) */
    --accent-2: #b94e28;    /* le terracotta (sous-titres, citations) */
    /* Couvertures des tomes : ombre portée + voile teinté (transparence). */
    --cover-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.75);
    --cover-shadow-hover: 0 55px 90px -30px rgba(0, 0, 0, 0.85);
    --cover-veil: 0.55;
}

/* décalage pour que le menu fixe ne recouvre pas la cible d'ancre */
#le-monde, #tome-1, #tome-2, #auteur, #dedicaces{
    scroll-margin-top: 90px;
}

body{
    padding: 0;
    margin: 0;
    font-family: 'Spectral', serif;
}

nav{
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color:white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
nav .logo-link{ margin-right: auto; }
nav .nav-tools{ display: flex; align-items: center; gap: 0.4rem; }
nav .nav-cart{
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.4rem 0.55rem;
    transition: color 0.3s ease;
}
nav .nav-cart:hover{ color: var(--accent); }

nav.scrolled{
    background-color: #e9edf3;
    box-shadow: 0 2px 20px rgba(40, 55, 80, 0.14);
    padding: 0.6rem 2rem;
    color: #2c3038;
}

nav.scrolled .logo,
nav.scrolled .nav-links a:not(.dedi){
    color: #2c3038;
}

nav.scrolled .nav-links a:not(.dedi):hover{
    color: var(--accent-2);
}

nav .logo-link{
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

nav .logo{
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;

}

nav .logo-img{
    height: 30px;
    width: auto;
    display: block;
}
/* Barre claire (opale) : le logo blanc devient sombre pour rester lisible. */
nav.scrolled .logo-img{
    filter: brightness(0) opacity(0.82);
}

nav .nav-links{
    display: flex;
}

nav .nav-links a{
    text-decoration: none;
    color: white;
    font-size: 0.8rem;

    padding: 0.4rem 0.9rem;
    transition: 0.3s ease;
}

nav .nav-links a:hover{
    color: var(--accent);
}

nav .nav-links a.dedi{
    color: var(--accent);
    border: 1px solid var(--accent);
}

nav .nav-links a.dedi:hover{
    background-color: var(--accent);
    color: #3a2011;
}

header{
    position: relative;
    height: 100vh;
    min-height: 520px;
    overflow: hidden;
    background: #050403;
}

/* Video du titre en plein cadre : 100% de largeur, recadree (cover) pour tenir
   dans 100vh. Le haut et le bas sont rognes selon l'ecran, et ca s'adapte. */
header .hero-video{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}

/* Voiles sombres en haut et en bas : le texte en surimpression reste lisible. */
header::before,
header::after{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 34%;
    z-index: 1;
    pointer-events: none;
}
header::before{ top: 0; background: linear-gradient(180deg, rgba(5,4,3,0.72), rgba(5,4,3,0)); }
header::after{ bottom: 0; background: linear-gradient(0deg, rgba(5,4,3,0.82), rgba(5,4,3,0)); }

header .hero-overlay{
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 7rem 1.5rem 3.25rem;
    box-sizing: border-box;
    pointer-events: none;
}

/* Bas du hero : la citation et l'indicateur « Descendre » regroupés. */
header .hero-bottom{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

header .hero-eyebrow{
    font-weight: 400;
    font-size: clamp(14px, 3.4vw, 18px);
    color: var(--accent);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}
header .hero-eyebrow::before,
header .hero-eyebrow::after{
    content: '';
    width: clamp(26px, 8vw, 52px);
    height: 1px;
    background-color: rgba(243, 184, 95, 0.6);
}

header .hero-quote{
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(18px, 4.4vw, 26px);
    line-height: 1.5;
    color: #f0e7d8;
    max-width: 620px;
    margin: 0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}


/* INDICATEUR "DESCENDRE" */
header .scroll-down{
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: #f6eedb;
    pointer-events: auto;
}

header .scroll-down-label{
    font-size: 0.8rem;

    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

header .scroll-down-chevron{
    width: 4px;
    height: 60px;
    /* vif en haut, qui s'estompe en bas -> effet coup de crayon */
    background: linear-gradient(180deg, var(--accent) 0%, #d8a24e 55%, rgba(243, 184, 95, 0) 100%);
    /* effilé jusqu'à une pointe : large en haut, fin en bas */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce{
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50%      { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
    header .scroll-down-chevron{ animation: none; }
}

/* MAIN */
main{
    background-color: #efe9dc;
}

main .univers{
    padding: 4rem 6rem;
}

main .subtitle-section{
    font-family: 'Cormorant Garamond', serif;
    text-transform: uppercase;

    font-size: 15px;
    font-weight: 400;
    color: var(--accent-2);
}

main .title-section{
    font-family: 'Cormorant Garamond', serif;
    font-size: 45px;
    font-weight: 300;
    color: #3a2011;
    margin: 0.5rem 0 2rem;
}

main p{
    font-size: 18px;
    font-weight: 400;
}

main span.light{
    color: #7a7264;
}

main .sommaire{
    margin-top: 3rem;
    border-bottom: 1px solid #cbb99a;
}

main .sommaire .ligne-sommaire{
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0.5rem;
    border-top: 1px solid #cbb99a;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

main .sommaire .ligne-sommaire:hover{
    background-color: rgba(185, 78, 40, 0.06);
    padding-left: 1.5rem;
}

main .sommaire .ligne-sommaire span{
    flex: 0 0 60px;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 42px;
    line-height: 1;
    color: var(--accent-2);
}

main .sommaire .ligne-sommaire h4{
    flex: 0 0 24%;
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: #3a2011;
}

main .sommaire .ligne-sommaire p{
    flex: 1;
    margin: 0;
    font-size: 16px;
    color: #7a7264;
}

/* Section « Le Monde » : fond noir, texte blanc (placée après les livres). */
main .univers{
    background: #0a0908;
    color: #e8dfd2;
    padding: 5.5rem 6rem;
}
main .univers .subtitle-section{ color: #d98a4a; }
main .univers .title-section{ color: #f6eedb; }
main .univers p{ color: #b8ac9b; }
main .univers span.light{ color: #8a8072; }
main .univers .sommaire{ border-bottom-color: #2a2420; }
main .univers .sommaire .ligne-sommaire{ border-top-color: #2a2420; }
main .univers .sommaire .ligne-sommaire:hover{ background-color: rgba(243, 184, 95, 0.06); }
main .univers .sommaire .ligne-sommaire h4{ color: #f6eedb; }
main .univers .sommaire .ligne-sommaire p{ color: #9a8f80; }

/* Lignes de l'univers : image + texte.
   Mobile d'abord (image masquée, dépliée au clic sous le texte), puis
   alternance gauche/droite sur ordinateur avec taille d'image réglable. */
main .univers .ligne-monde{
    padding: 2.5rem 0;
    border-top: 1px solid #2a2420;
}
main .univers .ligne-monde:first-child{ border-top: none; padding-top: 1rem; }
main .univers .ligne-corps h4{
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.9rem;
    color: #f6eedb;
    margin: 0 0 0.8rem;
}
main .univers .ligne-corps p{
    color: #b8ac9b;
    line-height: 1.75;
    font-size: 16px;
    margin: 0;
}
/* Mobile : image toujours visible, empilée sous le texte. */
main .univers .ligne-media{ display: block; margin-top: 1.25rem; }
main .univers .ligne-media img{
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 25px 55px -22px rgba(0, 0, 0, 0.8);
}

@media (max-width: 767px){
    main .univers{ padding: 3.5rem 1.5rem; }
}

/* Ordinateur : image et texte côte à côte, alternance, taille réglable. */
@media (min-width: 768px){
    main .univers .ligne-monde{
        display: flex;
        align-items: center;
        gap: 3rem;
        padding: 2.75rem 0;
    }
    main .univers .ligne-monde.image-droite{ flex-direction: row-reverse; }
    main .univers .ligne-corps{ flex: 1; min-width: 0; }
    main .univers .ligne-media{
        display: block;
        margin-top: 0;
        flex: 0 0 auto;
        width: 40%;
    }
    main .univers .ligne-media.taille-petite{ width: 26%; }
    main .univers .ligne-media.taille-moyenne{ width: 40%; }
    main .univers .ligne-media.taille-grande{ width: 55%; }
}

/* tomes */

.tomes{
    background: linear-gradient(180deg, #123026 0%, #0f2a20 38%, #0d2436 62%, #091a2a 100%);
    color: #efe9dc;
    padding: 5rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.tomes .tome{
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 4rem;
}

/* le contenu passe devant le chiffre en filigrane */
.tomes .tome-text,
.tomes .tome-media{
    position: relative;
    z-index: 1;
}

/* texte 60% / image 40% */
.tomes .tome-text{
    flex: 3;
}

.tomes .tome-media{
    flex: 2;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

/* cadre passe-partout autour de la couverture */
.tomes .tome-frame{
    position: relative;
    padding: 14px;
    border-radius: 2px;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* relief + léger zoom au survol */
.tomes .tome-frame:hover{
    transform: translateY(-10px) scale(1.02);
}

.tomes .tome-frame:hover{ box-shadow: var(--cover-shadow-hover, 0 55px 90px -30px rgba(0, 0, 0, 0.85)); }

.tomes .tome-frame{
    background: var(--tome-bg, #0b2018);
    box-shadow: var(--cover-shadow, 0 40px 80px -40px rgba(0, 0, 0, 0.75));
}

/* un tome sur deux : image à droite, texte à gauche */
.tomes .tome:nth-child(even){ flex-direction: row-reverse; }
/* disposition choisie dans l'admin (prime sur l'alternance automatique) */
.tomes .tome.image-gauche{ flex-direction: row; }
.tomes .tome.image-droite{ flex-direction: row-reverse; }

.tomes .tome-cover{
    display: block;
    width: min(340px, 72vw);
    height: min(510px, 108vw);
    object-fit: cover;
}

/* voile teinté (couleur du fond) qui se dissipe au survol */
.tomes .tome-frame::after{
    content: '';
    position: absolute;
    inset: 14px;
    pointer-events: none;
    opacity: var(--cover-veil, 0.55);
    transition: opacity 0.5s ease;
    background: var(--tome-bg, #123026);
}

.tomes .tome-frame:hover::after{ opacity: 0; }

/* chiffre romain géant en filigrane derrière le contenu */
.tomes .tome-number{
    position: absolute;
    z-index: 0;
    /* centré verticalement (via margin pour ne pas gêner le parallax) */
    top: 50%;
    margin-top: calc(min(80vh, 640px) * -0.35);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: min(80vh, 640px);
    line-height: 0.7;
    opacity: 0.05;
    user-select: none;
    pointer-events: none;
}

.tomes .tome-number{
    color: #e9e2d0;
}

.tomes .tome:nth-child(odd) .tome-number{ left: -1%; }
.tomes .tome:nth-child(even) .tome-number{ right: -1%; }

/* apparition au scroll (activée par le JS) */
.tomes .tome.reveal{
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.tomes .tome.reveal.in-view{
    opacity: 1;
    transform: none;
}

.tomes .title-section{
    color: #e9e2d0;
    font-size: 64px;
}

.tomes .description-tome{
    color: #c6d2c5;
}

/* Contenu riche (WYSIWYG) : paragraphes, titres et listes dans les descriptions. */
.tomes .description-tome p,
main .univers .univers-intro p,
.author .author-bio p{ margin: 0 0 0.9em; }
.tomes .description-tome p:last-child,
main .univers .univers-intro p:last-child,
.author .author-bio p:last-child{ margin-bottom: 0; }
.tomes .description-tome h3,
main .univers .univers-intro h3,
.author .author-bio h3{ font-family: 'Cormorant Garamond', serif; font-weight: 500; margin: 1em 0 0.4em; }
.tomes .description-tome ul,
main .univers .univers-intro ul,
.author .author-bio ul{ margin: 0.6em 0; padding-left: 1.3em; }

.tomes .cta-tome{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.tomes .price-tome{
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 600;
    color: #e9e2d0;
    margin: 0;
}
.tomes .info-tome{ color: #8fa896; font-size: 14px; }

.tomes .btn{
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    text-decoration: none;

    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: 0.3s ease;
}

.tomes .btn:hover{
    background-color: var(--accent);
    color: #123026;
}

.tomes .btn--disabled,
.tomes .btn--disabled:hover{
    border-color: #6f6a5c;
    color: #8a8578;
    background: transparent;
    cursor: not-allowed;
}

.tomes .stock-alert{
    width: 100%;
    margin: 0;
    font-size: 14px;
    color: #e0a94a;
}
.tomes .stock-alert::before{
    content: "● ";
    font-size: 0.7em;
    vertical-align: middle;
}
.tomes .stock-alert--out{ color: #d1795a; }

.author{
    display: flex;
    align-items: center;
    gap: 5rem;
    padding: 5rem 6rem;
    background: #e9edf3;
}

.author.image-droite{ flex-direction: row-reverse; }

.author .author-media{
    flex: 2;
    display: flex;
    justify-content: center;
}

.author .author-photo{
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 25px 50px -18px rgba(58, 32, 17, 0.45);
}

.author .author-text{
    flex: 3;
}

.author .citation{
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 26px;
    line-height: 1.4;
    color: var(--accent-2);
    margin: 2rem 0 0.5rem;
}

.author .citation-author{

    color: #7a7264;
}

/* dédicaces */

.dedications{
    padding: 5rem 6rem;
    background-color: #e2e7ef;
}

.dedications > p{
    max-width: 620px;
    color: #5a4f42;
}

.dedications .dedication-dates{
    margin-top: 3rem;
    border-top: 1px solid #cbb99a;
}

.dedications .dedication-empty{
    padding: 2.5rem 0.5rem;
    color: #8a7a63;
    font-style: italic;
    text-align: center;
}

.dedications .dedication{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 0.5rem;
    border-bottom: 1px solid #cbb99a;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.dedications .dedication:hover{
    background-color: rgba(185, 78, 40, 0.06);
    padding-left: 1.5rem;
}

.dedications .dedication-date{
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* bloc jour + mois */
.dedications .dedication-date > p{
    margin: 0;
    min-width: 70px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 500;
    line-height: 1;
    color: var(--accent-2);
}

.dedications .dedication-date > p span{
    font-family: 'Spectral', serif;
    font-size: 13px;
    font-weight: 400;

    text-transform: uppercase;
    color: #7a7264;
}

/* lieu */
.dedications .dedication-location{
    padding-left: 2rem;
    border-left: 1px solid #cbb99a;
}

.dedications .dedication-location h4{
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: #3a2011;
}

.dedications .dedication-location p{
    margin: 0.2rem 0 0;
    font-size: 15px;
    color: #7a7264;
}

/* étiquette catégorie */
.dedications .dedication-category{
    margin: 0;
    padding: 0.4rem 1.1rem;
    font-size: 12px;

    text-transform: uppercase;
    color: var(--accent-2);
    border: 1px solid #d3a06a;
    border-radius: 999px;
    white-space: nowrap;
}

/* footer */

footer{
    background-color: #0c0a09;
    color: #d9cfc2;
    padding: 5rem 2rem 2.5rem;
    text-align: center;
}

footer .footer-title{
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 500;
    color: #f6eedb;
    margin: 0;
}

footer > p{
    max-width: 480px;
    margin: 1rem auto 2.5rem;
    color: #9a8f80;
    font-size: 16px;
}

footer .footer-form{
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

footer .footer-form input{
    width: 300px;
    max-width: 100%;
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    outline: none;
    color: #f6eedb;
    font-family: inherit;
    font-size: 17px;

}

footer .footer-form input::placeholder{
    color: #7a7264;

}

footer .footer-form button{
    appearance: none;
    -webkit-appearance: none;
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    color: var(--accent);
    font-family: inherit;
    font-size: 17px;

    cursor: pointer;
    transition: color 0.3s ease;
}

footer .footer-form button:hover{
    color: #f6eedb;
}

footer .footer-form button i{
    margin-left: 0.5rem;
    font-size: 0.85em;
    transition: transform 0.3s ease;
}

footer .footer-form button:hover i{
    transform: translateX(4px);
}

/* cible de retour après inscription : décalée vers le haut pour que le titre
   du pied de page reste visible quand le navigateur saute à l'ancre */
.newsletter-ancre{
    display: block;
    position: relative;
    top: -8rem;
    visibility: hidden;
}

/* newsletter : pot de miel anti-robot, hors écran mais pas display:none,
   que les robots ignorent moins facilement */
.newsletter-pot-de-miel{
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* retour d'inscription : élément flex pleine largeur, sous le champ */
footer .newsletter-message{
    flex: 0 0 100%;
    margin: 1.2rem 0 0;
    font-size: 15px;

}

footer .newsletter-message--ok{ color: var(--accent); }
footer .newsletter-message--ko{ color: #e08b6b; }

/* libellé réservé aux lecteurs d'écran */
.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer > div{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2.5rem;
    border-top: 1px solid #241f1a;
}

footer > div a{
    color: #d9cfc2;
    text-decoration: none;
    font-size: 0.85rem;

    transition: color 0.3s ease;
}

footer > div a:hover{ color: var(--accent); }
footer > div a.dedi{ color: var(--accent); }

/* bas de footer : mentions & crédits */
footer .footer-bottom{
    display: flex;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #241f1a;
    gap: 0.6rem 2rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6f665b;
}

footer .footer-bottom p{
    margin: 0;

}

footer .footer-bottom a{
    color: #9a8f80;
    text-decoration: none;

    font-size: 0.8rem;
    transition: color 0.3s ease;
}

footer .footer-bottom a:hover{
    color: var(--accent);
}

/* liens légaux (mentions, CGV, confidentialité) */
footer .footer-legal{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1.4rem;
}

footer .footer-legal a{
    position: relative;
    color: #9a8f80;
    font-size: 0.8rem;
    white-space: nowrap;
}

footer .footer-legal a + a::before{
    content: "·";
    position: absolute;
    left: -0.75rem;
    color: #4a4239;
}

footer .footer-legal a:hover{ color: var(--accent); }

/* ============================================================
   IMMERSION (ambiance + apparitions au scroll)
   ============================================================ */

/* Apparition au scroll : fondu + montée, avec décalage optionnel (--reveal-d).
   Gated par .js : sans JavaScript, rien n'est masqué. */
.js .reveal{
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: calc(var(--reveal-d, 0) * 90ms);
    will-change: opacity, transform;
}
.js .reveal.in-view{ opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){
    .js .reveal{ opacity: 1; transform: none; transition: none; }
}

/* Profondeur des sections claires : parchemin en dégradé + halo chaud en haut
   (écho du coucher de soleil du hero). */
main{
    background:
        radial-gradient(150% 70% at 50% -6%, rgba(168, 87, 37, 0.16) 0%, rgba(168, 87, 37, 0) 52%),
        linear-gradient(180deg, #f2ebdb 0%, #efe9dc 32%, #ece4d2 100%);
}

/* Tomes : vignette cinématographique haut/bas + projecteur derrière les couvertures. */
.tomes{ position: relative; }
.tomes::before,
.tomes::after{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 110px;
    pointer-events: none;
    z-index: 2;
}
.tomes::before{ top: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent); }
.tomes::after{ bottom: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), transparent); }
.tomes .tome-media{ position: relative; }
.tomes .tome-media::before{
    content: '';
    position: absolute;
    inset: -12% -8%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(243, 184, 95, 0.18), transparent 72%);
}

/* Auteur : halo chaud + guillemet décoratif sur la citation. */
.author{ position: relative; overflow: hidden; }
.author::before{
    content: '';
    position: absolute;
    top: -25%;
    right: -8%;
    width: 460px;
    height: 460px;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(243, 184, 95, 0.2), transparent 70%);
}
.author .author-media,
.author .author-text{ position: relative; z-index: 1; }
.author .citation{ position: relative; }
.author .citation::before{
    content: '\201C';
    position: absolute;
    left: -0.55rem;
    top: -1.6rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 92px;
    line-height: 1;
    color: rgba(185, 78, 40, 0.16);
    pointer-events: none;
}

/* Dédicaces : profondeur + halo dans un coin. */
.dedications{
    position: relative;
    background:
        radial-gradient(120% 65% at 82% -5%, rgba(211, 160, 106, 0.28), transparent 55%),
        linear-gradient(180deg, #e9dfca 0%, #e1d5be 100%);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Évite tout défilement horizontal parasite (grands titres, filigranes) */
body{ overflow-x: hidden; }

/* Bouton hamburger (masqué sur grand écran) */
.nav-toggle{
    display: none;
    background: none;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
    color: inherit;
    z-index: 1001;
}
.nav-toggle span{
    display: block;
    width: 26px;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
nav.nav-open .nav-toggle span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2){ opacity: 0; }
nav.nav-open .nav-toggle span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---- Tablette ---- */
@media (max-width: 1024px){
    main .univers,
    .tomes,
    .author,
    .dedications{ padding-left: 3rem; padding-right: 3rem; }

    header .hero-text h1{ font-size: 120px; }
    .tomes .title-section{ font-size: 48px; }
    .tomes .tome{ gap: 2.5rem; }
    .author{ gap: 3rem; }
}

/* ---- Mobile ---- */
@media (max-width: 768px){
    /* Navigation : menu déroulant */
    nav{ padding: 0.9rem 1.25rem; }
    .nav-toggle{ display: block; }

    nav .nav-links{
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(12, 10, 9, 0.97);
        padding: 0 1.25rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
        transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
    }
    nav.nav-open .nav-links{
        max-height: 80vh;
        opacity: 1;
        pointer-events: auto;
        padding: 0.5rem 1.25rem 1.25rem;
    }
    nav .nav-links a{
        color: #f6eedb;
        padding: 0.9rem 0.25rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    /* Déroulant clair quand la barre est en mode « posé » (pages sans hero) */
    nav.scrolled .nav-links{
        background: #f4efe6;
        box-shadow: 0 20px 40px -20px rgba(58, 32, 17, 0.3);
    }
    nav.scrolled .nav-links a:not(.dedi){
        color: #3a2011;
        border-bottom: 1px solid rgba(58, 32, 17, 0.1);
    }
    nav .nav-links a.dedi{
        margin-top: 0.75rem;
        text-align: center;
        border: 1px solid var(--accent);
        border-radius: 2px;
    }
    /* Hero */
    header .hero-text h1{ font-size: 74px; }
    header .hero-text h3{ font-size: 14px; gap: 0.75rem; }
    header .hero-text h3::before,
    header .hero-text h3::after{ width: 30px; }
    header .hero-text p{ font-size: 20px; }

    /* Sections : paddings réduits + titres */
    main .univers,
    .author,
    .dedications{ padding: 3rem 1.5rem; }
    .tomes{ padding: 3rem 1.5rem; gap: 3rem; }
    main .title-section{ font-size: 32px; }
    main p{ font-size: 16px; }

    /* Sommaire : empilé (numéro + titre, puis description) */
    main .sommaire .ligne-sommaire{ flex-wrap: wrap; gap: 0.4rem 1rem; padding: 1.25rem 0.25rem; }
    main .sommaire .ligne-sommaire span{ flex: 0 0 auto; text-align: left; font-size: 30px; }
    main .sommaire .ligne-sommaire h4{ flex: 1; font-size: 20px; }
    main .sommaire .ligne-sommaire p{ flex: 1 0 100%; }
    main .sommaire .ligne-sommaire:hover{ padding-left: 0.25rem; }

    /* Tomes : colonne, filigrane masqué */
    .tomes .tome,
    .tomes .tome:nth-child(even),
    .tomes .tome.image-gauche,
    .tomes .tome.image-droite{ flex-direction: column; gap: 1.5rem; }
    .tomes .tome-media{ padding: 0; }
    .tomes .tome-number{ display: none; }
    .tomes .title-section{ font-size: 34px; }
    .tomes .cta-tome{ gap: 1rem; margin-top: 1.5rem; }
    .tomes .price-tome{ font-size: 28px; }
    .tomes .btn{ margin-top: 1.25rem; }

    /* Auteur : colonne centrée */
    .author{ flex-direction: column; gap: 2rem; text-align: center; }
    .author .author-photo{ max-width: 220px; }
    .author .citation{ font-size: 22px; }

    /* Dédicaces : autorise le retour à la ligne de la catégorie */
    .dedications .dedication{ flex-wrap: wrap; gap: 1rem; padding: 1.25rem 0.25rem; }
    .dedications .dedication:hover{ padding-left: 0.25rem; }
    .dedications .dedication-date{ gap: 1.25rem; }
    .dedications .dedication-location{ padding-left: 1rem; }
    .dedications .dedication-category{ margin-left: auto; }

    /* Footer */
    footer{ padding: 3.5rem 1.5rem 2rem; }
    footer .footer-title{ font-size: 32px; }
    footer > div{ gap: 1rem 1.5rem; }

    /* Newsletter : colonne centrée, champ et bouton exactement de même largeur */
    footer .footer-form{ flex-direction: column; align-items: stretch; gap: 0.9rem; max-width: 260px; margin-left: auto; margin-right: auto; }
    footer .footer-form input,
    footer .footer-form button{ display: block; box-sizing: border-box; width: 100%; text-align: center; }
    footer .footer-form button{ border: 1px solid var(--accent); padding: 0.85rem 1.5rem; }
    footer .footer-form button:hover{ background: var(--accent); color: #123026; }
}

/* ---- Petits écrans ---- */
@media (max-width: 480px){
    header .hero-text h1{ font-size: 54px; }
    header .hero-text p{ font-size: 17px; }
    main .title-section,
    .tomes .title-section{ font-size: 28px; }
    .dedications .dedication-date{ flex-wrap: wrap; }
    footer .footer-title{ font-size: 28px; }
}