/* --- Variables & Reset --- */
:root {
    --bg-color: #FBF9F6; /* Crème doux */
    --text-color: #2C2C2B; /* Anthracite très doux */
    --accent-color: #8C7A6B; /* Beige taupe pour les détails */
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Permet le défilement fluide dès le début */
    padding: 5rem 1.5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.wrapper {
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

.letter {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

/* Déclenchement au chargement via JS */
.letter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Entête --- */
header {
    text-align: center;
    margin-bottom: 4rem;
}

.letter-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.divider {
    width: 35px;
    height: 1px;
    background-color: var(--accent-color);
    margin: 0 auto;
    opacity: 0.4;
}

/* --- Corps du texte --- */
.letter-content p {
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: justify;
    color: #353535;
    
    /* Animation progressive */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* Style plus élégant / mis en valeur pour les questions clés */
.letter-content p.highlight-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-style: italic;
    text-align: center;
    margin: 3rem 0;
    color: var(--text-color);
    line-height: 1.5;
}

/* Rapproche le fondu des paragraphes au fur et à mesure que l'utilisateur descend (géré par JS) */
.letter-content p.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Signature --- */
footer {
    margin-top: 5rem;
    text-align: right;
    padding-bottom: 2rem;
}

.signature {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.signature.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    body {
        padding: 3rem 1.2rem;
    }
    
    header {
        margin-bottom: 3rem;
    }

    .letter-content p {
        text-align: left; /* Plus naturel et lisible sur smartphone */
        font-size: 1rem;
        margin-bottom: 1.6rem;
    }
    
    .letter-content p.highlight-text {
        font-size: 1.2rem;
        margin: 2rem 0;
    }
}