body {
            background: linear-gradient(to bottom, #1e1b47, #3a2d6a);
            margin: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: calc(var(--vh, 1vh) * 100);
            font-family: 'Quicksand', sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            position: relative;
            overflow-x: hidden;
            transition: overflow 0.3s ease-in-out;
        }
        body.no-scroll {
            overflow: hidden;
        }

        body::before,
        body::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-repeat: repeat;
            opacity: 0.15;
            pointer-events: none;
            z-index: 0;
        }

        body::before {
            background-image: radial-gradient(white 1px, transparent 1px);
            background-size: 25px 25px;
            animation: twinkleOpacity 3s infinite ease-in-out;
        }

        body::after {
            background-image: radial-gradient(white 1px, transparent 1px);
            background-size: 40px 40px;
            opacity: 0.08;
            animation: twinkleOpacity 5s infinite ease-in-out;
            animation-delay: 1.5s;
        }

        @keyframes twinkleOpacity {
            0%, 100% { opacity: 0.15; }
            50% { opacity: 0.05; }
        }

        .main-container-wrapper {
            position: relative;
            width: 90vw;
            max-width: 400px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            margin-top: 2rem;
            margin-bottom: 80px;
            z-index: 1;
            height: calc(var(--vh, 1vh) * 55);
            overflow: visible;
        }

        #all-posts-container {
            position: absolute;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .post-card {
            position: absolute;
            width: 100%;
            height: 100%;
            background: white;
            color: black;
            border-radius: 1.5rem;
            padding: 1rem;
            box-sizing: border-box;
            box-shadow: 0 0 12px rgb(0 0 0 / 0.15);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            touch-action: none;
            user-select: none;
            will-change: transform, opacity;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, background-color 0.3s ease, border 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
            min-height: 250px;
            top: 0;
            left: 0;
            opacity: 1;
            z-index: 10;
            cursor: pointer;
            overflow-wrap: break-word;
            overflow-x: hidden;
        }
		
		.post-card h3 {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .post-card p.mt-2.text-lg.text-gray-700.leading-relaxed {
            overflow: hidden;
            white-space: pre-wrap;
        }

        .popup-overlay .popup-content h3 {
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        #opened-post-details .post-card-opened h3 {
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        #opened-post-details .post-card-opened .post-content-full {
            overflow-y: auto;
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: pre-wrap;
        }

        .post-meta, .post-meta-opened {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            width: 100%;
            min-width: 0;
            overflow: hidden;
        }
        .login-streak-display {
            font-size: 1rem;
            font-weight: bold;
            display: inline-flex;
            align-items: center;
            padding: 4px 8px;
            position: relative;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(4px);
            overflow: hidden;
            transition: transform 0.3s ease;
        }

        .login-streak-display:hover {
            transform: scale(1.03);
        }

        @keyframes shimmer {
            0% {
                background-position: -100% 0;
            }
            50% {
                background-position: 100% 0;
            }
            100% {
                background-position: -100% 0;
            }
        }

        @keyframes glowPulse {
            0% {
                filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
            }
            50% {
                filter: drop-shadow(0 0 15px rgba(255,255,255,0.7));
            }
            100% {
                filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
            }
        }

        @keyframes softPulse {
            0% { filter: drop-shadow(0 0 3px rgba(255,255,255,0.2)); }
            50% { filter: drop-shadow(0 0 12px rgba(255,255,255,0.5)); }
            100% { filter: drop-shadow(0 0 3px rgba(255,255,255,0.2)); }
        }

        @keyframes shine {
            0% { background-position: -150% 0; }
            100% { background-position: 150% 0; }
        }

        .flame-tier-1 {
            color: #bbb;
        }

        .flame-tier-2 {
            background: linear-gradient(45deg, #a25c00, #ffb347);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: glowPulse 2.5s infinite ease-in-out;
        }

        .flame-tier-3 {
            background: linear-gradient(90deg, #ff4e00, #ec9f05);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 6px rgba(255, 80, 0, 0.8);
            animation: glowPulse 2s infinite ease-in-out;
        }

        .flame-tier-5 {
            background: linear-gradient(120deg, #ffd700, #ff9900, #fff0c2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
            animation: shimmer 3s linear infinite, glowPulse 1.6s infinite ease-in-out;
            background-size: 200%;
        }

        .flame-tier-10 {
            background: linear-gradient(45deg, #e06666, #ffb080, #ffe9d0);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-size: 400%;
            animation: shine 3s infinite linear, softPulse 1.5s infinite ease-in-out;
            text-shadow: 0 0 22px rgba(255, 100, 80, 0.5);
            position: relative;
        }

        .flame-tier-10::before {
            content: '';
            position: absolute;
            top: -40%;
            left: -40%;
            width: 180%;
            height: 180%;
            background: radial-gradient(circle, rgba(255, 140, 100, 0.25), transparent 70%);
            animation: auraPulse 2.5s infinite ease-in-out;
            border-radius: 50%;
            z-index: -1;
        }

        .flame-tier-10::after {
            content: '✦ ✧ ✦';
            position: absolute;
            right: 10%;
            bottom: 0%;
            font-size: 0.8em;
            opacity: 0.4;
            animation: particleDrift 3s infinite ease-in-out;
            pointer-events: none;
            z-index: 1;
            color: rgba(255, 230, 200, 0.6);
        }


        .flame-tier-15 {
            background: linear-gradient(120deg, #ff0000, #ff9900, #ffff00, #ff0000);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-size: 400%;
            animation: shimmer 3s infinite linear, glowPulse 1s infinite ease-in-out;
            position: relative;
            text-shadow: 0 0 25px rgba(255, 90, 0, 1);
        }

        .flame-tier-15::before {
            content: "👑";
            position: absolute;
            top: 0;
            left: 0;
            animation: floatingFlame 1.5s ease-in-out infinite;
        }

        @keyframes floatingFlame {
            0% { transform: translateY(0px); opacity: 1; }
            50% { transform: translateY(-4px); opacity: 0.8; }
            100% { transform: translateY(0px); opacity: 1; }
        }

        .flame-tier-15::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at center, rgba(255,255,255,0.1), transparent 60%);
            animation: shimmer 4s linear infinite;
            border-radius: 50%;
            z-index: -1;
        }

        @keyframes auraPulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.9; }
        }


        .post-status-badges-container {
            flex-shrink: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            align-items: center;
			margin-top: 5px;
        }
        .post-status-badge {
            padding: 2px 7px;
            border-radius: 12px;
            font-size: 0.75em;
            font-weight: 600;
            color: white;
            white-space: nowrap;
            text-transform: uppercase;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
			margin-left: 10px;
        }
        .status-nouveau-badge { background-color: #28a745; }
        .status-discussion-badge { background-color: #ffc107; color: #333; }
        .status-discussion-enflammee-badge { background-color: #dc3545; }
        .status-nouvelle-reponse-badge { background-color: #17a2b8; }
        .status-premier-post-badge { background-color: #6f42c1; }
        .status-top-1-tendance-badge { background-color: #e6b400;
  color: #fffdf6; }
        .status-top-2-tendance-badge { background-color: #7e3f8f;
  color: #fceff9;
 }
        .status-top-3-tendance-badge { background-color: #a65e38;
  color: #fff5f0;
}


        .post-card.status-tendance, .post-card.status-top-1-tendance, .post-card.status-top-2-tendance, .post-card.status-top-3-tendance {
            background: linear-gradient(135deg, #f0c27b, #4b1248);
            color: #4b1248;
            border: 2px solid #AB8A59;
            box-shadow: 0 0 20px rgba(253, 126, 20, 0.5);
            animation: glowOrange 2s infinite alternate;
        }
        .popup-content.status-tendance-popup, .popup-content.status-top-1-tendance-popup, .popup-content.status-top-2-tendance-popup, .popup-content.status-top-3-tendance-popup {
            background: linear-gradient(to bottom right, #fff5e8, #ffe8d6);
            color: #8c4e0f;
            border: 2px solid #fd7e14;
            box-shadow: 0 0 30px rgba(253, 126, 20, 0.7);
        }
       
		
		@keyframes glowOrange {
  from {
    box-shadow:
      0 0 12px rgba(240,194,123,0.4),
      0 0 12px rgba(75,18,72,0.4);
  }
  to   {
    box-shadow:
      0 0 28px rgba(240,194,123,0.9),
      0 0 28px rgba(75,18,72,0.9);
  }
}

        .post-card.status-discussion-enflammee {
            background-color: #f8d7da;
            color: #721c24;
            border: 2px solid #dc3545;
            box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
        }
        .popup-content.status-discussion-enflammee-popup {
            background: linear-gradient(to bottom right, #faecec, #f8d7da);
            color: #721c24;
            border: 2px solid #dc3545;
            box-shadow: 0 0 30px rgba(220, 53, 69, 0.7);
        }
        @keyframes pulseRed {
            0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(220, 53, 69, 0.3); }
            50% { transform: scale(1.01); box-shadow: 0 0 25px rgba(220, 53, 69, 0.7); }
        }

        .post-card.status-discussion {
            background-color: #fff3cd;
            color: #856404;
            border: 2px solid #ffc107;
            box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
        }
        .popup-content.status-discussion-popup {
            background: linear-gradient(to bottom right, #fffbe3, #fff3cd);
            color: #856404;
            border: 2px solid #ffc107;
            box-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
        }

        .post-card.status-nouvelle-reponse {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 2px solid #17a2b8;
            box-shadow: 0 0 15px rgba(23, 162, 184, 0.3);
        }
        .popup-content.status-nouvelle-reponse-popup {
            background: linear-gradient(to bottom right, #e8f7f9, #d1ecf1);
            color: #0c5460;
            border: 2px solid #17a2b8;
            box-shadow: 0 0 25px rgba(23, 162, 184, 0.5);
        }

        .post-card.status-premier-post {
            background-color: #e2d9f3;
            color: #4b2a8d;
            border: 2px solid #6f42c1;
            box-shadow: 0 0 15px rgba(111, 66, 193, 0.3);
        }
        .popup-content.status-premier-post-popup {
            background: linear-gradient(to bottom right, #f0eafb, #e2d9f3);
            color: #4b2a8d;
            border: 2px solid #6f42c1;
            box-shadow: 0 0 25px rgba(111, 66, 193, 0.5);
        }

        .post-card.status-nouveau {
            background: linear-gradient(150deg, #A1FFAC, #FFF2F2);
            color: #2e1f4f;
            border: 3px solid #67bb63;
            box-shadow: 0 0 10px rgba(120, 100, 200, 0.3);
        }


        .popup-content.status-nouveau-popup {
            background: linear-gradient(to bottom right, #eaf6ea, #d4edda);
            color: #155724;
            border: 2px solid #28a745;
            box-shadow: 0 0 25px rgba(40, 167, 69, 0.5);
        }


        #auth-section {
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 1.5rem;
            padding: 2rem;
            max-width: 400px;
            width: 90%;
            margin-bottom: 2rem;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
            color: white;
            text-align: center;
        }
        #auth-section h2 {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 1.5rem;
            color: #ffdb49;
        }
        .form-container {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        .form-container input,
        .form-container select,
        .form-container button {
            border-radius: 0.75rem;
            padding: 0.75rem 1rem;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background-color: rgba(255, 255, 255, 0.08);
            color: white;
        }
        .form-container input::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }
        .form-container button {
            background-color: #6366f1;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .form-container button:hover {
            background-color: #4f46e5;
        }
        .error-message {
            color: #ef4444;
            margin-top: 0.5rem;
            font-weight: bold;
        }

        /* Dans styles.css */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* MODIFICATION ICI : On passe de 999 à 2000 pour être au-dessus du post ouvert (1000) */
    z-index: 2000; 
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
        .popup-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        @keyframes fadeInOverlay {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes fadeOutOverlay {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        .popup-overlay:not(.active) {
            animation: fadeOutOverlay 0.4s forwards;
        }


        .popup-content {
   background-color: #3b2a64;
    padding: 20px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 0 30px var(--shadow-color);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
    
    /* AJOUTEZ CETTE LIGNE */
    max-height: calc(var(--vh, 1vh) * 90); /* 90% de la hauteur visible */

    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    position: relative;
    box-sizing: border-box;
}

        .popup-overlay.active .popup-content {
            transform: scale(1) translateY(0);
            opacity: 1;
        }
        .popup-overlay:not(.active) .popup-content {
            transform: scale(0.9) translateY(20px);
            opacity: 0;
        }

        .popup-content h3 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: #ffdb49;
            text-shadow: 0 0 8px rgba(255, 219, 73, 0.5);
        }
        .popup-content h4 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #c4b5fd;
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
        }

        .popup-content input,
        .popup-content textarea,
        .popup-content select {
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(139, 92, 246, 0.4);
            color: white;
            border-radius: 0.75rem;
            padding: 0.75rem 1rem;
            width: calc(100% - 2rem);
            margin-bottom: 1rem;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .popup-content input:focus,
        .popup-content textarea:focus,
        .popup-content select:focus {
            outline: none;
            border-color: #8b5cf6;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
        }
        .popup-content input::placeholder,
        .popup-content textarea::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        .popup-content button {
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            color: white;
            font-weight: bold;
            padding: 0.75rem 1.5rem;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.3s ease;
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        .popup-content button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5);
            background: linear-gradient(90deg, #4f46e5, #7c3aed);
        }
        .popup-content .close-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

        .popup-content .close-button:hover {
            color: #ffdb49;
            transform: rotate(90deg);
        }

        .footer-nav-custom {
            background: linear-gradient(to right, #1a1532, #2d2449);
            border-top: 1px solid rgba(100, 70, 150, 0.4) !important;
            padding: 0.6rem 0;
            box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            z-index: 50;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        .footer-nav-custom .nav-button {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #c4b5fd;
            transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
            padding: 0.4rem;
            border-radius: 0.8rem;
            flex: 1;
            min-width: 55px;
            font-family: 'Quicksand', sans-serif;
            font-weight: 700;
            text-shadow: 0 0 4px rgba(196, 181, 253, 0.3);
        }

        .footer-nav-custom .nav-button:hover {
            color: #ffffff;
            transform: translateY(-3px) scale(1.03);
            background-color: rgba(196, 181, 253, 0.1);
            box-shadow: 0 0 10px rgba(196, 181, 253, 0.4);
        }

        .footer-nav-custom .nav-button img {
            filter: invert(85%) sepia(20%) saturate(1000%) hue-rotate(220deg) brightness(120%) contrast(100%);
            width: 26px;
            height: 26px;
            margin-bottom: 0.2rem;
            transition: filter 0.3s ease, transform 0.3s ease;
        }

        .footer-nav-custom .nav-button:hover img {
            filter: invert(100%) sepia(0%) saturate(0%) hue-180deg(0deg) brightness(100%) contrast(100%);
            transform: rotate(3deg) scale(1.05);
        }

        .footer-nav-custom .nav-button span {
            font-size: 0.7rem;
            letter-spacing: 0.4px;
        }


        @keyframes pulse-effect {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.05);
                opacity: 0.8;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        #nav-post img {
            animation: pulse-effect 1.8s infinite ease-in-out;
            transform-origin: center;
        }

        #nav-post .animated-poster-text {
            animation: pulse-effect 1.8s infinite ease-in-out;
            transform-origin: center;
        }

        #nav-post:hover {
            transform: none !important;
        }

        .notif-badge {
    position: absolute; /* Rendre le badge positionné absolument */
    top: -5px; /* Ajustez pour positionner verticalement */
    right: -5px; /* Ajustez pour positionner horizontalement par rapport à l'icône */
    background-color: #ff0000;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.4rem;
    border-radius: 9999px;
    line-height: 1;
    user-select: none;
    animation: pulse2 2s infinite;
    box-shadow: 0 0 6px #ff0000;
}

.notif-button {
    position: relative;
}

.relative.inline-flex {
    position: relative;
    padding: 0; 
    margin: 0; 
}

.nav-button img {
    margin-right: 0;
    width: 26px;
    height: 26px;
}
        @keyframes pulse2 {
            0%, 100% { transform: scale(0.80); opacity: 0.8; }
            50% { transform: scale(1.1); opacity: 1; }
        }

        .tooltip-container {
            position: relative;
        }
        .tooltip-container .tooltip-text {
            visibility: hidden;
            width: max-content;
            max-width: 150px;
            background-color: #111827;
            color: #f9fafb;
            text-align: center;
            border-radius: 0.5rem;
            padding: 0.25rem 0.5rem;
            position: absolute;
            bottom: 3.2rem;
            font-size: 0.75rem;
            font-weight: 600;
            opacity: 0;
            transition: opacity 0.3s;
            pointer-events: none;
            user-select: none;
            white-space: nowrap;
            z-index: 100;
            box-shadow: 0 0 8px rgba(0,0,0,0.3);
            left: 50%;
            transform: translateX(-50%);
        }
        .tooltip-container:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        .tooltip-container.pulse {
            border-radius: 50%;
        }

        #postCallToAction {
            position: absolute;
            top: -3.5rem;
            left: 50%;
            transform: translateX(-50%);
            background-color: #4f46e5;
            color: white;
            font-size: 0.75rem;
            font-weight: 600;
            border-radius: 9999px;
            padding: 0.25rem 0.75rem;
            box-shadow: 0 0 8px rgba(99, 102, 241, 0.7);
            pointer-events: none;
            user-select: none;
            white-space: nowrap;
            z-index: 200;
            animation: fadeInUp 0.6s ease-out;
            animation-fill-mode: forwards;
        }
        @keyframes fadeInUp {
            0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.95); }
            100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
        }
        .animated-poster-text {
            animation: shimmerViolet 5s ease-in-out infinite;
            transition: color 0.3s ease;
        }
        @keyframes shimmerViolet {
            0%, 90%, 100% { color: #9ca3af; text-shadow: none; }
            45%, 55% { color: #4f46e5; text-shadow: 0 0 2px #726ae8, 0 0 4px #4237e4; }
        }

        nav {
            display: none !important;
        }
        hr {
            display: none !important;
        }
        #main-content {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
        }
        .gradient-line {
            height: 3px;
            width: 219px;
            margin: 24px auto;
            background: linear-gradient(
                to right,
                rgba(255, 255, 255, 0),
                rgba(200, 180, 255, 0.6),
                rgba(255, 255, 255, 0)
            );
            border-radius: 2px;
        }

		@keyframes pulse-effect {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.15);
                opacity: 0.6;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        #nav-post img {
            animation: pulse-effect 1.8s infinite ease-in-out;
            transform-origin: center;
        }

        #nav-post .animated-poster-text {
            animation: pulse-effect 1.8s infinite ease-in-out;
            transform-origin: center;
        }

        #nav-post:hover {
            transform: none !important;
        }
		
		@keyframes pulseGlow {
            0% {
                text-shadow: 0 0 5px #00ff7f, 0 0 10px #00ff7f, 0 0 20px #00ff7f;
            }
            50% {
                text-shadow: 0 0 10px #00ff7f, 0 0 20px #00ff7f, 0 0 30px #00ff7f;
            }
            100% {
                text-shadow: 0 0 5px #00ff7f, 0 0 10px #00ff7f, 0 0 20px #00ff7f;
            }
        }

        .glow-text {
            animation: pulseGlow 2s infinite ease-in-out;
        }

        .registration-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            max-width: 100vw; 
            max-height: 100vh; 
            background-color: #1e1b47;
            border-radius: 0;
            padding: 0;
            box-shadow: none;
            color: white;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            z-index: 1000;
        }
        @media (max-width: 768px) {
            .registration-container {
                padding: 0;
            }
        }


        .registration-step {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 2rem;
            box-sizing: border-box;
            opacity: 0;
            transition: opacity 0.5s ease-in-out; 
            pointer-events: none;
        }

        .registration-step.active {
            opacity: 1;
            position: relative;
            pointer-events: auto;
        }

        .registration-step.active.step-1 {
            animation: fadeInStep 0.7s forwards;
        }
        .registration-step.active.step-2 {
            animation: fadeInStep 0.6s forwards;
        }
        .registration-step.active.step-3 {
            animation: fadeInStep 0.6s forwards;
        }
        @keyframes fadeInStep {
            0% { opacity: 0; transform: translateY(20px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        .step-content {
            width: 90vw;
            max-width: 450px;
            padding-top: 2rem; 
            padding-bottom: 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            overflow-y: auto; 
            flex-grow: 1; 
            justify-content: center; 
        }
        @media (max-width: 640px) {
            .step-content {
                padding-left: 1rem;
                padding-right: 1rem;
                width: 100%;
            }
        }


        .step-input {
            width: 100%;
            padding: 0.85rem 1.25rem;
            border-radius: 0.85rem;
            background-color: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.4);
            color: white;
            font-size: 1.1rem;
            transition: all 0.3s ease;
        }
        .step-input:focus {
            outline: none;
            border-color: #a78bfa;
            box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.4);
            transform: translateY(-2px);
        }
        .step-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .country-select {
            appearance: none;
            -webkit-appearance: none;
            background-color: rgba(255, 255, 255, 0.2);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1.25rem;
            padding-right: 2.5rem;
            color: white;
        }

        .country-select option {
            background-color: #1e1b47;
            color: white;
            font-size: 1rem;
        }


        .gender-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            justify-content: center;
            width: 100%;
        }
        .gender-button {
            background-color: rgba(139, 92, 246, 0.2);
            border: 2px solid rgba(139, 92, 246, 0.5);
            color: white;
            padding: 0.85rem 1.25rem;
            border-radius: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.2s ease-in-out;
            flex: 1 1 calc(50% - 0.5rem);
            max-width: 180px;
            justify-content: center;
        }
        .gender-button:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
        }
        .gender-button.selected {
            background: linear-gradient(45deg, #a78bfa, #8b5cf6);
            border-color: #c4b5fd;
            box-shadow: 0 0 15px rgba(167, 139, 250, 0.7);
            transform: scale(1.05);
        }
        .gender-button i {
            font-size: 1.2em;
        }

        .pseudo-feedback {
            font-size: 0.95rem;
            font-weight: 600;
            margin-top: 0.5rem;
            min-height: 20px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pseudo-feedback.valid { color: #a2e6b8; }
        .pseudo-feedback.invalid { color: #ffb3b3; }

        @keyframes confetti {
            0% { transform: translateY(0) rotateZ(0deg); opacity: 1; }
            100% { transform: translateY(-1000px) rotateZ(360deg); opacity: 0; }
        }

        .confetti-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
        }
        .confetti {
            position: absolute;
            width: 8px;
            height: 8px;
            background-color: #ffeb3b;
            opacity: 0;
            animation: confetti 2s ease-out forwards;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }
        .shake-animation { animation: shake 0.5s; }

        @keyframes checkmarkAnim {
            0% {
                stroke-dashoffset: 26;
                stroke-dasharray: 26;
            }
            100% {
                stroke-dashoffset: 0;
                stroke-dasharray: 26;
            }
        }
        .checkmark-icon {
            width: 20px;
            height: 20px;
            stroke: #a2e6b8;
            stroke-width: 3;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
            display: inline-block;
            vertical-align: middle;
            margin-left: 5px;
        }
        .checkmark-icon.animated { animation: checkmarkAnim 0.3s ease-out forwards; }

        .password-checklist {
            width: 100%;
            text-align: left;
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.7);
        }
        .password-checklist div {
            display: flex;
            align-items: center;
            margin-bottom: 0.25rem;
        }
        .password-checklist .check-icon {
            width: 18px;
            height: 18px;
            margin-right: 0.5rem;
            border: 1.5px solid rgba(255, 255, 255, 0.5);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: transparent;
            transition: all 0.3s ease;
        }
        .password-checklist .check-icon.valid {
            border-color: #a2e6b8;
            background-color: #a2e6b8;
            color: #1e1b47;
        }

        .nav-buttons {
            display: flex;
            gap: 1rem;
            width: 100%;
            max-width: 450px;
            justify-content: center;
            padding-bottom: calc(5rem + env(safe-area-inset-bottom));
        }
		
		@media (max-width: 480px) {
  .nav-buttons {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
}

.nav-buttons {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}
		
		@media (min-width: 1024px) {
            .nav-buttons {
                padding-bottom: 1rem;
            }
        }
        .nav-buttons button {
            flex: 1;
            max-width: 180px;
            padding: 0.85rem 1.5rem;
            border-radius: 0.85rem;
            font-weight: 700;
            transition: all 0.3s ease;
        }
        .nav-buttons .btn-next {
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            color: white;
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        .nav-buttons .btn-next:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5);
            background: linear-gradient(90deg, #4f46e5, #7c3aed);
        }
        .nav-buttons .btn-next.pulsing {
            animation: pulseButton 1.5s infinite ease-in-out;
        }
        @keyframes pulseButton {
            0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
            50% { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5); }
            100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
        }
        .nav-buttons .btn-back {
            background-color: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }
        .nav-buttons .btn-back:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-1px);
        }

        .progress-bar-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background-color: #1e1b47;
            padding: 0.75rem 1rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 1001;
            border-bottom: 2px solid #8b5cf6;
            transition: background-color 0.3s ease;
        }
        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 450px;
            margin-bottom: 0.75rem;
        }
        .progress-text {
            color: #c4b5fd;
            font-weight: 700;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-shadow: 0 0 5px rgba(196, 181, 253, 0.4);
        }
        .progress-bar-inner {
            width: 100%;
            height: 12px;
            background-color: #2a2251;
            border-radius: 9999px;
            overflow: hidden;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
        }
        .progress {
            height: 100%;
            background: linear-gradient(90deg, #00f260, #0575e6);
            width: 0%;
            border-radius: 9999px;
            transition: width 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            box-shadow: 0 0 10px rgba(0, 242, 96, 0.7);
            animation: progressGlow 2s infinite alternate;
        }

        @keyframes progressGlow {
            0% { box-shadow: 0 0 8px rgba(0, 242, 96, 0.5); }
            100% { box-shadow: 0 0 15px rgba(0, 242, 96, 1); }
        }
		
		.country-select {
            appearance: none;
            -webkit-appearance: none;
            background-color: rgba(255, 255, 255, 0.2);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1.25rem;
            padding-right: 2.5rem;
            color: white;
        }

        .country-select option {
            background-color: #1e1b47;
            color: white;
            font-size: 1rem;
        }
		
		.birth-select {
            appearance: none;
            -webkit-appearance: none;
            background-color: rgba(255, 255, 255, 0.2);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1.25rem;
            padding-right: 2.5rem;
            color: white;
        }

        .birth-select option {
            background-color: #1e1b47;
            color: white;
            font-size: 1rem;
        }

        .final-celebration {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(to bottom, #1e1b47, #3a2d6a);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            color: white;
            font-size: 1.5rem;
            font-weight: bold;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
            z-index: 100;
        }
        .final-celebration.active {
            opacity: 1;
            visibility: visible;
        }
        .celebration-message {
    margin-top: 1rem;
    font-size: 1.5rem; /* avant 2rem */
    color: #00ff88;
    animation: fadeInScale 1s forwards;
}

        .celebration-emoji {
    font-size: 3rem; /* avant 4rem */
    margin-bottom: 1rem;
    animation: bounceIn 0.8s forwards;
}
        @keyframes fadeInScale {
            0% { opacity: 0; transform: scale(0.8); }
            100% { opacity: 1; transform: scale(1); }
        }
        @keyframes bounceIn {
            0% { transform: scale(0.3); opacity: 0; }
            50% { transform: scale(1.1); opacity: 1; }
            70% { transform: scale(0.9); }
            100% { transform: scale(1); }
        }


        .feedback-message {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: #c4b5fd;
            text-align: center;
            min-height: 20px;
            transition: color 0.3s ease;
        }

        .feedback-message.valid {
            color: #a2e6b8;
        }

        .feedback-message.invalid {
            color: #ffb3b3;
        }

        .popup-overlay.active {
            animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }
        .popup-overlay:not(.active) {
            animation: scaleOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        @keyframes scaleIn {
            from { transform: scale(0.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        @keyframes scaleOut {
            from { transform: scale(1); opacity: 1; }
            to { transform: scale(0.9); opacity: 0; }
        }

        #notifications-popup .popup-content {
            background: linear-gradient(to bottom right, #3a2d6a, #1e1b47);
            border: 2px solid #8b5cf6;
            box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
        }
        #notifications-popup h3 {
            color: #ffdb49;
            text-shadow: 0 0 10px rgba(255, 219, 73, 0.7);
        }
        .notification-item {
            background-color: rgba(255, 255, 255, 0.08);
            border-radius: 0.75rem;
            padding: 1rem;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            color: white;
            transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
            cursor: pointer;
            border: 1px solid rgba(139, 92, 246, 0.3);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        .notification-item:hover {
            background-color: rgba(255, 255, 255, 0.15);
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(139, 92, 246, 0.4);
        }
        .notification-item.unread {
            background: linear-gradient(to right, rgba(139, 92, 246, 0.2), rgba(255, 255, 255, 0.08));
            border-left: 5px solid #8b5cf6;
            animation: pulseUnread 1.5s infinite alternate;
        }
        @keyframes pulseUnread {
            from { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); }
            to { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5); }
        }
        .notification-item .notif-icon {
            font-size: 1.5rem;
            color: #c4b5fd;
            min-width: 30px;
            text-align: center;
        }
        .notification-item p {
            flex-grow: 1;
            margin: 0;
            font-size: 0.95rem;
            line-height: 1.4;
        }
        .notification-item small {
            font-size: 0.75rem;
            color: #aaa;
            white-space: nowrap;
        }

        #post-type-selection-popup .popup-content,
        #post-form-popup .popup-content {
            background: linear-gradient(to bottom right, #2d2449, #1a1532);
            border: 2px solid #6366f1;
            box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
        }
        #post-type-selection-popup h3,
        #post-form-popup h3 {
            color: white;
            text-shadow: 0 0 10px rgba(255, 219, 73, 0.7);
        }
        #post-type-selection-popup button,
        #post-form-popup button {
            transition: all 0.3s ease;
            transform: scale(1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        #post-type-selection-popup button:hover,
        #post-form-popup button:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(99, 102, 241, 0.4);
        }
        #post-form-popup input,
        #post-form-popup textarea {
            background-color: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.4);
            color: white;
            font-size: 1rem;
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        #post-form-popup input:focus,
        #post-form-popup textarea:focus {
            border-color: #8b5cf6;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
        }
        /* Styles pour les cases à cocher */
        input[type="checkbox"] {
            /* Masque la case à cocher nativement */
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            display: inline-block;
            position: relative;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            cursor: pointer;
            border-radius: 6px; /* Coins arrondis */
            border: 2px solid #a78bfa; /* Bordure violette */
            background-color: rgba(139, 92, 246, 0.1); /* Fond légèrement transparent */
            transition: all 0.3s ease;
            vertical-align: middle;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        /* Style quand la case est cochée */
        input[type="checkbox"]:checked {
            background: linear-gradient(45deg, #a78bfa, #8b5cf6); /* Dégradé violet */
            border-color: #c4b5fd; /* Bordure plus claire */
            box-shadow: 0 0 10px rgba(167, 139, 250, 0.5); /* Ombre lumineuse */
        }

        /* Icône de coche personnalisée */
        input[type="checkbox"]:checked::after {
            content: '✓'; /* Symbole de coche */
            font-family: 'Font Awesome 5 Free'; /* Utilisation de Font Awesome si disponible */
            font-weight: 900;
            color: white;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(1);
            font-size: 14px;
            opacity: 1;
            transition: transform 0.2s ease-out, opacity 0.2s ease-out;
        }

        /* Animation d'apparition de la coche */
        input[type="checkbox"]:not(:checked)::after {
            content: '';
            transform: translate(-50%, -50%) scale(0);
            opacity: 0;
        }

        /* Effet de survol */
        input[type="checkbox"]:hover {
            border-color: #c4b5fd;
            box-shadow: 0 0 15px rgba(167, 139, 250, 0.7);
            transform: scale(1.05);
        }

        /* Style pour le label associé à la checkbox */
        .post-tags-selection label {
            background-color: rgba(139, 92, 246, 0.2);
            border: 1px solid rgba(139, 92, 246, 0.5);
            color: #c4b5fd;
            font-weight: 600;
            transition: all 0.2s ease;
            display: inline-flex; /* Assure que le label et la checkbox sont sur la même ligne */
            align-items: center;
            padding: 8px 12px; /* Ajustez le padding pour un meilleur look */
            border-radius: 8px; /* Coins arrondis pour le label */
            cursor: pointer;
        }
        .post-tags-selection label:hover {
            background-color: rgba(139, 92, 246, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(139, 92, 246, 0.3);
        }
        /* Pas besoin de ce sélecteur si le style est appliqué directement sur le label */
        /* .post-tags-selection input[type="checkbox"]:checked + span {
            background: linear-gradient(45deg, #a78bfa, #8b5cf6);
            color: white;
            border-color: #c4b5fd;
            box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
        } */


        .poll-option-input input {
            background-color: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.4);
            color: white;
        }
        .remove-poll-option-button {
            background-color: #ef4444 !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
        }
        .remove-poll-option-button:hover {
            background-color: #dc2626 !important;
            transform: translateY(-1px) scale(1.05) !important;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
        }

        #profile-popup .popup-content {
            background: linear-gradient(to bottom right, #1a1532, #2d2449);
            border: 2px solid #c4b5fd;
            box-shadow: 0 0 30px rgba(196, 181, 253, 0.5);
        }
        #profile-popup h3 {
            color: #ffdb49;
            text-shadow: 0 0 10px rgba(255, 219, 73, 0.7);
        }
        #profile-info p {
            color: #e0e0e0;
            margin-bottom: 0.5rem;
            font-size: 1.05rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        #profile-info strong {
            color: #c4b5fd;
        }
        #profile-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            justify-content: center;
            margin-top: 1rem;
        }
        .badge-item {
            background: linear-gradient(45deg, #a78bfa, #8b5cf6);
            color: white;
            padding: 0.6rem 1.2rem;
            border-radius: 9999px;
            font-weight: 700;
            font-size: 0.9rem;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s ease, box-shadow 0.3s ease;
            cursor: help;
            position: relative;
            overflow: hidden;
        }
        .badge-item:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(167, 139, 250, 0.7);
        }
        .badge-item::before {
            content: '✨';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            font-size: 2em;
            opacity: 0;
            transition: all 0.3s ease;
            pointer-events: none;
        }
        .badge-item:hover::before {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            animation: sparkle 0.6s ease-out forwards;
        }
        @keyframes sparkle {
            0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
        }
        #profile-logout-button {
            margin-top: 2rem !important;
            background: linear-gradient(90deg, #ef4444, #dc2626) !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
        }
        #profile-logout-button:hover {
            background: linear-gradient(90deg, #dc2626, #b91c1c) !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important;
        }
        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(45deg, #c4b5fd, #8b5cf6);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 3rem;
            color: white;
            margin: 0 auto 1.5rem;
            box-shadow: 0 0 20px rgba(167, 139, 250, 0.7);
            animation: avatarPulse 2s infinite ease-in-out;
        }
        @keyframes avatarPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.03); }
        }
        .profile-stats {
            display: flex;
            justify-content: space-around;
            width: 100%;
            margin-top: 1.5rem;
            padding: 1rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .stat-item {
            text-align: center;
            color: #e0e0e0;
            font-size: 0.9rem;
        }
        .stat-item strong {
            display: block;
            font-size: 1.5rem;
            color: #ffdb49;
            margin-bottom: 0.2rem;
            text-shadow: 0 0 5px rgba(255, 219, 73, 0.5);
        }
        .noka-info-box {
            background: linear-gradient(to right, #3a2d6a, #1e1b47);
            border: 2px solid #8b5cf6;
            border-radius: 1.25rem;
            padding: 1.5rem;
            text-align: center;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(139, 92, 246, 0.5);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .noka-info-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.7);
        }
        .noka-info-box h4 {
            color: #ffdb49;
            text-shadow: 0 0 8px rgba(255, 219, 73, 0.6);
            margin-bottom: 0.5rem;
            font-size: 1.25rem;
        }
        .noka-info-box p {
            color: #e0e0e0;
            font-size: 0.95rem;
            line-height: 1.5;
        }
        .noka-info-box .text-blue-400 {
            color: #60a5fa;
            font-weight: 700;
        }

        #noka-info-popup .popup-content {
            background: linear-gradient(to bottom right, #1e1b47, #3a2d6a);
            border: 2px solid #c4b5fd;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(196, 181, 253, 0.6);
            padding: 2.5rem;
        }
        #noka-info-popup h3 {
            color: #ffdb49;
            text-shadow: 0 0 12px rgba(255, 219, 73, 0.8);
            margin-bottom: 2rem;
            font-size: 2.5rem;
        }
        #noka-info-popup .info-section h4 {
            font-size: 1.75rem;
            font-weight: 700;
            color: #c4b5fd;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-shadow: 0 0 8px rgba(196, 181, 253, 0.4);
        }
        #noka-info-popup .info-section p,
        #noka-info-popup .info-section li {
            color: #e0e0e0;
            line-height: 1.6;
            font-size: 1.05rem;
            margin-bottom: 0.75rem;
        }
        #noka-info-popup .info-section ul {
            padding-left: 1.5rem;
            list-style-type: disc;
        }
        #noka-info-popup .info-section strong {
            color: #fff;
        }
        #noka-info-popup .info-section .text-red-300 {
            color: #fca5a5;
        }
        #noka-info-popup .info-section .text-green-300 {
            color: #86efac;
        }
        #noka-info-popup .info-section .text-yellow-300 {
            color: #fde047;
        }
        #noka-info-popup .info-section i {
            font-size: 1.5rem;
            margin-right: 0.5rem;
        }
        #noka-info-popup .close-button {
            color: #e0e0e0;
        }
        #noka-info-popup .close-button:hover {
            color: #ffdb49;
        }

/* AJOUTER CES STYLES À LA FIN DE styles.css */

/* Style pour la nouvelle popup d'authentification */
#auth-popup-content {
    background: linear-gradient(to bottom right, #2a2251, #4b3d7d);
    border: 2px solid #a78bfa;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(167, 139, 250, 0.6);
}

#auth-popup-content .form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 350px; /* Limiter la largeur du formulaire */
    margin: 0 auto; /* Centrer le formulaire */
}

#auth-popup-content input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.4);
	margin: 0 auto; /* Centrer le formulaire */
	width: 100%;
}

#auth-popup-content #popup-login-button {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

#auth-popup-content #popup-register-button {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(167, 139, 250, 0.5);
    animation: pulseButton 2s infinite ease-in-out;
}

/* Animation pour le bouton de connexion/inscription dans la barre de navigation */
#nav-profile.logged-out-auth-button {
    border-radius: 0.8rem;
}

#nav-profile.logged-out-auth-button span {
    font-size: 0.8rem; /* Légèrement plus grand pour "Connexion" */
    font-weight: 700;
}
#next-step-1 {
    position: relative;
    top: -75px; /* Déplace l'élément de 10px vers le haut. Ajustez cette valeur. */
}

 /* Styles existants du loader */
        #noka-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, #1e1b47, #3a2d6a);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            opacity: 1;
            transition: opacity 0.3s ease-out;
            overflow: hidden;
        }

        .loader-content {
    position: relative;
    /* display: flex;  <-- ON RETIRE ÇA */
    /* align-items: center; <-- ON RETIRE ÇA */
    /* justify-content: center; <-- ON RETIRE ÇA */
    
    display: block; /* On remet un affichage standard */
    text-align: center; /* On centre le texte */
    
    font-family: 'Quicksand', cursive;
    font-weight: 600;
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
    
    /* On réduit l'espacement négatif initial pour éviter le "tas" sur iPhone */
    letter-spacing: -0.05em; 
    
    opacity: 0;
    animation: textReveal 0.8s ease-out forwards, glowPulse 1.5s infinite ease-in-out 0.8s;
    white-space: nowrap;
}

        .loader-content span {
    display: inline-block;
    vertical-align: middle; /* <-- AJOUT IMPORTANT pour l'alignement */
    opacity: 0;
    transform: translateY(20px);
    animation: letterSlideIn 0.5s ease-out forwards;
}

        .loader-content span:nth-child(1) { animation-delay: 0.1s; }
        .loader-content span:nth-child(2) { animation-delay: 0.2s; }
        .loader-content span:nth-child(3) { animation-delay: 0.3s; }
        .loader-content span:nth-child(4) { animation-delay: 0.4s; }
		.loader-content span:nth-child(5) { animation-delay: 0.5s; }
		.loader-content span:nth-child(6) { animation-delay: 0.6s; }
		.loader-content span:nth-child(7) { animation-delay: 0.7s; }

        @keyframes letterSlideIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes textReveal {
            0% { letter-spacing: -0.5em; opacity: 0; filter: blur(10px); }
            50% { letter-spacing: 0.1em; opacity: 1; filter: blur(0px); }
            100% { letter-spacing: 0; opacity: 1; filter: blur(0px); }
        }

        @keyframes glowPulse {
            0%, 100% { text-shadow: 0 0 15px rgba(250, 204, 21, 0.6), 0 0 25px rgba(250, 204, 21, 0.4); }
            50% { text-shadow: 0 0 25px rgba(250, 204, 21, 0.9), 0 0 40px rgba(250, 204, 21, 0.7); }
        }

        .moon-emoji {
            font-size: 2.5rem;
            color: #e0e0e0;
            margin-left: 1rem;
            opacity: 0;
            transform: rotate(0deg) scale(0.5);
            animation: moonAppear 0.5s ease-out 0.6s forwards, moonRotate 1.5s linear infinite 0.6s, moonGlow 2s ease-in-out infinite 0.6s;
        }

        @keyframes moonAppear {
            to {
                opacity: 1;
                transform: rotate(0deg) scale(1);
            }
        }

        @keyframes moonRotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes moonGlow {
            0%, 100% { filter: drop-shadow(0 0 8px rgba(224, 224, 224, 0.5)); }
            50% { filter: drop-shadow(0 0 15px rgba(224, 224, 224, 0.8)); }
        }

        .particle-aura {
            position: absolute;
            width: 150%;
            height: 150%;
            background: radial-gradient(circle at center, rgba(112, 169, 175, 0.4) 0%, transparent 70%);
            background-size: 10px 10px, 20px 20px, 30px 30px;
            background-repeat: repeat;
            animation: particleShimmer 1.5s ease-in-out infinite alternate, particleDrift 10s linear infinite;
            pointer-events: none;
            z-index: -1;
            opacity: 0;
            transform: scale(0.8);
            animation-delay: 0.2s;
            animation-fill-mode: forwards;
        }

        @keyframes particleShimmer {
            0%, 100% { opacity: 0.6; transform: scale(1); }
            50% { opacity: 0.9; transform: scale(1.05); }
        }

        @keyframes particleDrift {
            0% { background-position: 0% 0%; }
            100% { background-position: 100% 100%; }
        }

        @media (max-width: 768px) {
            .loader-content {
                font-size: 3rem;
            }
            .moon-emoji {
                font-size: 2rem;
            }
        }

        #temporary-message-container {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 100000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
        }

        .temporary-message {
            background-color: #333;
            color: white;
            padding: 12px 25px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transform: translateY(-20px) scale(0.9);
            transition: opacity 0.4s ease-out, transform 0.4s ease-out;
            font-family: 'Quicksand', sans-serif;
            font-weight: 600;
            text-align: center;
            min-width: 250px;
            max-width: 90vw;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .temporary-message.show {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        .temporary-message.hide {
            opacity: 0;
            transform: translateY(-20px) scale(0.9);
        }

        .temporary-message.success {
            background: linear-gradient(135deg, #4CAF50, #2E8B57);
            border-color: #388E3C;
        }

        .temporary-message.error {
            background: linear-gradient(135deg, #F44336, #D32F2F);
            border-color: #C62828;
        }

        .temporary-message .icon {
            font-size: 1.2em;
        }

        #noka-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, #1e1b47, #3a2d6a);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            opacity: 1;
            transition: opacity 0.3s ease-out;
            overflow: hidden;
        }

        .loader-content {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Quicksand', cursive;
            font-weight: 600;
            font-size: 4rem;
            color: white;
            text-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
            letter-spacing: -0.5em;
            opacity: 0;
            animation: textReveal 0.8s ease-out forwards, glowPulse 1.5s infinite ease-in-out 0.8s;
            white-space: nowrap;
        }

        .loader-content span {
            display: inline-block;
            opacity: 0;
            transform: translateY(20px);
            animation: letterSlideIn 0.5s ease-out forwards;
        }

        .loader-content span:nth-child(1) { animation-delay: 0.1s; }
        .loader-content span:nth-child(2) { animation-delay: 0.2s; }
        .loader-content span:nth-child(3) { animation-delay: 0.3s; }
        .loader-content span:nth-child(4) { animation-delay: 0.4s; }
		.loader-content span:nth-child(5) { animation-delay: 0.5s; }
		.loader-content span:nth-child(6) { animation-delay: 0.6s; }
		.loader-content span:nth-child(7) { animation-delay: 0.7s; }

        @keyframes letterSlideIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* MODIFICATION : Réduire l'espacement négatif initial de -0.5em à -0.2em */
@keyframes textReveal {
    0% { letter-spacing: -0.2em; opacity: 0; filter: blur(10px); }
    50% { letter-spacing: 0.1em; opacity: 1; filter: blur(0px); }
    100% { letter-spacing: 0; opacity: 1; filter: blur(0px); }
}

        @keyframes glowPulse {
            0%, 100% { text-shadow: 0 0 15px rgba(250, 204, 21, 0.6), 0 0 25px rgba(250, 204, 21, 0.4); }
            50% { text-shadow: 0 0 25px rgba(250, 204, 21, 0.9), 0 0 40px rgba(250, 204, 21, 0.7); }
        }

        .moon-emoji {
            font-size: 2.5rem;
            color: #e0e0e0;
            margin-left: 1rem;
            opacity: 0;
            transform: rotate(0deg) scale(0.5);
            animation: moonAppear 0.5s ease-out 0.6s forwards, moonRotate 1.5s linear infinite 0.6s, moonGlow 2s ease-in-out infinite 0.6s;
        }

        @keyframes moonAppear {
            to {
                opacity: 1;
                transform: rotate(0deg) scale(1);
            }
        }

        @keyframes moonRotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes moonGlow {
            0%, 100% { filter: drop-shadow(0 0 8px rgba(224, 224, 224, 0.5)); }
            50% { filter: drop-shadow(0 0 15px rgba(224, 224, 224, 0.8)); }
        }

        @keyframes particleShimmer {
            0%, 100% { opacity: 0.6; transform: scale(1); }
            50% { opacity: 0.9; transform: scale(1.05); }
        }

        @keyframes particleDrift {
            0% { background-position: 0% 0%; }
            100% { background-position: 100% 100%; }
        }

        @media (max-width: 768px) {
    .loader-content {
        font-size: 3rem;
        /* AJOUT DE SECURITE : Forcer l'absence de retour à la ligne */
        white-space: nowrap;
        width: 100%;
        text-align: center;
    }
    .moon-emoji {
        font-size: 2rem;
    }
}

        .badge-item {
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #4a0e7a, #7e22ce);
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
        }

        .badge-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        }

        .badge-item i {
            font-size: 1.1em;
            color: #facc15;
        }

        /* NOUVEAUX STYLES POUR L'OPEN VIEW POST */
        .opened-post-fullscreen-view {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: calc(var(--vh, 1vh) * 100);
            background-color: white; /* Fond blanc par défaut */
            color: black; /* Texte noir par défaut */
            display: flex;
            flex-direction: column;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
        }

        .opened-post-fullscreen-view.active {
            opacity: 1;
            visibility: visible;
        }

        .opened-post-header {
            width: 100%;
            padding: 1rem;
            display: flex;
            justify-content: space-between; /* titre à gauche, bouton à droite */
            align-items: center;
            background-color: white;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            z-index: 10;
        }

        .opened-post-header .back-button {
            background: none;
            border: none;
            font-size: 1.8rem;
            color: black;
            cursor: pointer;
            transition: color 0.3s ease, transform 0.2s ease;
            align-items: center;
            padding: 0.5rem;
            border-radius: 50%;
            /* flex-direction: row;
            gap: 0.5rem; /* espace entre texte et icône */
        }

        .opened-post-header .back-button:hover {
            color: #8b5cf6;
            transform: scale(1.1);
        }

        .opened-post-main-content {
            flex-grow: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 1rem 1.5rem 6rem; /* Padding pour le contenu, plus d'espace en bas pour le formulaire de réponse */
            width: 100%;
            max-width: 800px; /* Limite la largeur sur grand écran pour la lisibilité */
            margin: 0 auto; /* Centre le contenu */
            box-sizing: border-box;
            background-color: white; /* Fond blanc par défaut */
            color: black; /* Texte noir par default */
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* Styles pour les statuts des posts ouverts */
        .opened-post-main-content.status-nouveau-popup {
            background-color: #F0FFF0; /* Light mint green */
            color: #155724; /* Dark green */
        }
        .opened-post-main-content.status-discussion-popup {
            background-color: #FFFBE0; /* Light yellow */
            color: #856404; /* Dark yellow-brown */
        }
        .opened-post-main-content.status-discussion-enflammee-popup {
            background-color: #FFF0F0; /* Very light red */
            color: #721c24; /* Dark red */
        }
        .opened-post-main-content.status-nouvelle-reponse-popup {
            background-color: #E0F7FA; /* Very light blue/cyan */
            color: #0C5460; /* Dark blue */
        }
        .opened-post-main-content.status-premier-post-popup {
            background-color: #F5F0FF; /* Very light purple */
            color: #4B2A8D; /* Dark purple */
        }
        .opened-post-main-content.status-top-1-tendance-popup {
            background-color: #FFF6E5; /* Very light orange */
            color: #8C4E0F; /* Dark orange-brown */
        }
        .opened-post-main-content.status-top-2-tendance-popup {
            background-color: #F8EFFF; /* Very light purplish */
            color: #7E3F8F; /* Dark purple */
        }
        .opened-post-main-content.status-top-3-tendance-popup {
            background-color: #FFEFEC; /* Very light brownish orange */
            color: #A65E38; /* Darker brown-orange */
        }

        /* Contenu du post principal ouvert */
        .post-detail-section {
            padding-bottom: 1rem; /* Espacement avant le séparateur */
        }

        .post-meta-opened-v2 {
            font-size: 0.95rem; /* Plus petit */
            color: #555; /* Couleur plus douce */
            margin-bottom: 1rem;
            line-height: 1.5;
        }

        .post-meta-opened-v2 strong.pseudo {
            color: #8b5cf6; /* Pseudo en violet */
            font-weight: 700;
        }

        .post-meta-opened-v2 .login-streak-display {
            font-size: 0.85rem;
        }

        .post-title-opened {
            font-size: 1.8rem; /* Titre plus gros */
            font-weight: 700;
            margin-bottom: 1rem;
            line-height: 1.3;
            color: #333;
        }
        @media (max-width: 768px) {
            .post-title-opened {
                font-size: 1.5rem;
            }
        }

        .post-content-opened {
            font-size: 1rem; /* Contenu normal */
            line-height: 1.6;
            color: #444;
            white-space: pre-wrap; /* Préserve les retours à la ligne du contenu */
            word-break: break-word;
        }

        .post-action-buttons-opened {
            display: flex;
            justify-content: flex-end; /* Aligner à droite */
            margin-top: 1.5rem;
        }

        .report-button-opened {
            background: none;
            border: 1px solid #ccc;
            color: #777;
            padding: 0.6rem 1rem;
            border-radius: 9999px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .report-button-opened:hover {
            background-color: #fdd;
            border-color: #f88;
            color: #c00;
        }

        /* Séparateur élégant */
        .elegant-separator {
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
            margin: 2rem 0;
        }

        /* Section Réponses et Formulaire de réponse */
        .section-title {
            font-size: 1.7rem; /* Titre "Réponses" / "Répondre au topic" */
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: #333;
        }
        @media (max-width: 768px) {
            .section-title {
                font-size: 1.4rem;
            }
        }

        .response-section {
            display: flex;
            flex-direction: column;
            gap: 1.5rem; /* Espacement entre les réponses */
            padding-bottom: 1rem;
        }

        .response-card-opened {
            background-color: #f9f9f9; /* Fond très léger pour chaque réponse */
            padding: 1rem;
            border-radius: 0.75rem;
            border: 1px solid #eee;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        .response-meta-opened {
            font-size: 0.85rem; /* Texte info réponse plus petit */
            color: #666;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
        }

        .response-meta-opened i.user-identifier-icon {
            font-size: 1.1em;
            margin-right: 0.4rem;
        }

        .response-meta-opened strong {
            font-weight: 600;
            color: #444;
        }

        .response-content-opened {
            font-size: 0.95rem; /* Contenu de la réponse */
            line-height: 1.5;
            color: #333;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .reply-form-section {
            padding-top: 1rem;
            padding-bottom: 2rem; /* Espace pour le bouton */
        }

        #response-content-textarea {
            width: 100%;
            min-height: 120px; /* Grande zone de texte */
            padding: 1rem;
            border-radius: 0.75rem;
            border: 1px solid #ddd;
            background-color: #f0f0f0;
            color: #333;
            font-size: 1rem;
            resize: vertical;
            margin-bottom: 1rem;
            box-sizing: border-box;
        }
        #response-content-textarea::placeholder {
            color: #888;
        }

        .submit-response-button-gamified {
            display: block;
            width: 100%;
            padding: 1rem 1.5rem;
            border-radius: 9999px; /* Forme pilule */
            font-weight: 700;
            font-size: 1.1rem;
            background: linear-gradient(135deg, #00C6FF, #0072FF); /* Dégradé bleu vif */
            color: white;
            border: none;
            box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .submit-response-button-gamified:hover {
            transform: translateY(-3px) scale(1.01);
            box-shadow: 0 8px 25px rgba(0, 114, 255, 0.4), 0 0 20px rgba(0, 198, 255, 0.6);
            background: linear-gradient(135deg, #00A3CC, #005BBF);
        }

        .submit-response-button-gamified::before {
            content: '🚀'; /* Icône animée */
            position: absolute;
            top: 50%;
            left: 15%;
            transform: translate(-50%, -50%) scale(0);
            font-size: 1.5em;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .submit-response-button-gamified:hover::before {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            animation: rocketBoost 0.6s ease-out forwards;
        }

        @keyframes rocketBoost {
            0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.5; }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        }

        /* MEDIA QUERIES pour la réactivité */
        @media (max-width: 640px) {
            .opened-post-main-content {
                padding: 1rem; /* Moins de padding sur mobile */
            }
            .post-title-opened {
                font-size: 1.4rem;
            }
            .section-title {
                font-size: 1.3rem;
            }
            .submit-response-button-gamified {
                font-size: 1rem;
                padding: 0.8rem 1rem;
            }
            .opened-post-header .back-button {
                font-size: 1.5rem;
            }
        }


        .new-post-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
   
    /* PAR CELLE-CI */
    height: calc(var(--vh, 1vh) * 100);

    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

        .new-post-popup-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .new-post-popup-content {
            background: linear-gradient(to bottom right, #2a2251, #4b3d7d);
            border-radius: 1.5rem;
            padding: 2rem;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 15px rgba(99, 102, 241, 0.3);
            color: white;
            position: relative;
            max-height: calc(var(--vh, 1vh) * 90);
            overflow-y: auto;
            transform: scale(0.9) translateY(20px);
            opacity: 0;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-in-out;
            border: 1px solid rgba(120, 90, 200, 0.4);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .new-post-popup-overlay.active .new-post-popup-content {
            transform: scale(1) translateY(0);
            opacity: 1;
        }

        .new-post-popup-content .close-button {
    position: absolute;
    top: -0.5rem; /* monte un peu plus que 1rem */
    left: 0.5rem; /* bien collé à gauche */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease !important;
	padding: 0.75rem 1.5rem;
	border-radius: 0.75rem;
}


        .new-post-popup-content .close-button:hover {
            color: #ffdb49;
            transform: rotate(90deg);
        }

        .new-post-popup-content h3 {
            font-size: 2.2rem;
            font-weight: 700;
            color: #ffdb49;
            text-shadow: 0 0 8px rgba(255, 219, 73, 0.5);
            margin-bottom: 1.5rem;
        }

        .new-post-popup-content .description {
            color: #c4b5fd;
            margin-bottom: 2rem;
            font-size: 1.1rem;
        }

        .new-post-type-buttons {
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
            width: 100%;
            max-width: 350px;
        }

        .new-post-type-button {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            font-weight: 700;
            font-size: 1.3rem;
            padding: 1.2rem 1.5rem;
            border-radius: 1rem;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
        }

        .new-post-type-button:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(139, 92, 246, 0.7);
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
        }

        .new-post-type-button i {
            font-size: 1.8em;
            color: #ffdb49; /* Jaune doré pour les icônes */
            text-shadow: 0 0 5px rgba(255, 219, 73, 0.8);
        }
        
        .new-post-type-button .sub-text {
            font-size: 0.8em;
            color: rgba(255, 255, 255, 0.8);
            margin-top: 0.2rem;
            display: block;
            text-transform: none; /* Annuler l'uppercase pour le sous-texte */
        }

        /* Effets de survol animés pour les boutons de type de post */
        .new-post-type-button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 300%;
            height: 300%;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            transform: translate(-50%, -50%) scale(0);
            opacity: 0;
            transition: all 0.7s ease-out;
            z-index: 0;
        }

        .new-post-type-button:hover::before {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }

        .new-post-type-button > *:not(.sub-text) {
            position: relative;
            z-index: 1;
        }


        /* Styles pour la création de post (Topic/Sondage) */
        .create-post-popup-content {
            background: linear-gradient(to bottom right, #1a1532, #2d2449);
            border: 2px solid #6366f1;
            box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
            max-width: 600px; /* Plus large pour le contenu */
            padding: 2.5rem;
            text-align: left; /* Réinitialiser l'alignement pour les champs */
        }

        .create-post-popup-content h3 {
            text-align: center;
            margin-bottom: 2rem;
        }

        .create-post-input,
        .create-post-textarea {
            width: 100%;
            padding: 1rem;
            border-radius: 0.75rem;
            background-color: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.4);
            color: white;
            font-size: 1rem;
            margin-bottom: 1.2rem;
            transition: all 0.3s ease;
        }

        .create-post-input::placeholder,
        .create-post-textarea::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .create-post-input:focus,
        .create-post-textarea:focus {
            outline: none;
            border-color: #8b5cf6;
            box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.4);
        }

        .create-post-textarea {
            min-height: 250px;
            resize: vertical;
        }

        .post-form-section {
            width: 100%;
        }

        .tags-label {
            color: #c4b5fd;
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.8rem;
            display: block;
        }

        .new-tag-checkbox-container label {
            background-color: rgba(139, 92, 246, 0.2);
            border: 1px solid rgba(139, 92, 246, 0.5);
            color: #c4b5fd;
            font-weight: 600;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
        }
        .new-tag-checkbox-container label:hover {
            background-color: rgba(139, 92, 246, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(139, 92, 246, 0.3);
        }
        .new-tag-checkbox-container input[type="checkbox"] {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            display: inline-block;
            position: relative;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            cursor: pointer;
            border-radius: 6px;
            border: 2px solid #a78bfa;
            background-color: rgba(139, 92, 246, 0.1);
            transition: all 0.3s ease;
            vertical-align: middle;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }
        .new-tag-checkbox-container input[type="checkbox"]:checked {
            background: linear-gradient(45deg, #a78bfa, #8b5cf6);
            border-color: #c4b5fd;
            box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
        }
        .new-tag-checkbox-container input[type="checkbox"]:checked::after {
            content: '✓';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            color: white;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(1);
            font-size: 14px;
            opacity: 1;
            transition: transform 0.2s ease-out, opacity 0.2s ease-out;
        }
        .new-tag-checkbox-container input[type="checkbox"]:not(:checked)::after {
            content: '';
            transform: translate(-50%, -50%) scale(0);
            opacity: 0;
        }
        .new-tag-checkbox-container input[type="checkbox"]:hover {
            border-color: #c4b5fd;
            box-shadow: 0 0 15px rgba(167, 139, 250, 0.7);
            transform: scale(1.05);
        }


        .poll-option-input-new {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            margin-bottom: 0.8rem;
        }
        .poll-option-field-new {
            flex-grow: 1;
            padding: 0.75rem 1rem;
            border-radius: 0.75rem;
            background-color: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.4);
            color: white;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        .poll-option-field-new:focus {
            outline: none;
            border-color: #8b5cf6;
            box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.4);
        }
        .remove-poll-option-button-new {
            background-color: #ef4444 !important;
            color: white;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
            transition: all 0.2s ease-in-out;
        }
        .remove-poll-option-button-new:hover {
            background-color: #dc2626 !important;
            transform: scale(1.1) !important;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
        }
        .add-option-button-new {
            background: linear-gradient(135deg, #00c6ff, #0072ff);
            color: white;
            font-weight: 700;
            padding: 0.8rem 1.5rem;
            border-radius: 9999px; /* Pill shape */
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
            transition: all 0.3s ease;
            width: 100%;
            margin-top: 1rem;
            margin-bottom: 1.5rem;
        }
        .add-option-button-new:hover {
            transform: translateY(-3px) scale(1.01);
            box-shadow: 0 8px 25px rgba(0, 114, 255, 0.4), 0 0 20px rgba(0, 198, 255, 0.6);
            background: linear-gradient(135deg, #00a3cc, #005bbf);
        }
        .add-option-button-new i {
            font-size: 1.2em;
        }


        .publish-button-gamified {
            display: block;
            width: 100%;
            padding: 1rem 1.5rem;
            border-radius: 9999px; /* Forme pilule */
            font-weight: 700;
            font-size: 1.1rem;
            background: linear-gradient(135deg, #a78bfa, #8b5cf6); /* Dégradé violet vif */
            color: white;
            border: none;
            box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 1.5rem;
        }

        .publish-button-gamified:hover {
            transform: translateY(-3px) scale(1.01);
            box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4), 0 0 20px rgba(167, 139, 250, 0.6);
            background: linear-gradient(135deg, #7c3aed, #6366f1);
        }

        .publish-button-gamified::before {
            content: '✨'; /* Icône animée */
            position: absolute;
            top: 50%;
            left: 15%;
            transform: translate(-50%, -50%) scale(0);
            font-size: 1.5em;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .publish-button-gamified:hover::before {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            animation: sparklePulse 0.6s ease-out forwards;
        }

        @keyframes sparklePulse {
            0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.5; }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        }

        @media (max-width: 640px) {
            .new-post-popup-content, .create-post-popup-content {
                padding: 1.5rem;
            }
            .new-post-popup-content h3, .create-post-popup-content h3 {
                font-size: 1.8rem;
            }
            .new-post-type-button {
                font-size: 1.1rem;
                padding: 1rem;
            }
            .new-post-type-button i {
                font-size: 1.5em;
            }
            .publish-button-gamified {
                font-size: 1rem;
                padding: 0.8rem 1rem;
            }
        }

        /* Styles for Top 10 Ranking */
        .ranking-section {
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
        }

        .ranking-section h4 {
            font-size: 1.8rem;
            font-weight: 700;
            color: #facc15; /* Yellow/Amber color for title */
            text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
            margin-bottom: 1.5rem;
        }

        .ranking-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }

        .ranking-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 90%;
            max-width: 350px;
            padding: 12px 20px;
            border-radius: 15px;
            background: linear-gradient(135deg, #3a2d6a, #1e1b47);
            color: white;
            font-size: 1.1rem;
            font-weight: 600;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .ranking-item:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        }

        .ranking-item .rank {
            font-size: 1.3em;
            font-weight: 800;
            margin-right: 15px;
            color: #ffdb49; /* Golden color for rank */
            text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
        }

        .ranking-item.top-1 {
            background: linear-gradient(135deg, #FFD700, #FFA500); /* Gold */
            color: #333;
            border-color: #FFEA00;
            box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
            transform: scale(1.05);
        }
        .ranking-item.top-1 .rank {
            color: #A0522D; /* Darker brown for contrast */
            text-shadow: none;
        }

        .ranking-item.top-2 {
            background: linear-gradient(135deg, #C0C0C0, #A9A9A9); /* Silver */
            color: #333;
            border-color: #D3D3D3;
            box-shadow: 0 6px 20px rgba(192, 192, 192, 0.6);
            transform: scale(1.03);
        }
        .ranking-item.top-2 .rank {
            color: #4F4F4F; /* Darker gray for contrast */
            text-shadow: none;
        }

        .ranking-item.top-3 {
            background: linear-gradient(135deg, #CD7F32, #8B4513); /* Bronze */
            color: white;
            border-color: #DAA520;
            box-shadow: 0 6px 20px rgba(205, 127, 50, 0.6);
            transform: scale(1.01);
        }
        .ranking-item.top-3 .rank {
            color: #5A2D0C; /* Darker brown for contrast */
            text-shadow: none;
        }

        .ranking-item .pseudo {
            flex-grow: 1;
            text-align: left;
            margin-right: 10px;
        }

        .ranking-item .flames {
            font-weight: 700;
            color: #ef4444; /* Red for flames */
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .ranking-item .flames i {
            font-size: 1.1em;
        }
		
		#ambassador-gift-button {
    /* Les classes tailwind gèrent déjà la plupart des styles de base */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

#ambassador-gift-button:hover div {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

#gift-notification-dot {
    animation: pulse-red-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-red-dot {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.8; }
}

.ambassador-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;

    /* PAR CELLE-CI */
    height: calc(var(--vh, 1vh) * 100);

    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.ambassador-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ambassador-popup-content {
    background: linear-gradient(160deg, #2a0a52, #4b1a7d, #6a2a9a); 
    border-radius: 2.5rem; 
    padding: 2rem;
    max-width: 500px; 
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 215, 0, 0.6); 
    color: white;
    position: relative;

    /* PAR CELLE-CI */
    max-height: calc(var(--vh, 1vh) * 90); /* 90% de la hauteur visible */

    overflow-y: auto;
    transform: scale(0.8) translateY(50px) rotateX(10deg); 
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease-in-out;
    border: 4px solid #FFD700; 
    text-align: center;
}

.ambassador-popup-overlay.active .ambassador-popup-content {
    transform: scale(1) translateY(0) rotateX(0deg);
    opacity: 1;
}

.ambassador-popup-content::before {
    content: '✨'; /* Étoiles en fond */
    position: absolute;
    top: 10%;
    left: 5%;
    font-size: 4em;
    opacity: 0.15;
    transform: rotate(20deg);
}
.ambassador-popup-content::after {
    content: '🌟';
    position: absolute;
    bottom: 15%;
    right: 8%;
    font-size: 5em;
    opacity: 0.1;
    transform: rotate(-30deg);
}

.close-button-ambassador {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem; /* Plus grande */
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.close-button-ambassador:hover {
    color: #FFD700; /* Jaune doré au survol */
    transform: rotate(90deg) scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.ambassador-title {
    font-family: 'Quicksand', cursive; /* Police stylisée */
    font-size: 2.8rem; /* Très grand titre */
    font-weight: 800; /* Extra gras */
    color: #FFECB3; /* Jaune très clair */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.5); /* Effet néon */
    margin-bottom: 2rem;
    line-height: 1.2;
}

.ambassador-description, .ambassador-description-small, .ambassador-thanks, .ambassador-call-to-action {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #E0BBE4; /* Violet clair pour le texte principal */
    margin-bottom: 1rem;
    font-weight: 500;
}

.ambassador-description strong, .ambassador-description-small strong {
    font-weight: 700;
    color: #FFD700; /* Jaune doré pour les mots clés */
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.ambassador-warning {
    background: rgba(255, 0, 0, 0.1); /* Fond rouge très léger pour l'avertissement */
    border: 2px dashed #FFD700; /* Bordure pointillée jaune */
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 80%;
    font-size: 1.1rem;
    color: #FFF; /* Blanc pour le texte d'avertissement */
    font-weight: 600;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
    0%, 100% { border-color: #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
    50% { border-color: #FFA500; box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); }
}

.ambassador-call-to-action {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFD700; /* Jaune doré éclatant */
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.ambassador-share-button {
    display: block;
    width: 80%; /* Bouton plus large */
    max-width: 400px;
    margin: 0 auto;
    padding: 1.2rem 2.5rem;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 1.4rem; /* Texte plus grand */
    background: linear-gradient(135deg, #FF6B6B, #EE4266); /* Dégradé rouge/rose vif */
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(238, 66, 102, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: glow-share-button 1.8s infinite alternate; /* Animation de glow */
}

.ambassador-share-button:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 12px 35px rgba(238, 66, 102, 0.7), 0 0 30px rgba(255, 107, 107, 0.8);
    background: linear-gradient(135deg, #FF4F4F, #CC3355);
}

.ambassador-share-button::before {
    content: '💖'; /* Icône animée */
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.8em;
    opacity: 0;
    transition: all 0.4s ease;
}

.ambassador-share-button:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: heart-pop 0.6s ease-out forwards;
}

@keyframes heart-pop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes glow-share-button {
    0% { box-shadow: 0 8px 25px rgba(238, 66, 102, 0.5); }
    100% { box-shadow: 0 8px 35px rgba(255, 107, 107, 0.7); }
}

/* Media Queries pour la réactivité de la popup ambassadeur */
@media (max-width: 768px) {
    .ambassador-popup-content {
        padding: 2rem;
        border-radius: 1.5rem;
    }
    .close-button-ambassador {
        font-size: 1.5rem;
        top: 1rem;
        left: 1rem;
    }
    .ambassador-title {
        font-size: 2rem;
    }
    .ambassador-description, .ambassador-description-small, .ambassador-thanks, .ambassador-call-to-action {
        font-size: 1rem;
    }
    .ambassador-warning {
        padding: 1rem;
        font-size: 0.9rem;
    }
    .ambassador-share-button {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
        width: 90%;
    }
}

        .swipe-hint-container {
    position: absolute;
    bottom: 25%; 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20; 
    pointer-events: none; 
    opacity: 0; 
    transition: opacity 0.3s ease-out;
    color: white; /* Texte bien clair */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* Ombre plus forte et nette */
}

.swipe-hint-container.visible {
    opacity: 1; 
}

.swipe-hint-icon {
    font-size: 2.5rem; 
    animation: bounceUp 1.5s infinite ease-in-out;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 1); /* Ombre bien marquée pour l'icône */
}

.swipe-hint-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 1); /* Ombre bien marquée pour le texte */
	animation: bounceUp 1.5s infinite ease-in-out;
}

@keyframes bounceUp {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px); 
        opacity: 1;
    }
}

/* --- Animation de Série de Connexion (Flammes) --- */
#streak-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    /* Correction pour hauteur mobile */
    height: calc(var(--vh, 1vh) * 100);
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11000; /* Au-dessus de tout */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

#streak-animation-overlay.active {
    opacity: 1;
    visibility: visible;
}

#streak-animation-content {
    background: linear-gradient(160deg, #2a0a52, #4b1a7d);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.5);
    border: 2px solid #FFD700;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    transform: scale(0.9);
    opacity: 0;
    /* Animation de "pop" gratifiante */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

#streak-animation-overlay.active #streak-animation-content {
    transform: scale(1);
    opacity: 1;
}

.streak-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffdb49;
    text-shadow: 0 0 8px rgba(255, 219, 73, 0.5);
    margin-bottom: 1rem;
}

.streak-flame-icon {
    font-size: 6rem; /* Grosse flamme */
    color: #ff9900;
    margin-bottom: 1.5rem;
    /* Animation de pulsation de la flamme */
    animation: flamePulse 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 15px #ff4e00) drop-shadow(0 0 30px #ec9f05);
}

@keyframes flamePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        /* Glow plus intense au pic */
        filter: drop-shadow(0 0 25px #ff4e00) drop-shadow(0 0 50px #ec9f05);
    }
}

#streak-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    font-weight: 800;
}

#streak-old-count,
#streak-new-count {
    font-size: 3.5rem;
    line-height: 1;
}

/* --- Logique d'animation des nombres --- */

/* 1. État initial de l'ancien nombre */
#streak-old-count {
    color: #c4b5fd; /* Violet pâle */
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 2. État initial du nouveau nombre (caché) */
#streak-new-count {
    color: #ffdb49; /* Jaune doré (plus gratifiant) */
    opacity: 0;
    transform: scale(0.7);
    /* L'animation se déclenche avec un délai de 0.3s */
    transition: opacity 0.3s ease 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

/* 3. État initial du "+1" (caché) */
.streak-plus-one {
    font-size: 2.5rem;
    color: #a2e6b8; /* Vert "validé" */
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px) scale(0.5);
    /* L'animation se déclenche avec un délai de 0.1s */
    transition: opacity 0.4s ease 0.1s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

/* 4. Quand l'animation est déclenchée (via la classe .animating) */

/* L'ancien nombre disparaît */
#streak-animation-content.animating #streak-old-count {
    opacity: 0;
    transform: scale(0.7);
}

/* Le nouveau nombre apparaît */
#streak-animation-content.animating #streak-new-count {
    opacity: 1;
    transform: scale(1);
}

/* Le "+1" apparaît */
#streak-animation-content.animating .streak-plus-one {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- STYLES POUR LE NOUVEAU SYSTÈME DE PARRAINAGE --- */

/* --- 1. Nouveau Bouton de Parrainage --- */
.referral-button-container {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.referral-button-container:hover {
    transform: scale(1.1);
}
.referral-icon-wrapper {
    position: relative;
    width: 64px; /* w-16 */
    height: 64px; /* h-16 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #8B5CF6, #6366F1); /* Violet/Indigo */
    border: 3px solid #C4B5FD; /* Bordure lavande */
}
.referral-main-icon {
    font-size: 1.875rem; /* text-3xl */
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.referral-gift-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1.2rem;
    animation: referral-gift-bounce 2s infinite ease-in-out;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.4));
}
@keyframes referral-gift-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-8px) rotate(5deg); }
    60% { transform: translateY(-4px) rotate(-3deg); }
}
.referral-notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    background-color: #EF4444; /* bg-red-500 */
    border-radius: 9999px;
    border: 2px solid white;
    box-shadow: 0 0 6px #EF4444;
    animation: pulse-red-dot 1.5s infinite ease-in-out;
    display: none; /* Caché par défaut */
}

/* --- 2. Nouvelle Popup de Parrainage --- */
.referral-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.referral-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
.referral-popup-content {
    background: linear-gradient(160deg, #1f1d3a, #3a2d6a); /* Fond doux et sombre */
    border-radius: 1.5rem; 
    padding: 1.5rem;
    width: 90%;
    max-width: 500px; 
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(196, 181, 253, 0.5); 
    color: white;
    position: relative;
    max-height: calc(var(--vh, 1vh) * 90);
    overflow-y: auto;
    border: 1px solid rgba(196, 181, 253, 0.3);
    text-align: center;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.referral-popup-overlay.active .referral-popup-content {
    transform: scale(1);
    opacity: 1;
}
.close-button-referral {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}
.close-button-referral:hover {
    color: #ffdb49;
    transform: rotate(90deg);
}

/* Compte à rebours */
.referral-countdown {
    background-color: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    color: #E0E0E0;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.referral-countdown strong {
    color: #C4B5FD;
    font-weight: 700;
}

/* Titres et Compteur */
.referral-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffdb49;
    text-shadow: 0 0 10px rgba(255, 219, 73, 0.6);
    margin-bottom: 0.5rem;
}
.referral-description {
    font-size: 1.1rem;
    color: #E0E0E0;
    margin-bottom: 1.5rem;
}
.referral-counter-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.referral-counter-label {
    font-size: 1rem;
    color: #C4B5FD;
}
.referral-counter-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffdb49;
}

/* Barre de progression */
.referral-progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 9999px;
    margin-bottom: 2.5rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
.referral-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.7);
}
.progress-milestone {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #1f1d3a;
    border: 3px solid #8b5cf6;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}
.progress-milestone.unlocked {
    background-color: #ffdb49;
    border-color: #ffdb49;
}

/* Paliers de récompense */
.referral-tiers-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-align: left;
}
.referral-tier {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0.6; /* Grisé par défaut */
}
.referral-tier.unlocked {
    opacity: 1;
    background-color: rgba(167, 139, 250, 0.15);
    border-color: #a78bfa;
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.3);
}
.referral-tier.next-tier {
    opacity: 1;
    background-color: rgba(255, 219, 73, 0.1);
    border-color: #ffdb49;
    transform: scale(1.02);
}
.tier-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    color: #C4B5FD;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}
.referral-tier.unlocked .tier-icon-wrapper {
    background-color: #8b5cf6;
    color: white;
}
.referral-tier.next-tier .tier-icon-wrapper {
    background-color: #ffdb49;
    color: #1f1d3a;
}
.tier-description {
    flex-grow: 1;
}
.tier-description strong {
    color: white;
    font-size: 1rem;
}
.tier-description small {
    display: block;
    color: #E0E0E0;
    font-size: 0.85rem;
}
.referral-tier.unlocked .tier-description strong {
    color: #C4B5FD;
}
.tier-status {
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #C4B5FD;
}
.referral-tier.unlocked .tier-status {
    color: #a2e6b8; /* Vert succès */
}
.referral-tier.unlocked .tier-status i {
    font-size: 1.2em;
}

/* Bouton de partage */
.referral-share-button2 {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.referral-share-button2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5);
}

/* --- 3. Modal Cadeau "Cercle de l'Aube" --- */
.referral-gift-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background-color: rgba(20, 15, 40, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001; /* Au-dessus de la popup principale */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.referral-gift-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
.referral-gift-popup-content {
    background: linear-gradient(160deg, #3a2d6a, #1f1d3a);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 50px rgba(255, 219, 73, 0.5);
    border: 2px solid #ffdb49;
    text-align: center;
    color: white;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.referral-gift-popup-overlay.active .referral-gift-popup-content {
    transform: scale(1);
    opacity: 1;
}
.gift-popup-icon {
    font-size: 4rem;
    animation: referral-gift-bounce 2s infinite ease-in-out;
    margin-bottom: 1rem;
}
.gift-popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffdb49;
    margin-bottom: 1rem;
}
.gift-popup-description {
    font-size: 1.1rem;
    color: #E0E0E0;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.gift-popup-description strong {
    color: #ffdb49;
    font-weight: 700;
}
.gift-popup-button {
    background: linear-gradient(90deg, #ffdb49, #facc15);
    color: #1f1d3a;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 219, 73, 0.3);
}
.gift-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 219, 73, 0.5);
}

/* --- 4. Confettis (partagés) --- */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 100;
}
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffdb49;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(-100px) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotateZ(720deg); opacity: 0; }
}
.confetti:nth-child(2n) { background-color: #a78bfa; }
.confetti:nth-child(3n) { background-color: #f472b6; }
.confetti:nth-child(4n) { background-color: #a2e6b8; }

/* --- 5. Nouveau Classement Ambassadeurs --- */
.ambassador-ranking {
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.ambassador-ranking h4 {
    color: #C4B5FD; /* Lavande */
}
.ambassador-ranking-subtitle {
    font-size: 0.95rem;
    color: #E0E0E0;
    margin-bottom: 1.5rem;
}
.ranking-item .invites {
    font-weight: 700;
    color: #a2e6b8; /* Vert menthe */
    display: flex;
    align-items: center;
    gap: 5px;
}
.ranking-item .invites i {
    font-size: 1em;
}
/* Ajuster les couleurs des top 3 pour le nouveau thème */
.ranking-item.top-1 {
    background: linear-gradient(135deg, #FFECB3, #FFD700); /* Or clair */
    color: #3a2d6a;
}
.ranking-item.top-2 {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD); /* Argent */
    color: #3a2d6a;
}
.ranking-item.top-3 {
    background: linear-gradient(135deg, #D7BFA6, #B88A60); /* Bronze */
    color: white;
}
.ranking-item.top-1 .rank,
.ranking-item.top-2 .rank,
.ranking-item.top-3 .rank {
    color: #3a2d6a;
}
.ranking-item.top-3 .rank {
    color: white;
}

/* --- 6. Placeholders Récompenses Profil --- */
.profile-reward-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.profile-reward-container.disabled {
    opacity: 0.6;
    filter: grayscale(50%);
}
.profile-reward-label {
    font-size: 1rem;
    font-weight: 600;
    color: #C4B5FD;
    margin-bottom: 0.75rem;
    display: block;
}
.reward-lock-message {
    font-size: 0.85rem;
    color: #ffb3b3;
    display: block;
    text-align: center;
    margin-top: 0.75rem;
}
.profile-reward-container:not(.disabled) .reward-lock-message {
    display: none;
}
/* Icônes */
.icon-select-options, .theme-select-options {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.icon-option, .theme-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #8b5cf6;
    background-color: rgba(139, 92, 246, 0.2);
    color: #C4B5FD;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}
.theme-option {
    width: auto;
    padding: 0 1rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    gap: 0.5rem;
    display: flex;
    align-items: center;
}
.profile-reward-container:not(.disabled) button {
    cursor: pointer;
}
.profile-reward-container:not(.disabled) .icon-option:hover,
.profile-reward-container:not(.disabled) .theme-option:hover {
    background-color: #8b5cf6;
    color: white;
    transform: scale(1.1);
}
.icon-option.selected, .theme-option.selected {
    background-color: #8b5cf6;
    color: white;
    border-color: #ffdb49;
}

/* --- 7. Thème Sombre (Contrôlé par JS) --- */
body.dark-mode {
    background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
}
/* Vous pouvez ajouter plus de styles .dark-mode ... pour affiner */

/* --- 8. Flux d'ouverture de cadeau (Landing Page) --- */
.referral-landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background: linear-gradient(to bottom, #1e1b47, #3a2d6a); /* Fond Noka */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}
.referral-landing-overlay.active {
    opacity: 1;
    visibility: visible;
}
.referral-landing-content {
    position: relative;
    width: 90%;
    max-width: 420px;
    text-align: center;
    color: white;
}
.gift-step {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease forwards;
}
.gift-step.active {
    display: flex;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cadeau (Étape 1) */
.gift-referrer-info {
    font-size: 1.1rem;
    color: #E0E0E0;
    margin-bottom: 1rem;
}
.gift-referrer-info strong {
    color: #C4B5FD;
    font-weight: 700;
}
.gift-box {
    position: relative;
    width: 150px;
    height: 120px;
    margin: 2rem auto;
    cursor: pointer;
    animation: gift-float 3s infinite ease-in-out;
}
@keyframes gift-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.gift-box:hover {
    animation-play-state: paused;
    transform: scale(1.05);
}
.gift-lid {
    width: 170px;
    height: 40px;
    background-color: #a78bfa;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: -10px;
    z-index: 2;
    transition: transform 0.3s ease;
}
.gift-body {
    width: 150px;
    height: 100px;
    background-color: #8b5cf6;
    border-radius: 10px;
    position: absolute;
    bottom: -20px;
    left: 0;
    z-index: 1;
}
.gift-bow {
    position: absolute;
    width: 20px;
    height: 140px;
    background-color: #ffdb49;
    left: 65px;
    top: -10px;
    z-index: 3;
}
.gift-bow::before {
    content: '';
    position: absolute;
    width: 170px;
    height: 20px;
    background-color: #ffdb49;
    left: -75px;
    top: 10px;
}
.gift-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
}
.gift-sparkles::before, .gift-sparkles::after {
    content: '✨';
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: sparkle-glow 2s infinite ease-in-out;
}
.gift-sparkles::after {
    top: -20px; left: 10px; animation-delay: 0.5s;
}
.gift-sparkles::before {
    top: 30px; left: 80%; animation-delay: 1s;
}
@keyframes sparkle-glow {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}
/* Animation de clic sur cadeau */
.gift-box.clicked-1 {
    animation: gift-shake 0.4s;
}
.gift-box.clicked-1 .gift-lid { background-color: #b39afc; }
.gift-box.clicked-2 .gift-lid {
    animation: gift-open 1s forwards ease-in-out;
}
@keyframes gift-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px) rotate(-3deg); }
    75% { transform: translateX(8px) rotate(3deg); }
}
@keyframes gift-open {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(-15deg) scale(1.1); }
    100% { transform: translateY(-100px) rotate(-20deg) scale(0.8); opacity: 0; }
}

.gift-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffdb49;
    margin-bottom: 0.5rem;
}
.gift-subtitle {
    font-size: 1rem;
    color: #E0E0E0;
    opacity: 0.8;
}

/* Révélation (Étape 2) */
.gift-badge-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
    margin: 2rem auto;
    border: 4px solid #ffdb49;
    box-shadow: 0 0 30px rgba(255, 219, 73, 0.7);
    animation: badge-reveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes badge-reveal {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.gift-badge-reveal i {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}
.gift-badge-reveal strong {
    font-size: 1.2rem;
    font-weight: 700;
}
.gift-description {
    font-size: 1.1rem;
    color: #E0E0E0;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.gift-noka-description {
    font-size: 1rem;
    color: #C4B5FD;
    line-height: 1.5;
    margin-bottom: 2rem;
}
.gift-cta-button {
    background: linear-gradient(90deg, #ffdb49, #facc15);
    color: #1f1d3a;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 219, 73, 0.3);
    animation: pulseButton 2s infinite ease-in-out;
}
.gift-cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 219, 73, 0.5);
}

/* --- AMÉLIORATIONS DESIGN PARRAINAGE (Segments de progression) --- */

/* Supprimer la marge de l'ancienne barre de progression */
.referral-progress-bar-container {
    display: none; /* Cache l'ancienne barre */
}
.referral-tiers-container {
    margin-bottom: 2rem; /* Rétablit la marge */
}

/* Style pour les NOUVEAUX segments de progression */
.referral-progress-segment {
    width: 80%;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 9999px;
    margin: 1rem auto; /* Espace entre les paliers */
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.progress-segment-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
    border-radius: 9999px;
    width: 0%; /* Caché par défaut */
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.7);
}

.progress-segment-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    transition: opacity 0.5s ease;
}

/* Quand le segment est débloqué */
.referral-progress-segment.unlocked .progress-segment-fill {
    width: 100%; /* Remplir la barre */
}

.referral-progress-segment.unlocked .progress-segment-icon {
    opacity: 0; /* Cacher le cadenas */
}


/* --- CHANGEMENT COULEUR BOUTON PARTAGE --- */

.referral-share-button {
    /* NOUVELLE COULEUR: Dégradé Or/Jaune */
    background: linear-gradient(90deg, #ffdb49, #facc15);
    /* NOUVELLE COULEUR: Texte sombre pour contraste */
    color: #1f1d3a;
    font-weight: 700; /* Rendre plus "gras" */
    font-size: 1.1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    /* NOUVELLE OMBRE: Lueur dorée douce */
    box-shadow: 0 4px 15px rgba(255, 219, 73, 0.3);
    filter: drop-shadow(0 0 16px rgba(255, 223, 90, 0.55));
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    /* Garder l'animation, mais elle sera plus visible */
    animation: pulseButton 2s infinite ease-in-out; 
}

.referral-share-button:hover {
    transform: translateY(-2px);
    /* NOUVELLE OMBRE DE SURVOL: Lueur dorée intense */
    box-shadow: 0 6px 20px rgba(255, 219, 73, 0.5);
}

/* --- AMÉLIORATIONS DESIGN PARRAINAGE (Zeigarnik) --- */

/* Met en valeur le prochain palier à atteindre */
.referral-tier.next-tier {
    opacity: 1;
    background-color: rgba(255, 219, 73, 0.1);
    border-color: #ffdb49;
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 219, 73, 0.3);
}

.referral-tier.next-tier .tier-icon-wrapper {
    background-color: #ffdb49;
    color: #1f1d3a;
    animation: pulseButton 1.5s infinite ease-in-out;
}

/* Style pour le Palier 1 (toujours débloqué) */
.referral-tier#tier-0 {
    opacity: 1;
    background-color: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.4);
}

.referral-tier#tier-0 .tier-icon-wrapper {
    background-color: #8b5cf6;
    color: white;
}

.referral-tier#tier-0 .tier-status {
    color: #a2e6b8; /* Vert succès */
}

/* Style pour le jalon 0 (toujours débloqué) */
.referral-progress-bar-container .progress-milestone:nth-child(1) {
    background-color: #ffdb49;
    border-color: #ffdb49;
}

/* Style pour la double récompense (Palier 2) */
.tier-icon-wrapper.dual-reward {
    position: relative;
    padding-left: 5px; /* Décaler pour centrer les deux */
}

.tier-icon-wrapper.dual-reward i:first-child {
    transform: translateX(-5px) scale(0.9);
    opacity: 0.9;
}
.tier-icon-wrapper.dual-reward i:last-child {
    transform: translateX(5px) scale(0.9);
    opacity: 0.9;
}

/* Amélioration de l'icône de partage */
.referral-share-button {
    animation: pulseButton 2s infinite ease-in-out;
}

/*
Correction pour les confettis de parrainage
*/
#referral-confetti-container {
    /* On le fait passer par-dessus l'overlay (z-index: 10000) */
    z-index: 9999999;

    /* On le fait couvrir tout l'écran */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* (Le style .confetti-container d'origine s'occupe déjà 
       de pointer-events: none; et overflow: hidden;) */
}

/*
 * Masque l'icône de verrouillage pour le segment de progression en cours (50%)
 * en utilisant !important pour surcharger toute règle précédente.
 */
.referral-progress-segment.next-segment .progress-segment-icon {
    display: none !important; 
}


.post-meta strong.pseudo {
    /* La couleur désirée */
    color: #0e7581 !important;
}

.post-last-response strong {
    /* La couleur désirée */
    color: #374151 !important;
}

.response-meta-opened strong {
    font-weight: 700 !important;
}

/* --- AJOUT POUR AFFICHER/MASQUER LE MOT DE PASSE --- */
.password-container {
    position: relative;
    width: 100%;
}

/* Cible les deux inputs pour ajouter l'espace à droite */
#register-password,
#popup-login-password {
    /* Force l'espace pour l'icône (important pour surcharger) */
    padding-right: 3rem !important; 
}

.toggle-password-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5); /* Couleur de base */
    transition: color 0.3s ease;
}

/* Position pour l'icône du formulaire d'inscription */
#register-password + .toggle-password-icon {
    right: 1.25rem; /* Basé sur le padding d'origine de .step-input */
}

/* Position pour l'icône du popup de connexion */
#popup-login-password + .toggle-password-icon {
    right: 1rem; /* Basé sur le padding p-3 (0.75rem) */
}

.toggle-password-icon:hover {
    color: rgba(255, 255, 255, 0.9);
}
/* --- FIN DE L'AJOUT --- */

/* --- NOUVEAU: Conteneur pour positionner les badges --- */
.button-with-badges-wrapper {
    /* Ajouté pour permettre le positionnement absolu du badge "NOUVEAU !" */
    position: relative;
    /* Prend l'espace pour s'aligner avec l'autre bouton */
    width: 100%; 
    max-width: 350px; 
}

/* --- NOUVEAU: Badge "NOUVEAU !" superposé (à l'extérieur) --- */
.new-feature-badge {
    position: absolute;
    /* Positionnement "entre le coin haut gauche et en dehors" */
    top: -6px;
    left: -10px;
    background-color: #EF4444; /* Rouge vif */
    color: white;
    font-size: 0.65rem; /* Fin et discret */
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 9999px; /* Forme pilule */
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 10; /* Au-dessus du bouton */
    /* Petite animation pour attirer l'œil */
    animation: pulse-red-dot 2s infinite ease-in-out;
    transform: rotate(-10deg); /* Légère rotation pour le style */
}

/* --- CORRECTION: Icône de cadenas DANS le bouton --- */
#select-poll-button {
    /* Important pour positionner le cadenas DANS le bouton */
    position: relative; 
}

.lock-icon {
    position: absolute;
    /* Positionnement DANS le coin bas-droit du bouton */
    font-size: 2rem;
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2; /* S'assure qu'il est au-dessus du texte du bouton */
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
    transform: scale(0.8); 
}

/* --- NOUVEAU: Style pour l'état verrouillé du bouton --- */
/* Cible le bouton lui-même, pas l'enveloppe */
.new-post-type-button.locked {
    /* Faible luminosité */
    filter: brightness(0.6);
    cursor: not-allowed;
}

/* Affiche le cadenas quand le bouton a la classe .locked */
.new-post-type-button.locked .lock-icon {
    opacity: 1;
    transform: scale(1); /* Apparaît en grandissant */
}

/* Empêche l'effet de survol sur un bouton verrouillé */
.new-post-type-button.locked:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* Assure que l'animation "pulse" du badge "NOUVEAU !" existe */
@keyframes pulse-red-dot {
    0% { transform: scale(0.95) rotate(-10deg); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.05) rotate(-10deg); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95) rotate(-10deg); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ========================================= */
/* --- POPUP CADEAU & CERCLE DE L'AUBE --- */
/* ========================================= */

/* 1. Overlay (Fond d'écran) */
.referral-gift-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilise un fond sombre et une légère transparence pour obscurcir le site */
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px); /* Léger flou pour mettre en avant la popup */
    opacity: 0; /* Caché par défaut */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Classe à ajouter par JavaScript pour afficher la popup */
.referral-gift-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* 2. Contenu de la Popup (Le Cœur du Cadeau) */
.referral-gift-popup-content {
    /* Utilise une couleur sombre mais distincte de l'arrière-plan du site (ex: le 3a2d6a de votre gradient) */
    background: #3a2d6a; 
    border: 3px solid #facc15; /* Bordure DORÉE pour l'effet cadeau */
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    position: relative;
    color: #f0f0f0; 
    
    /* Effet de lueur (Glow) pour l'aspect célébration cosmique */
    box-shadow: 
        0 0 10px rgba(250, 204, 21, 0.7), /* Lueur dorée plus nette */
        0 0 30px rgba(250, 204, 21, 0.4), /* Lueur dorée diffuse */
        0 15px 40px rgba(0, 0, 0, 0.7); /* Ombre pour la profondeur */
    
    /* Animation pour faire "apparaître" la popup */
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet "pop" */
}

/* S'applique uniquement lorsque la popup est visible */
.referral-gift-popup-overlay.is-visible .referral-gift-popup-content {
    transform: scale(1);
}

/* 3. Icône (✨) */
.gift-popup-icon {
    font-size: 4.5rem;
    margin-bottom: 15px;
    /* Donne un éclat au caractère étoilé */
    filter: drop-shadow(0 0 10px #facc15); 
    animation: gift-pulse 1.8s infinite; /* Petite animation pour la joie */
    display: inline-block;
}

/* Animation de pulsation subtile */
@keyframes gift-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* 4. Titre (Tu es un Pionnier ! 💫) */
.gift-popup-title {
    color: #facc15; /* Couleur Dorée/Gold */
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.9); /* Lueur du titre */
}

/* 5. Description */
.gift-popup-description {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.6;
    color: #cccccc; /* Gris clair pour une bonne lisibilité */
}

/* 6. Bouton d'action (Merci !) */
.gift-popup-button {
    background-color: #facc15; /* Bouton Doré */
    color: #1e1b47; /* Texte très sombre pour un contraste maximal */
    border: none;
    padding: 12px 35px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 20px rgba(250, 204, 21, 0.6); /* Ombre/Glow pour l'action */
    margin-top: 15px;
    letter-spacing: 0.5px;
}

.gift-popup-button:hover {
    background-color: #fdea7c; /* Or plus clair au survol */
    transform: translateY(-2px); /* Léger soulèvement */
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.8);
}

/* 7. Conteneur pour le Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Crucial: permet de cliquer à travers pour le modal */
    overflow: hidden; 
    z-index: 1; /* Le confetti doit être sous le contenu du texte */
}
/* Assure que le contenu du texte et du bouton reste au-dessus du confetti */
.referral-gift-popup-content > * {
    z-index: 2;
    position: relative; 
}

/* Ajustements pour les petits écrans */
@media (max-width: 600px) {
    .referral-gift-popup-content {
        padding: 30px 20px;
        width: 95%;
    }
    .gift-popup-title {
        font-size: 1.6rem;
    }
    .gift-popup-button {
        padding: 10px 25px;
        font-size: 1.1rem;
    }
}

/* ====================================================================
--- DÉBUT DU BLOC D'ONBOARDING (À COLLER À LA FIN DE STYLES.CSS) ---
====================================================================
*/

/* --- 1. Base des Overlays --- */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Hauteur mobile fiable */
    background: linear-gradient(to bottom, #1e1b47, #3a2d6a); /* Votre fond Noka */
    z-index: 20000; /* Au-dessus de tout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Quicksand', sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}
.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}
/* Overlay de transition finale (Point 3) */
#onboarding-final-transition {
    transition: opacity 0.5s ease-in-out;
}
#onboarding-final-transition.fade-out {
    opacity: 0;
}

.onboarding-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 2. Étape 1: Header Noka.li (Point 0) --- */
.onboarding-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Quicksand', cursive;
    text-shadow: 0 0 8px #facc15;
    z-index: 20001;
    font-size: 2.5rem;
    font-weight: 600;
    color: #facc15;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.onboarding-header.active {
    opacity: 1;
}
.onboarding-header-li {
    font-size: 0.5em;
    color: #fef3c7;
    opacity: 0.7;
    position: relative;
    top: -0.2em;
}


/* --- 3. Étape 1: Cadeau (Point 1) --- */
.onboarding-referrer-text {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-out 0.5s forwards;
    opacity: 0;
}
.onboarding-referrer-text strong {
    color: #c4b5fd; /* Votre violet clair */
    font-weight: 700;
}
.onboarding-intro-text {
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 1s forwards;
    opacity: 0;
}
.onboarding-badge-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #facc15; /* Votre jaune/or */
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
    margin-bottom: 2rem;
    display: none; /* Géré par JS */
}
.onboarding-congrats-text {
    font-size: 2rem;
    font-weight: 700;
    color: #facc15;
    margin-top: 2rem;
    display: none; /* Géré par JS */
}
.onboarding-congrats-subtext {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* Le Cadeau */
.onboarding-gift-box {
    position: relative;
    width: 150px;
    height: 120px;
    margin: 2.5rem auto;
    animation: gift-float 3s infinite ease-in-out;
    transition: transform 0.3s ease;
}
.onboarding-gift-box.open {
    animation-play-state: paused;
}
.onboarding-gift-lid {
    width: 170px;
    height: 40px;
    background-color: #a78bfa;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: -10px;
    z-index: 2;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.onboarding-gift-lid.open {
    transform: translateY(-80px) rotate(-25deg) scale(0.9);
}
.onboarding-gift-body {
    width: 150px;
    height: 100px;
    background-color: #8b5cf6;
    border-radius: 10px;
    position: absolute;
    bottom: -20px;
    left: 0;
    z-index: 1;
}
.onboarding-gift-bow {
    position: absolute;
    width: 20px;
    height: 140px;
    background-color: #facc15;
    left: 65px;
    top: -10px;
    z-index: 3;
}
.onboarding-gift-bow::before {
    content: '';
    position: absolute;
    width: 170px;
    height: 20px;
    background-color: #facc15;
    left: -75px;
    top: 10px;
}
.onboarding-gift-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.onboarding-gift-confetti {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    z-index: 0;
}
.onboarding-gift-box.gift-shake {
    animation: gift-shake-anim 0.4s;
}

@keyframes gift-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes gift-shake-anim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px) rotate(-3deg); }
    75% { transform: translateX(8px) rotate(3deg); }
}

/* Hint de Clic (Point 1) */
.onboarding-click-hint {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    opacity: 0.8;
    animation: pulseHint 2s infinite ease-in-out;
}
.onboarding-click-hint i {
    margin-right: 8px;
    color: #facc15;
}
@keyframes pulseHint {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
.onboarding-click-counter {
    font-size: 0.9rem;
    color: #c4b5fd;
    margin-top: 0.25rem;
}


/* --- 4. Étape 2: Transition --- */
#onboarding-transition-screen .onboarding-content {
    animation-delay: 0.5s;
}
.onboarding-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #facc15;
    margin-bottom: 0.5rem;
}
.onboarding-subtitle {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 2.5rem;
}
.onboarding-social-proof {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(196, 181, 253, 0.3);
}
.onboarding-social-proof div {
    font-size: 1.2rem;
    font-weight: 600;
}
.onboarding-social-proof div#onboarding-social-online {
    color: #a2e6b8; /* Vert pastel */
    margin-bottom: 0.75rem;
}
.onboarding-social-proof div#onboarding-social-discussions {
    color: #c4b5fd; /* Violet pastel */
}
.onboarding-loader {
    margin-top: 3rem;
    font-size: 1rem;
    color: #e0e0e0;
    opacity: 0.7;
}
.onboarding-referrer-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: rgba(167, 139, 250, 0.2);
    border-bottom: 2px solid #a78bfa;
    text-align: center;
    font-weight: 600;
    z-index: 20001;
    animation: fadeIn 1s ease;
    transition: opacity 1s ease-out;
}
.onboarding-referrer-banner.fade-out {
    opacity: 0;
}

/* --- 5. Étape 3: Mini-Feed --- */
/* (Point 2.2) Cet overlay contient les missions et le bouton, mais est transparent aux clics */
#onboarding-feed-overlay {
    background: transparent;
    justify-content: flex-start;
    padding-top: 2rem;
    pointer-events: none; /* Laisse passer les clics vers le feed en dessous */
}
#onboarding-feed-overlay > * {
    pointer-events: auto; /* Sauf pour les missions et le bouton */
}

/* Missions (Point 2.1) */
.onboarding-missions-container {
    width: 90%;
    max-width: 500px;
    margin-bottom: 1.5rem;
}
.onboarding-mission-item {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    width: 100%;
    border: 1px solid rgba(196, 181, 253, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.onboarding-mission-item.active {
    opacity: 1;
    transform: translateY(0);
}
.mission-text {
    font-size: 0.9rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.mission-text .check {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #c4b5fd;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.4s ease;
}
.mission-text .mission-counter {
    margin-left: 8px;
    color: #c4b5fd;
    font-weight: 600;
}
.mission-progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 99px;
    overflow: hidden;
}
.mission-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #facc15, #ffdb49);
    border-radius: 99px;
    transition: width 0.5s ease;
}
/* État complété */
.onboarding-mission-item.completed {
    border-color: #a2e6b8;
}
.onboarding-mission-item.completed .mission-text {
    color: #a2e6b8;
    text-decoration: line-through;
}
.onboarding-mission-item.completed .check {
    background-color: #a2e6b8;
    border-color: #a2e6b8;
    transform: scale(1.1);
    animation: check-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.onboarding-mission-item.completed .mission-progress-fill {
    background: #a2e6b8;
}
@keyframes check-pop {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* Styles pour les faux sondages (Point 2.3) */
.onboarding-poll-option-button {
    width: 100%;
    position: relative;
    padding: 1rem;
    border-radius: 10px;
    background-color: #f0f0f0;
    border: 2px solid #e0e0e0;
    text-align: left;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.onboarding-poll-option-button:hover {
    border-color: #8b5cf6;
}
.onboarding-poll-option-button.voted-self {
    border-color: #a2e6b8;
    background-color: #f0fbf4;
}
.onboarding-poll-progress,
.onboarding-poll-percentage,
.onboarding-total-votes {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.poll-options.voted .onboarding-poll-progress,
.poll-options.voted .onboarding-poll-percentage,
.poll-options.voted .onboarding-total-votes {
    opacity: 1;
}
.onboarding-poll-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #d1fae5;
    z-index: 1;
}
.onboarding-poll-percentage {
    position: relative;
    z-index: 2;
    float: right;
    font-weight: 700;
    color: #0e7581;
}
.onboarding-poll-text {
    position: relative;
    z-index: 2;
}
.onboarding-total-votes {
    text-align: center;
    color: #777;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Styles pour les fausses réponses */
.onboarding-post-responses {
    color: #0e7581;
    font-size: 1rem;
    font-weight: 600;
}
.onboarding-post-responses strong {
    color: #8b5cf6;
    text-decoration: underline;
}
.onboarding-cant-reply {
    padding: 2rem;
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 10px;
}

/* Bouton d'inscription (Bas) */
.onboarding-register-button {
    position: absolute;
    bottom: 2rem;
    bottom: calc(2rem + env(safe-area-inset-bottom)); /* Pour iPhone */
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #4ade80, #34d399); /* Vert bienveillant */
    color: #1e1b47; /* Texte sombre */
    border: none;
    border-radius: 9999px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(74, 222, 128, 0.6);
    animation: pulseButton 1.5s infinite ease-in-out;
    transition: transform 0.2s ease;
    z-index: 100;
}
.onboarding-register-button:hover {
    transform: scale(1.05);
}

/* --- 6. Étape 4: Popup d'inscription --- */
.onboarding-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 25000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.onboarding-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
.onboarding-popup-content {
    background: linear-gradient(to bottom, #2a2251, #3a2d6a);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid #a78bfa;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.onboarding-popup-overlay.active .onboarding-popup-content {
    transform: scale(1);
}
.onboarding-popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #facc15;
    margin-bottom: 1rem;
}
.onboarding-popup-description {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}
.onboarding-rewards-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    display: inline-block;
}
.onboarding-rewards-list li {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.onboarding-rewards-list li strong {
    color: #c4b5fd;
    font-weight: 700;
}
.onboarding-rewards-list .icon {
    font-size: 1.2rem;
    margin-right: 10px;
}
.onboarding-popup-button {
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #4ade80, #34d399);
    color: #1e1b47;
    border: none;
    border-radius: 9999px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(74, 222, 128, 0.6);
    transition: transform 0.2s ease;
}
.onboarding-popup-button:hover {
    transform: scale(1.05);
}

/*
====================================================================
--- FIN DU BLOC D'ONBOARDING ---
====================================================================
*/

.onboarding-post-click-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99; /* Pour être au-dessus du contenu du post */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  border-radius: 1.5rem;
  pointer-events: none; /* Ne pas bloquer le clic sur le post en dessous */
  animation: pulse-and-fade-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.onboarding-post-click-hint i {
  font-size: 3.5rem;
  color: #facc15; /* Jaune Noka */
  text-shadow: 0 0 15px rgba(250, 204, 21, 0.8);
  animation: tap-animation 1.5s infinite ease-in-out;
}

.onboarding-post-click-hint span {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Animation d'apparition */
@keyframes pulse-and-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Animation de "tap" du doigt */
@keyframes tap-animation {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  10% {
    transform: scale(0.9) translateY(5px);
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.gift-fade-out {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
}