:root {
    --bg: #0d0b12;
    --bg-2: #120f1c;
    --text: #e8e0d5;
    --text-soft: #b8a99a;
    --accent: #c9a96e;
    --accent-soft: #8b6f47;
    --glow-purple: rgba(120, 80, 180, 0.15);
    --glow-gold: rgba(200, 160, 80, 0.08);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.95;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Canvas particles --- */
#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* --- Orbes ambiantes --- */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: orb-drift 18s ease-in-out infinite alternate;
}
.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(100,60,160,0.18) 0%, transparent 70%);
    top: -100px; left: -100px;
    animation-duration: 20s;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(180,120,60,0.12) 0%, transparent 70%);
    bottom: 10%; right: -80px;
    animation-duration: 25s;
    animation-delay: -8s;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(80,120,180,0.1) 0%, transparent 70%);
    top: 50%; left: 40%;
    animation-duration: 30s;
    animation-delay: -15s;
}
@keyframes orb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-20px, 50px) scale(0.95); }
}

/* --- Layout --- */
.wrapper {
    position: relative;
    z-index: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 6rem 2rem 8rem;
}

/* --- Lettre --- */
.letter {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease-out, transform 2s ease-out;
}
.letter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 5rem;
}

.stars-header {
    margin-bottom: 1.5rem;
    letter-spacing: 1rem;
    color: var(--accent);
    opacity: 0.7;
    font-size: 0.75rem;
}
.star { display: inline-block; animation: twinkle 3s ease-in-out infinite alternate; }
.star.small { font-size: 0.5rem; animation-delay: 1.5s; }
@keyframes twinkle {
    0%   { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 1;   transform: scale(1.1); }
}

.letter-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 0.6rem;
    text-shadow: 0 0 40px rgba(200,160,80,0.25);
}

.letter-subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1rem;
    color: var(--accent-soft);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    font-weight: 300;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
    max-width: 200px;
}
.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-soft), transparent);
    opacity: 0.4;
}
.divider-diamond {
    color: var(--accent);
    font-size: 0.6rem;
    opacity: 0.6;
}

/* --- Contenu --- */
.letter-content p {
    font-size: 1.02rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--text-soft);
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}
.letter-content p.revealed {
    opacity: 1;
    transform: translateY(0);
}

.highlight-text {
    font-family: var(--font-heading) !important;
    font-size: 1.4rem !important;
    font-style: italic;
    font-weight: 300 !important;
    text-align: center;
    margin: 3.5rem 0 !important;
    color: var(--text) !important;
    line-height: 1.5;
    text-shadow: 0 0 30px rgba(200,160,80,0.2);
    letter-spacing: 0.02em !important;
}

.section-title-text {
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.35em !important;
    text-transform: uppercase;
    color: var(--accent) !important;
    opacity: 0.6 !important;
    text-align: center;
    margin-bottom: 1.5rem !important;
}

.section-break {
    text-align: center;
    color: var(--accent);
    font-size: 0.6rem;
    opacity: 0.35;
    margin: 3rem 0;
    letter-spacing: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}
.section-break.revealed {
    opacity: 0.35;
    transform: translateY(0);
}

/* --- Footer / Signature --- */
footer {
    margin-top: 5rem;
    text-align: center;
    padding-bottom: 2rem;
}

.signature {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    color: var(--text-soft);
    line-height: 1.9;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.8s ease-out, transform 1.8s ease-out;
}
.signature.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 2px; opacity: 0.3; }

/* --- Responsive --- */
@media (max-width: 600px) {
    .wrapper { padding: 4rem 1.4rem 6rem; }
    header { margin-bottom: 3.5rem; }
    .letter-content p { font-size: 0.97rem; margin-bottom: 1.7rem; }
    .highlight-text { font-size: 1.2rem !important; margin: 2.5rem 0 !important; }
}