@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

html{
    scroll-behavior: smooth;
}

/* 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;
    justify-content: space-between;
    align-items: center;
    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.scrolled{
    background-color: #efe9dc;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 0.6rem 2rem;
    color: #3a2011;
}

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

nav.scrolled .nav-links a:not(.dedi):hover{
    color: #b94e28;
}

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

nav .nav-links{
    display: flex;
}

nav .nav-links a{
    text-decoration: none;
    color: white;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.4rem 0.9rem;
    transition: 0.3s ease;
}

nav .nav-links a:hover{
    color: #f3b85f;
}

nav .nav-links a.dedi{
    color: #f3b85f;
    border: 1px solid #f3b85f;
}

nav .nav-links a.dedi:hover{
    background-color: #f3b85f;
    color: #3a2011;
}

header{
    height: 100vh;
    position: relative;
}

header .header-content{
    height: 70vh;
    background: linear-gradient(180deg, #0c0a09 0%, #150f0a 40%, #3a2011 72%, #7a3c1a 90%, #a85725 100%);
}

/* Calque texte : passe PAR-DESSUS le soleil et la montagne */
header .hero-text{
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    will-change: transform, opacity;
}

header .hero-text h3{
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 4px;
    color: #f3b85f;
    margin: 0 0 1.5rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

header .hero-text h3::before,
header .hero-text h3::after{
    content: '';
    width: 60px;
    height: 2px;
    background-color: #f3b85f;
}

header .hero-text h1{
    font-family: 'Cormorant Garamond', serif;
    font-size: 170px;
    font-weight: 500;
    color: #f6eedb;
    letter-spacing: 10px;
    line-height: 1;
    margin: 0;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
}

header .hero-text p{
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 28px;
    letter-spacing: 2px;
    color: #f6eedb;
    margin: 1.25rem 0 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

header .back-mountain {
    width: 100%;
    height: 30vh;
    background-color: #0a0706;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

header .back-mountain .back-mountain-svg {
    width: 100%;
    height: 150px;
    position:absolute;
    top: -140px;
}

header .back-mountain .back-sun-svg {
    top: -180px;
    position: absolute;
    /* On masque le bas du soleil (la partie derrière la montagne) -> coucher de soleil */
    clip-path: inset(0 0 51% 0);
}

/* INDICATEUR "DESCENDRE" */
header .scroll-down{
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: #f6eedb;
    will-change: opacity;
}

header .scroll-down-label{
    font-size: 0.8rem;
    letter-spacing: 4px;
    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, #ef7a3a 0%, #d2683a 55%, rgba(210, 104, 58, 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;
    letter-spacing: 4px;
    font-size: 15px;
    font-weight: 400;
    color: #b94e28;
}

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: #b94e28;
}

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;
}

/* 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-1 .tome-frame:hover{ box-shadow: 0 55px 90px -30px rgba(0, 0, 0, 0.8); }
.tomes .tome-2 .tome-frame:hover{ box-shadow: 0 55px 90px -30px rgba(0, 0, 0, 0.85); }

.tomes .tome-1 .tome-frame{
    background: #0b2018;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.tomes .tome-2 .tome-frame{
    background: #0a1c2b;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.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: 1;
    transition: opacity 0.5s ease;
}

.tomes .tome-1 .tome-frame::after{ background: rgba(18, 48, 38, 0.55); }
.tomes .tome-2 .tome-frame::after{ background: rgba(13, 36, 54, 0.55); }

.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-1 .tome-number{
    left: -1%;
    color: #e9e2d0;
}

.tomes .tome-2 .tome-number{
    right: -1%;
    color: #e7decb;
}

/* 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;
}

.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 #f3b85f;
    color: #f3b85f;
    text-decoration: none;
    letter-spacing: 2px;
    transition: 0.3s ease;
}

.tomes .btn:hover{
    background-color: #f3b85f;
    color: #123026;
}

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

.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: #b94e28;
    margin: 2rem 0 0.5rem;
}

.author .citation-author{
    letter-spacing: 2px;
    color: #7a7264;
}

/* dédicaces */

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

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

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

.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: #b94e28;
}

.dedications .dedication-date > p span{
    font-family: 'Spectral', serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    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;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b94e28;
    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 #f3b85f;
    border-radius: 0;
    outline: none;
    color: #f6eedb;
    font-family: inherit;
    font-size: 17px;
    letter-spacing: 1px;
}

footer .footer-form input::placeholder{
    color: #7a7264;
    letter-spacing: 1px;
}

footer .footer-form button{
    appearance: none;
    -webkit-appearance: none;
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid #f3b85f;
    border-radius: 0;
    color: #f3b85f;
    font-family: inherit;
    font-size: 17px;
    letter-spacing: 2px;
    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);
}

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;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

footer > div a:hover{ color: #f3b85f; }
footer > div a.dedi{ color: #f3b85f; }

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

footer .footer-bottom p{
    margin: 0;
    letter-spacing: 0.5px;
}

footer .footer-bottom a{
    color: #9a8f80;
    text-decoration: none;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

footer .footer-bottom a:hover{
    color: #f3b85f;
}

/* lien mentions légales */
footer .footer-bottom .legal-link{
    padding: 0.35rem 1rem;
    border: 1px solid #3a332c;
    border-radius: 999px;
    color: #d9cfc2;
    letter-spacing: 1px;
    white-space: nowrap;
}

footer .footer-bottom .legal-link:hover{
    border-color: #f3b85f;
    color: #f3b85f;
}