.desire-meter-wrapper {
    width: 100%;
    max-width: 100vw;
    padding: 0.75rem 0;
    background: linear-gradient(90deg, 
    rgba(68, 159, 239, 0.05) 0%,
    rgba(68, 134, 239, 0.1) 50%,
    rgba(68, 159, 239, 0.05) 100%
    );
    margin: 1.5rem 0 0.75rem 0;
    border-radius: 12px;
    user-select: none;
    position: relative;
    height: 90px; /* Hauteur fixe */
    box-sizing: border-box;
    overflow: visible !important;
    container-type: inline-size;
    container-name: desire-meter;
}

.desire-meter {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem;
    user-select: none;
    box-sizing: border-box;
    position: relative;
    height: 100%;
}

.desire-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    position: relative;
    height: 70px;
    background: transparent;
    cursor: pointer;
}

.desire-icon span {
    display: none; /* Cache le texte Adorable/Puissant */
}

.desire-icon .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
    border: 1px solid rgba(91, 127, 173, 0.22);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.desire-icon .icon::before,
.desire-icon .icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;  /* Un peu plus grand que l'icône */
    height: 120%; /* Un peu plus grand que l'icône */
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;  /* S'assurer qu'ils sont invisibles par défaut */
    visibility: hidden;  /* Complètement caché quand inactif */
}

.desire-icon .icon.sonar-active::before,
.desire-icon .icon.sonar-active::after {
    visibility: visible;  /* Visible uniquement pendant l'animation */
}

.desire-icon .icon.sonar-active::before {
    animation: sonar1 6s ease-out infinite;
}

.desire-icon .icon.sonar-active::after {
    animation: sonar2 6s ease-out infinite;
}

.desire-icon.tender .icon::before,
.desire-icon.tender .icon::after {
    background: rgba(68, 124, 238, 0.25);
}

.desire-icon.passionate .icon::before,
.desire-icon.passionate .icon::after {
    background: rgba(255, 69, 0, 0.25);
}

@keyframes sonar1 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    33% {  /* 2 secondes */
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    33.1%, 53% {  /* Pause de 1.2 secondes */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    53.3% {  /* 3.2 secondes */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    86.6% {  /* 5.2 secondes */
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    95% {  /* Début du fade-out */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes sonar2 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    6.6% {  /* 0.4 secondes de décalage */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    40% {  /* 2.4 secondes */
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    40.1%, 60% {  /* Pause */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    60% {  /* 3.6 secondes */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    93.3% {  /* 5.6 secondes */
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    95% {  /* Début du fade-out */
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.desire-icon:hover {
    background: transparent;
}

.desire-icon:hover .icon {
    border-color: rgba(239,68,176,0.3);
    box-shadow: 0 4px 8px rgba(68, 103, 238, 0.1);
    transform: translateY(-1px);
}

.desire-icon.clicking .icon {
    animation: clickPulse 0.3s ease-out;
}

/* Animation pour les clics frénétiques */
@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.points-counter {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-color);
    box-shadow: none;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
    transition: font-size 0.3s ease;
}

.points-counter.number-only {
    font-size: 1rem;
    animation: bounceTransition 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.points-counter.leader {
    color: #5b7fae;
    font-weight: 600;
}

.points-counter .user-points {
    position: absolute;
    top: -8px;
    right: -12px;
    font-size: 0.75em;
    color: #5b7fae;
    font-weight: bold;
}

@keyframes bounceTransition {
    0% { transform: translateY(-50%) scale(1); }
    20% { transform: translateY(-50%) scale(0.8); }
    40% { transform: translateY(-50%) scale(1.2); }
    60% { transform: translateY(-50%) scale(0.9); }
    80% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

.points-labels {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    pointer-events: none;
}

.points.tender .points-counter {
    left: 0;
}

.points.passionate .points-counter {
    right: 0;
    text-align: right;
}

.desire-icon:first-child .points-counter {
    left: 0;
}

.desire-icon:last-child .points-counter {
    right: 0;
}

.desire-icon[data-points="0"] .points-counter {
    font-size: 0.7rem;
}

.desire-icon[data-points^="1"] .points-counter {
    font-size: 0.8rem;
}

.desire-icon[data-points^="2"] .points-counter {
    font-size: 0.9rem;
}

.desire-icon[data-points^="3"] .points-counter {
    font-size: 1rem;
}

.desire-icon[data-points^="4"] .points-counter {
    font-size: 1.1rem;
}

.points-animation-container {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px; /* Espace fixe pour les animations */
    overflow: visible;
    pointer-events: none;
}

/* Animation pour les points gagnés */
@keyframes pointsGained {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.points-gained {
    position: absolute;
    color: var(--primary-color);
    font-weight: bold;
    pointer-events: none;
    animation: pointsGained 0.5s ease-out forwards;
}

/* Styles pour les combos */
.combo-counter {
    position: absolute;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.combo-active {
    opacity: 1;
    transform: translateY(0);
}

.meter-container {
    flex: 1;
    position: relative;
    height: 30px;
    display: flex;
    align-items: center;
    margin-top: -15px; /* Monter la barre */
    margin-bottom: 15px; /* Espace sous la barre */
}

/* Barre de température */
.meter-background {
    position: relative;
    width: 100%;
    height: 26px;
    background: rgba(161, 188, 226, 0.44);
    border-radius: 10px;
    overflow: visible;
    cursor: pointer;
}

.temperature-fill-tender,
.temperature-fill-passionate {
    position: absolute;
    height: 100%;
    width: 0;
    transition: width 0.3s ease-in-out;
    overflow: visible;
    border-radius: 10px;
}

.temperature-fill-tender {
    right: 50%;
    background: linear-gradient(to right, #6294f8, #d1e6ff) !important;
}

.temperature-fill-passionate {
    left: 50%;
    background: linear-gradient(to right, #ffd1dc, #ff0000) !important;
}

/* Marqueur de fin */
.temperature-fill-tender::after,
.temperature-fill-passionate::after {
    content: '';
    position: absolute;
    top: -1px;
    height: 28px;
    width: 1px;
    background: rgba(242, 248, 254, 0.72);
}

.temperature-fill-tender::after {
    right: 0;
}

.temperature-fill-passionate::after {
    left: 0;
}

/* Valeur de température */
.temperature-marker {
    display: none;
}

/* Points display at extremities */
.points-display {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
    pointer-events: none;
}

.points-display.tender {
    left: 0;
}

.points-display.passionate {
    right: 0;
}

/* Desire levels adjustments */
.desire-levels {
    position: absolute;
    bottom: -35px; /* Augmentation de l'espacement */
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

/* Animation de mise à jour */
@keyframes updateTemp {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.temperature-value.updating {
    animation: updateTemp 0.2s ease-out forwards;
}

/* Animation max level */
.max-level {
    position: relative;
}

.max-level::after {
    content: '🎉';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: celebrate 1s ease-out;
}

@keyframes celebrate {
    0% { transform: translateX(-50%) scale(0); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

/* Effet de particules */
.particle {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    animation: particleFly 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes particleFly {
    0% {
        transform: translate(0, 0) scale(var(--scale)) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0) rotate(var(--rotation));
        opacity: 0;
    }
}

.emoji-button {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.emoji-button:hover {
    background: transparent;
}

.emoji-button .icon {
    font-size: 2rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    will-change: transform;
    padding: 0.5rem;
    border-radius: 50%;
}

.emoji-button .icon:hover {
    background-color: rgba(255, 192, 203, 0.2);
    transform: scale(1.1);
}

.points-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.points-text {
    font-size: 0.9rem;
    color: #666;
}

.type-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: -0.2rem;
}

.type-text.question {
    font-weight: 600;
    font-size: 0.86em;
    margin-top: -5px;
    color: #5b7fae;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.06em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
    text-align: center;
    max-width: 300px; /* Limite max pour le texte */
}

.type-labels {
    position: absolute;
    bottom: -25px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.points-counter {
    font-size: 0.9rem;
    color: #666;
}

.type-text {
    font-size: 0.8rem;
    color: #999;
}

/* Styles pour les messages d'encouragement */
.encouragement-message-wrapper {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    left: 0;
    z-index: 10;
    transform: translateY(-50%);
}

.encouragement-message {
    display: inline-block;
    color: #666666;
    font-size: 0.9rem;
    font-weight: 600;
    font-style: normal;
    background: #fff;
    padding: 3px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.encouragement-message.fade-out {
    opacity: 0;
}

.encouragement-message:empty {
    display: none;
}

.encouragement-message.animate {
    animation: messageAppear 4s ease-out forwards;
    animation-delay: 1s; /* Réduit à 1 seconde */
}

@keyframes messageAppear {
    0%, 20% {  
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    40% {      
        opacity: 1;
        transform: translate(-50%, 0);
    }
    80% {      
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {     
        opacity: 0;
        transform: translate(-50%, -10px);
    }
}

/* Pause l'animation quand l'utilisateur préfère réduire les animations */
@media (prefers-reduced-motion: reduce) {
    .desire-icon .icon::before,
    .desire-icon .icon::after {
        animation: none;
    }
}

@media (max-width: 480px) {
    .desire-meter {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .desire-icon {
        min-width: 50px;
        padding: 0.25rem;
    }
    
    .desire-icon span {
        font-size: 0.7rem;
    }
    
    .desire-icon .icon {
        font-size: 1.2rem;
    }
}

/* Container Query pour adapter le texte sous 500px */
@container desire-meter (max-width: 500px) {
    .type-text.question {
        white-space: normal; /* Permet le retour à la ligne */
        line-height: 1.2;
    }
}

.big-points {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 3rem;
    color: #5b7fae; /* Rouge plus vif */
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    animation: bigPoints 2s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}

@keyframes bigPoints {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -150%) scale(1);
        opacity: 0;
    }
}

.success-effect {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    pointer-events: none;
    opacity: 0;
    z-index: 1000;
}

@keyframes successEffect {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -150%) scale(1) rotate(45deg);
        opacity: 0;
    }
}

