/* Bouton flottant */
.floating-heart-btn {
    position: fixed !important;
    bottom: 120px !important;
    left: 30px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%) !important;
    border: 2px solid #ffd700 !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 24px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.4) !important;
    z-index: 998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.floating-heart-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.8) !important;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%) !important;
    color: #000000 !important;
}

.heart-tooltip {
    position: absolute !important;
    top: -45px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #ffd700 !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
    border: 1px solid #ffd700 !important;
    z-index: 999 !important;
}

.floating-heart-btn:hover .heart-tooltip {
    opacity: 1 !important;
}

/* Modal principal */
.heart-wall-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.heart-wall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000000 0%, #1a1a1a 50%, #000000 100%);
}

.heart-wall-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header du modal */
.heart-wall-header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-bottom: 3px solid #ffd700;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 2001;
}

.heart-wall-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.heart-wall-subtitle {
    color: #dc143c;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.close-heart-btn {
    position: absolute;
    top: 20px;
    right: 10px;
    background: transparent;
    border: 2px solid #dc143c;
    color: #dc143c;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-heart-btn:hover {
    background: #dc143c;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Zone d'animation des cœurs */
.hearts-animation-zone {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
}

/* Cœurs flottants avec badge destinataire */
.floating-heart {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.floating-heart:hover {
    z-index: 100;
    transform: scale(1.2);
}

.floating-heart.paused {
    animation-play-state: paused !important;
}

/* Badge destinataire au-dessus du cœur */
.recipient-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000000;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.6);
    border: 2px solid #ffffff;
    margin-bottom: 8px;
    position: relative;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flèche vers le bas sous le badge */
.recipient-badge:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffd700;
}

.heart-shape {
    position: relative;
    width: 90px;
    height: 80px;
    transform: rotate(-45deg);
    animation: floatHeart 3s ease-in-out infinite;
}

.heart-shape:before,
.heart-shape:after {
    content: '';
    width: 45px;
    height: 70px;
    position: absolute;
    left: 45px;
    top: 0;
    background: linear-gradient(135deg, #dc143c, #ff6b6b);
    border-radius: 45px 45px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.4);
}

.heart-shape:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes floatHeart {
    0%, 100% { 
        transform: rotate(-45deg) scale(1);
    }
    50% { 
        transform: rotate(-45deg) scale(1.1);
    }
}

.heart-content-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 70px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    overflow: hidden;
    padding: 2px;
}

.heart-from {
    font-size: 6px;
    opacity: 0.8;
    margin-bottom: 1px;
    color: #ffd700;
}

.heart-to {
    font-size: 10px;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 2px 2px 6px rgba(0,0,0,1);
}

/* Animation de déplacement */
.floating-animation {
    animation: moveAcross 12s linear infinite;
}

@keyframes moveAcross {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px));
        opacity: 0;
    }
}

/* Modal de dédicace */
.dedicace-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(15px);
}

.dedicace-heart-container {
    position: relative;
    width: 400px;
    height: 350px;
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.dedicace-heart-shape {
    position: relative;
    width: 400px;
    height: 350px;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #dc143c, #ff6b6b, #ffd700);
    border-radius: 0 0 200px 0;
    box-shadow: 0 20px 60px rgba(220, 20, 60, 0.6);
}

.dedicace-heart-shape:before,
.dedicace-heart-shape:after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc143c, #ff6b6b, #ffd700);
}

.dedicace-heart-shape:before {
    top: -100px;
    left: 0;
}

.dedicace-heart-shape:after {
    top: -100px;
    right: 0;
}

.dedicace-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 300px;
    height: 250px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    overflow: hidden; /* Supprimer l'ascenseur */
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.dedicace-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dc143c;
    border: 2px solid #ffd700;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dedicace-close-btn:hover {
    background: #ffd700;
    color: #000000;
    transform: rotate(180deg);
}

.dedicace-header h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-weight: bold;
}

.dedicace-meta {
    color: #cccccc;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
}

.dedicace-message {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.4;
    font-style: italic;
    margin: 0;
    padding: 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dedicace-song {
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: bold;
    margin: 0;
    padding: 8px;
    background: rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.dedicace-author {
    color: #888;
    font-size: 0.7rem;
    margin: 0;
    text-align: right;
    opacity: 0.8;
}

/* Messages d'état */
.status-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Version mobile simplifiée */
@media (max-width: 768px) {
    .floating-heart-btn {
        bottom: 120px !important;
        left: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        z-index: 998 !important;
    }
    
    .heart-tooltip {
        top: -40px !important;
        font-size: 11px !important;
        z-index: 999 !important;
    }
    
    .heart-wall-title {
        font-size: 2rem;
    }
    
    /* Modal simplifié pour mobile - format rectangulaire */
    .dedicace-modal {
        padding: 20px;
    }
    
    .dedicace-heart-container {
        width: 90vw;
        max-width: 350px;
        height: auto;
        margin: 20px auto;
    }
    
    .dedicace-heart-shape {
        width: 100%;
        height: 300px;
        transform: none;
        background: linear-gradient(135deg, #dc143c, #ff6b6b, #ffd700);
        border-radius: 20px;
        position: relative;
        box-shadow: 0 20px 40px rgba(220, 20, 60, 0.4);
    }
    
    .dedicace-heart-shape:before,
    .dedicace-heart-shape:after {
        display: none;
    }
    
    .dedicace-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        background: rgba(0, 0, 0, 0.9);
        border-radius: 15px;
        padding: 20px;
        text-align: center;
        backdrop-filter: blur(20px);
        border: 2px solid rgba(255, 215, 0, 0.3);
        overflow: hidden;
        box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.2);
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    
    .dedicace-close-btn {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .dedicace-header h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .dedicace-meta {
        font-size: 0.85rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .dedicace-message {
        font-size: 0.9rem;
        padding: 12px;
        line-height: 1.4;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 10px 0;
    }
    
    .dedicace-song {
        font-size: 0.8rem;
        padding: 8px;
        margin: 10px 0;
    }
    
    .dedicace-author {
        font-size: 0.7rem;
        margin-top: 10px;
    }
    
    /* Cœurs flottants mobile */
    .heart-shape {
        width: 70px;
        height: 60px;
    }
    
    .heart-shape:before,
    .heart-shape:after {
        width: 35px;
        height: 55px;
        left: 35px;
        border-radius: 35px 35px 0 0;
    }
    
    .heart-shape:after {
        left: 0;
    }
    
    .heart-content-preview {
        width: 60px;
        height: 50px;
    }
    
    .heart-from {
        font-size: 7px;
    }
    
    .recipient-badge {
        font-size: 9px;
        padding: 3px 8px;
        max-width: 90px;
        margin-bottom: 6px;
    }
}