@font-face {
    font-family: 'Playfair Display';
    src: url('footages/PlayfairDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('footages/PlayfairDisplay-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('footages/PlayfairDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --color-blue: #2b3044;
    --color-orange: #C46235;
    --color-beige: #F4E1C1;
    --color-grey: #4A4543;
    --color-light: #FDFBF7;
    
    --bg-color: var(--color-blue);
    --text-color: var(--color-beige);
    --accent-color: var(--color-orange);
    --mouse-x: 50%;
    --mouse-y: 50%;
    --sink-scale: 1;
    --sink-radius: 0px;
    --mattress-shadow: inset 0px 0px 0px rgba(0,0,0,0);
}

.theme-light {
    --bg-color: var(--color-light);
    --text-color: var(--color-blue);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Playfair Display', serif;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 8s ease-in-out, color 8s ease-in-out;
}

.mattress-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center center;
    transform: scale(var(--sink-scale));
    border-radius: var(--sink-radius);
    box-shadow: var(--mattress-shadow);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.8s ease, border-radius 0.8s ease, background-color 8s ease-in-out;
    background-color: var(--bg-color);
}

.background-breath {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.15) 100%);
    animation: breath 15s infinite alternate ease-in-out;
    z-index: 1;
    pointer-events: none;
}

@keyframes breath {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 0.3; }
}

.content-wrapper {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    animation: poeticEntrance 4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes poeticEntrance {
    0% { opacity: 0; filter: blur(15px); transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; filter: blur(0px); transform: translateY(0) scale(1); }
}

@keyframes gentleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    transition: opacity 1s ease;
}

.brand-name {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    font-weight: 700;
    animation: elegantFade 6s infinite alternate;
}

@keyframes elegantFade {
    0% { opacity: 0.7; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-2px); }
}

.main-title {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: textDream 10s infinite alternate ease-in-out;
}

@keyframes textDream {
    0% { text-shadow: 0 0 0px rgba(244, 225, 193, 0); }
    100% { text-shadow: 0 0 20px rgba(244, 225, 193, 0.5); }
}

.theme-light .main-title {
    animation: textDreamLight 10s infinite alternate ease-in-out;
}

@keyframes textDreamLight {
    0% { text-shadow: 0 0 0px rgba(43, 48, 68, 0); }
    100% { text-shadow: 0 0 20px rgba(43, 48, 68, 0.4); }
}

.subtitle {
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.8;
}

.address {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.7;
    margin-top: 1rem;
}

.instagram-link {
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.instagram-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.instagram-icon {
    width: 32px;
    height: 32px;
}

/* Dent Effect (Local Deformation) */
.dent {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    box-shadow: inset 0px 0px 100px rgba(0,0,0,0.4), 0 0 30px rgba(0,0,0,0.1);
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: all 0.8s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.theme-light .dent {
    box-shadow: inset 0px 0px 100px rgba(43,48,68,0.2), 0 0 30px rgba(43,48,68,0.05);
    background: radial-gradient(circle, rgba(43,48,68,0.03) 0%, transparent 70%);
}

.dent.active {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 1;
}

/* Zzz Container */
.zzz-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.zzz {
    position: absolute;
    color: var(--text-color);
    opacity: 0;
    font-family: sans-serif;
    animation: floatZzz 6s linear forwards;
}

@keyframes floatZzz {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { opacity: 0.15; }
    80% { opacity: 0.15; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* Dream Words */
.dream-words-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.dream-word {
    position: absolute;
    font-size: 2rem;
    font-style: italic;
    color: var(--text-color);
    opacity: 0;
    filter: blur(2px);
    animation: dreamFade 8s ease-in-out forwards;
}

@keyframes dreamFade {
    0% { opacity: 0; filter: blur(10px); transform: scale(0.9); }
    50% { opacity: 0.08; filter: blur(2px); transform: scale(1); }
    100% { opacity: 0; filter: blur(10px); transform: scale(1.1); }
}

/* Joke Popup */
.joke-popup {
    position: absolute;
    bottom: 40px;
    right: -300px;
    background-color: var(--color-grey);
    color: var(--color-beige);
    padding: 1rem 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 30;
    transition: right 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    cursor: pointer;
}

.joke-popup.visible {
    right: 40px;
}

/* Night Sequence */
.night-sequence {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #161A28 0%, #2b3044 100%);
    z-index: 1; /* Derrière le contenu mais au-dessus du fond de base */
    opacity: 0;
    pointer-events: none;
    transition: opacity 8s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.night-sequence.active {
    opacity: 1;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 80px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 150px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 250px 90px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 300px 200px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 400px 50px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 500px 300px, #ffffff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 600px 400px;
    opacity: 0.4;
    animation: twinkle 12s infinite alternate;
}

.stars-layer-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 120px 80px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 280px 170px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 450px 250px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 390px, #ffffff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 500px 500px;
    opacity: 0.2;
    animation: twinkle 8s infinite alternate-reverse;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

.shooting-star {
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    animation: shooting 4s linear infinite;
    opacity: 0;
    transform: rotate(-45deg);
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
}

.night-sequence.active .shooting-star {
    animation: shooting 4s linear infinite;
}

@keyframes shooting {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 1; }
    15% { transform: translateX(-400px) translateY(400px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

.moon {
    position: absolute;
    top: 15%;
    right: 20%;
    filter: drop-shadow(0 0 35px rgba(244, 225, 193, 0.6));
    opacity: 0;
}

.night-sequence.active .moon {
    animation: moonRise 20s ease-out forwards;
}

@keyframes moonRise {
    0% { transform: translateY(120px); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-30px); opacity: 1; }
}

.luxury-clouds {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60%;
}

.luxury-cloud {
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(43,48,68,0.9) 0%, rgba(43,48,68,0) 70%);
    border-radius: 50%;
    filter: blur(30px);
}

.cloud-1 {
    width: 800px;
    height: 400px;
    bottom: -150px;
    left: -200px;
    animation: drift 35s infinite alternate ease-in-out;
}

.cloud-2 {
    width: 1000px;
    height: 500px;
    bottom: -200px;
    right: -300px;
    animation: drift 40s infinite alternate-reverse ease-in-out;
}

.cloud-3 {
    width: 600px;
    height: 300px;
    bottom: -50px;
    left: 20%;
    animation: drift 25s infinite alternate ease-in-out;
}

.cloud-4 {
    width: 1200px;
    height: 600px;
    bottom: -250px;
    left: -100px;
    animation: drift 45s infinite alternate ease-in-out;
    opacity: 0.8;
}

.cloud-5 {
    width: 900px;
    height: 400px;
    bottom: -100px;
    right: -100px;
    animation: drift 30s infinite alternate-reverse ease-in-out;
    opacity: 0.6;
}

@keyframes drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(80px); }
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }
    .logo {
        width: 140px;
    }
}
