/* Variables et Reset */
:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #ff8fab;
    --light-pink: #ffc2d1;
    --deep-rose: #c9184a;
    --gold: #ffd700;
    --soft-white: #fff5f7;
    --gradient-love: linear-gradient(135deg, #ff6b9d 0%, #c9184a 50%, #ff8fab 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Playfair Display', Georgia, serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--soft-white);
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">💕</text></svg>'), auto;
}

/* ============================================
   ÉCRAN D'ACCUEIL
   ============================================ */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-hearts {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.welcome-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--light-pink);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

.welcome-text {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.welcome-button {
    background: var(--gradient-love);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.5rem;
    font-family: 'Dancing Script', cursive;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.welcome-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.7);
}

.welcome-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.welcome-hint {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--secondary-pink);
    opacity: 0.8;
}

/* Mobile welcome */
@media (max-width: 480px) {
    .welcome-hearts {
        font-size: 3rem;
    }
    .welcome-title {
        font-size: 1.8rem;
    }
    .welcome-text {
        font-size: 2.5rem;
    }
    .welcome-button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
    .welcome-hint {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

/* Container des cœurs flottants */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 4s ease-out forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-400px) rotate(360deg) scale(0.5);
    }
}

/* Sparkles */
.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkle 1.5s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    text-align: center;
    padding: 3rem 0;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    background: var(--gradient-love);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
}

.heart-icon {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    -webkit-text-fill-color: initial;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.5));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(255, 107, 157, 0.8));
    }
}

/* Love Letter */
.love-letter {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    margin: 2rem 0;
    border: 2px solid rgba(255, 107, 157, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 0 60px rgba(255, 107, 157, 0.1);
    position: relative;
    overflow: hidden;
}

.love-letter::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.letter-content {
    position: relative;
    z-index: 1;
}

.salutation {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--primary-pink);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.paragraph {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 1.5rem;
    text-align: justify;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.paragraph.visible {
    opacity: 1;
    transform: translateY(0);
}

.paragraph.highlight {
    font-size: 1.4rem;
    color: var(--light-pink);
    font-style: italic;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 107, 157, 0.15);
    border-radius: 15px;
    border-left: 4px solid var(--primary-pink);
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    text-align: right;
    margin-top: 2rem;
    color: var(--secondary-pink);
}

.heart-signature {
    display: inline-block;
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interactive Section */
.interactive-section {
    text-align: center;
    padding: 3rem 0;
}

.love-button {
    background: var(--gradient-love);
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    font-family: 'Dancing Script', cursive;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
}

.love-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.6);
}

.love-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.love-button:hover::before {
    left: 100%;
}

.button-hearts {
    margin-left: 0.5rem;
    display: inline-block;
    animation: heartbeat 1s ease-in-out infinite;
}

.surprise-message {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease-out, opacity 0.5s ease;
    opacity: 0;
}

.surprise-message.show {
    max-height: 300px;
    opacity: 1;
}

.surprise-content {
    padding: 2rem;
    margin-top: 2rem;
    background: rgba(255, 107, 157, 0.2);
    border-radius: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.surprise-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.infinite-love {
    font-size: 1.8rem;
    font-family: 'Dancing Script', cursive;
    color: var(--light-pink);
    margin-top: 1rem;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 157, 0.6);
    }
}

/* Hearts Counter */
.hearts-counter {
    text-align: center;
    padding: 2rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
}

.counter {
    font-size: 1.5rem;
    color: var(--primary-pink);
    margin-top: 0.5rem;
}

/* Reasons Section */
.reasons-section {
    padding: 3rem 0;
}

.reasons-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-pink);
    margin-bottom: 2rem;
}

.reasons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.reason-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 107, 157, 0.2);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(50px);
}

.reason-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.reason-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 107, 157, 0.15);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.3);
}

.reason-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.reason-card:nth-child(2) .reason-emoji { animation-delay: 0.2s; }
.reason-card:nth-child(3) .reason-emoji { animation-delay: 0.4s; }
.reason-card:nth-child(4) .reason-emoji { animation-delay: 0.6s; }
.reason-card:nth-child(5) .reason-emoji { animation-delay: 0.8s; }
.reason-card:nth-child(6) .reason-emoji { animation-delay: 1s; }

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

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 2rem;
}

.floating-hearts {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.floating-hearts span {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.floating-hearts span:nth-child(1) { animation-delay: 0s; }
.floating-hearts span:nth-child(2) { animation-delay: 0.3s; }
.floating-hearts span:nth-child(3) { animation-delay: 0.6s; }
.floating-hearts span:nth-child(4) { animation-delay: 0.9s; }
.floating-hearts span:nth-child(5) { animation-delay: 1.2s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.footer-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: var(--light-pink);
}

.date-counter {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--secondary-pink);
}

/* Music Control */
.music-control {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-love);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.5);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.music-btn:hover {
    transform: scale(1.1);
}

.music-btn.playing {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive - Tablettes */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 2rem 0;
    }
    
    .title {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .heart-icon {
        display: block;
        margin: 0.5rem 0;
    }
    
    .love-letter {
        padding: 1.5rem;
        border-radius: 20px;
        margin: 1rem 0;
    }
    
    .salutation {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .paragraph {
        font-size: 1rem;
        line-height: 1.8;
        text-align: left;
    }
    
    .paragraph.highlight {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .signature {
        font-size: 1.4rem;
        text-align: center;
    }
    
    .interactive-section {
        padding: 2rem 0;
    }
    
    .love-button {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        width: 90%;
        max-width: 300px;
    }
    
    .surprise-content {
        padding: 1.5rem;
    }
    
    .surprise-content h2 {
        font-size: 1.8rem;
    }
    
    .infinite-love {
        font-size: 1.4rem;
    }
    
    .hearts-counter {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
    
    .counter {
        font-size: 1.3rem;
    }
    
    .reasons-section {
        padding: 2rem 0;
    }
    
    .reasons-title {
        font-size: 2rem;
    }
    
    .reasons-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .reason-card {
        padding: 1.5rem;
    }
    
    .reason-emoji {
        font-size: 2.5rem;
    }
    
    .footer {
        padding: 2rem 0;
    }
    
    .floating-hearts {
        font-size: 1.5rem;
    }
    
    .footer-text {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    
    .music-control {
        bottom: 1rem;
        right: 1rem;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Responsive - Petits mobiles */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .title {
        font-size: 1.7rem;
        padding: 0 0.5rem;
    }
    
    .heart-icon {
        font-size: 1.2rem;
    }
    
    .love-letter {
        padding: 1.2rem;
        border-radius: 15px;
        margin: 0.75rem 0;
    }
    
    .salutation {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .paragraph {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }
    
    .paragraph.highlight {
        font-size: 1rem;
        padding: 0.8rem;
        border-left-width: 3px;
    }
    
    .signature {
        font-size: 1.2rem;
    }
    
    .interactive-section {
        padding: 1.5rem 0;
    }
    
    .love-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 95%;
    }
    
    .surprise-content {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .surprise-content h2 {
        font-size: 1.5rem;
    }
    
    .surprise-content p {
        font-size: 0.95rem;
    }
    
    .infinite-love {
        font-size: 1.2rem;
    }
    
    .hearts-counter {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .hearts-counter p:first-child {
        font-size: 0.9rem;
    }
    
    .counter {
        font-size: 1.2rem;
    }
    
    .reasons-section {
        padding: 1.5rem 0;
    }
    
    .reasons-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .reasons-container {
        gap: 0.8rem;
    }
    
    .reason-card {
        padding: 1.2rem;
        border-radius: 15px;
    }
    
    .reason-card p {
        font-size: 0.95rem;
    }
    
    .reason-emoji {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .footer {
        padding: 1.5rem 0;
        margin-top: 1rem;
    }
    
    .floating-hearts {
        font-size: 1.3rem;
    }
    
    .footer-text {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .date-counter {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .music-control {
        bottom: 0.75rem;
        right: 0.75rem;
    }
    
    .music-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    /* Ajustements animations pour mobile */
    .floating-heart {
        font-size: 1.5rem;
    }
    
    @keyframes floatUp {
        0% {
            opacity: 1;
            transform: translateY(0) rotate(0deg) scale(1);
        }
        100% {
            opacity: 0;
            transform: translateY(-250px) rotate(360deg) scale(0.5);
        }
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .title {
        font-size: 1.4rem;
    }
    
    .salutation {
        font-size: 1.3rem;
    }
    
    .paragraph {
        font-size: 0.9rem;
    }
    
    .love-button {
        font-size: 0.95rem;
        padding: 0.9rem 1.2rem;
    }
    
    .reasons-title {
        font-size: 1.4rem;
    }
}

/* Support tactile - désactiver hover sur mobile */
@media (hover: none) and (pointer: coarse) {
    .love-button:hover {
        transform: none;
        box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
    }
    
    .love-button:active {
        transform: scale(0.95);
    }
    
    .reason-card:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: none;
    }
    
    .reason-card:active {
        transform: scale(0.98);
        background: rgba(255, 107, 157, 0.15);
    }
    
    .music-btn:hover {
        transform: none;
    }
    
    .music-btn:active {
        transform: scale(0.9);
    }
    
    /* Désactiver le curseur personnalisé sur mobile */
    body {
        cursor: auto;
    }
    
    body:active {
        cursor: auto;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 1rem 0;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .heart-icon {
        display: inline-block;
        margin: 0;
    }
    
    .love-letter {
        padding: 1rem;
    }
    
    .salutation {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .paragraph {
        margin-bottom: 0.8rem;
    }
    
    .reasons-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .music-control {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .music-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Safe area pour les téléphones avec encoche */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .music-control {
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Curseur personnalisé au clic - Desktop uniquement */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">💕</text></svg>'), auto;
    }
    
    body:active {
        cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">❤️</text></svg>'), auto;
    }
}

/* Selection style */
::selection {
    background: var(--primary-pink);
    color: white;
}

/* Amélioration performances mobile */
@media (max-width: 768px) {
    .love-letter::before {
        animation: none;
        opacity: 0.5;
    }
    
    .sparkle {
        animation-duration: 1s;
    }
}
