/* ============================================
   EASTER EGGS SYSTEM - FunRC
   ============================================ */

/* Bouton secrets - manette nude glow */
.egg-hunt-btn {
    position: fixed; top: 80px; left: 20px; z-index: 9998;
    width: 48px; height: 48px; border-radius: 50%;
    background: none; border: none;
    font-size: 1.8rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    animation: egg-btn-glow 3s ease-in-out infinite;
}
.egg-hunt-btn.visible { opacity: 1; }
.egg-hunt-btn:hover { transform: scale(1.2); }
.egg-hunt-btn.egg-hunt-crown {
    filter: drop-shadow(0 0 12px rgba(255,193,7,0.5));
}
.egg-hunt-btn.egg-hunt-crown:hover { filter: drop-shadow(0 0 25px rgba(255,193,7,0.7)); }
.egg-emoji {
    animation: egg-emoji-glow 3s ease-in-out infinite;
}
.egg-hunt-btn:hover .egg-emoji { filter: drop-shadow(0 0 15px rgba(255,193,7,0.6)); }
.egg-hunt-crown .egg-emoji { animation: egg-emoji-crown-glow 3s ease-in-out infinite; }
@keyframes egg-emoji-glow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(255,107,53,0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(255,107,53,0.5)); }
}
@keyframes egg-emoji-crown-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255,193,7,0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(255,193,7,0.6)); }
}
@keyframes egg-btn-glow {
    0%, 100% { }
    50% { }
}
.egg-hunt-badge {
    position: absolute; top: -4px; left: -4px;
    background: #ffc107; color: #1a1208; font-size: 0.6rem; font-weight: 800;
    padding: 2px 6px; border-radius: 50px; line-height: 1.3;
}
.egg-hunt-badge.pulse { animation: badge-pop 0.4s ease; }
@keyframes badge-pop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* Modale chasse aux eggs */
.egg-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.egg-modal.active { opacity: 1; visibility: visible; }
.egg-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
}
.egg-modal-box {
    position: relative; z-index: 2;
    background: #2a1f10; border: 1px solid rgba(255,107,53,0.2);
    border-radius: 16px; max-width: 720px; width: 100%;
    max-height: 85vh; overflow-y: auto; padding: 0;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.egg-modal.active .egg-modal-box { transform: translateY(0); }
.egg-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.egg-modal-close:hover { background: #ff6b35; }

/* Header modale - horizontal */
.egg-modal-header {
    display: flex; align-items: center; gap: 20px;
    padding: 24px 28px 20px;
    background: linear-gradient(180deg, rgba(255,107,53,0.08), transparent);
    border-bottom: 1px solid rgba(255,107,53,0.1);
}
.egg-modal-header-left { flex-shrink: 0; }
.egg-modal-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(255,193,7,0.1));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #ff6b35;
}
.egg-modal-header-right { flex: 1; min-width: 0; }
.egg-modal-header h2 { font-family: 'Fredoka One', cursive; font-size: 1.15rem; color: #ffeedd; margin-bottom: 4px; }
.egg-modal-header p { color: #c4a882; font-size: 0.82rem; margin-bottom: 10px; }

/* Progress - inline dans le header */
.egg-progress-wrap { display: flex; align-items: center; gap: 10px; }
.egg-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.egg-progress-fill { height: 100%; background: linear-gradient(90deg, #ff6b35, #ffc107); border-radius: 4px; transition: width 0.5s ease; }
.egg-progress-text { font-size: 0.75rem; color: #c4a882; font-weight: 700; white-space: nowrap; }

/* Body - 2 colonnes */
.egg-modal-body {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
    min-height: 200px;
}
.egg-modal-col-left {
    padding: 20px 24px; border-right: 1px solid rgba(255,107,53,0.08);
}
.egg-modal-col-left h3 {
    font-size: 0.85rem; color: #ff6b35; font-weight: 700; margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.egg-modal-col-left h3 i { margin-right: 6px; }
.egg-modal-col-right { padding: 20px 24px; }

/* Sections */
.egg-modal-section { margin-bottom: 20px; }
.egg-modal-section h3 { font-size: 0.85rem; color: #ff6b35; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.egg-modal-section h3 i { margin-right: 6px; }
.egg-modal-note { font-size: 0.75rem; color: #c4a882; margin-bottom: 10px; font-style: italic; }

/* Egg list */
.egg-list { display: flex; flex-direction: column; gap: 2px; }
.egg-list-item {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; border-radius: 4px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.3s ease;
}
.egg-list-item.found { background: rgba(255,107,53,0.08); border-color: rgba(255,107,53,0.15); }
.egg-list-icon { font-size: 0.9rem; color: rgba(255,255,255,0.15); flex-shrink: 0; }
.egg-list-item.found .egg-list-icon { color: #4caf50; }
.egg-list-name { display: block; font-size: 0.82rem; color: #ffeedd; font-weight: 700; }
.egg-list-item:not(.found) .egg-list-name { color: #c4a882; }
.egg-list-hint { display: block; font-size: 0.75rem; color: #c4a882; opacity: 0.7; font-style: italic; }
.egg-list-code {
    display: block; font-family: 'Fredoka One', cursive; font-size: 0.75rem; color: #ffc107;
    letter-spacing: 2px; font-style: normal; opacity: 1; margin-top: 3px;
}

/* Rewards */
.egg-rewards { display: flex; flex-direction: column; gap: 6px; }
.egg-reward {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04);
}
.egg-reward.unlocked { background: rgba(255,193,7,0.08); border-color: rgba(255,193,7,0.2); }
.egg-reward-icon { font-size: 1rem; color: rgba(255,255,255,0.15); }
.egg-reward.unlocked .egg-reward-icon { color: #ffc107; }
.egg-reward-text { font-size: 0.85rem; color: #c4a882; }
.egg-reward.unlocked .egg-reward-text { color: #ffeedd; font-weight: 700; }

/* Leaders */
.egg-leaders { padding: 0; }
.egg-leaders h4 { font-size: 0.85rem; color: #ff6b35; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.egg-leaders h4 i { margin-right: 6px; }
.egg-leader-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.88rem; }
.egg-leader-row:last-child { border: none; }
.egg-leader-name { flex: 1; color: #ffeedd; }
.egg-leader-date { color: rgba(196,168,130,0.4); font-size: 0.65rem; }
.egg-leader-duration { color: rgba(255,193,7,0.5); font-size: 0.6rem; }
.egg-leader-count { color: #c4a882; font-weight: 700; font-size: 0.82rem; }

/* ============================================
   POPUP EGG TROUVE
   ============================================ */
.egg-popup {
    position: fixed; inset: 0; z-index: 100001;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.egg-popup.active { opacity: 1; visibility: visible; }
.egg-popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); }
.egg-popup-box {
    position: relative; z-index: 2; background: #2a1f10;
    border: 2px solid #ff6b35; border-radius: 16px;
    padding: 36px; text-align: center; max-width: 400px; width: 100%;
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.egg-popup.active .egg-popup-box { transform: scale(1); }
.egg-popup-close {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
    font-size: 0.9rem;
}
.egg-popup-close:hover { background: #ff6b35; }
.egg-popup-icon { font-size: 3rem; color: #ffc107; margin-bottom: 10px; }
.egg-popup-box h2 { font-family: 'Fredoka One', cursive; color: #ff6b35; font-size: 1.4rem; margin-bottom: 8px; }
.egg-popup-explanation {
    color: #c4a882; font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px;
    background: rgba(255,107,53,0.06); border-left: 3px solid #ff6b35;
    padding: 10px 14px; border-radius: 0 8px 8px 0; text-align: left;
    font-style: italic;
}
.egg-popup-name { color: #ffc107; font-weight: 700; font-size: 1rem; margin-bottom: 16px; }
.egg-popup-question { color: #c4a882; font-size: 1rem; margin-bottom: 16px; }

.egg-popup-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.egg-popup-btn {
    padding: 11px 24px; border-radius: 50px; border: none; font-weight: 700;
    font-size: 0.88rem; cursor: pointer; transition: all 0.2s; display: inline-flex;
    align-items: center; gap: 6px; text-decoration: none;
}
.egg-popup-yes { background: #ff6b35; color: #fff; }
.egg-popup-yes:hover { background: #ff8c5a; transform: translateY(-2px); }
.egg-popup-no { background: rgba(255,255,255,0.08); color: #c4a882; border: 1px solid rgba(255,255,255,0.15); }
.egg-popup-no:hover { background: rgba(255,255,255,0.12); color: #fff; }

.egg-popup-form { margin-top: 16px; }
.egg-popup-input {
    width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,107,53,0.2); border-radius: 10px;
    color: #ffeedd; font-size: 0.95rem; text-align: center;
    outline: none; margin-bottom: 12px;
}
.egg-popup-input:focus { border-color: #ff6b35; }

/* Resultats */
.egg-result-success, .egg-result-guest { padding: 10px 0; }
.egg-result-bravo { font-family: 'Fredoka One', cursive; font-size: 1.2rem; color: #ffeedd; margin-bottom: 12px; }
.egg-result-code {
    font-family: 'Fredoka One', cursive; font-size: 2rem; color: #ffc107;
    letter-spacing: 4px; padding: 16px; margin: 12px 0;
    background: rgba(255,193,7,0.08); border: 2px dashed #ffc107; border-radius: 10px;
}
.egg-result-info { color: #c4a882; font-size: 0.9rem; margin-bottom: 8px; }
.egg-result-progress { color: #c4a882; font-size: 0.82rem; }
.egg-result-reward {
    color: #ffc107; font-weight: 700; font-size: 0.95rem; margin-top: 12px;
    padding: 10px; background: rgba(255,193,7,0.08); border-radius: 8px;
}
.egg-result-screenshot { color: #c4a882; font-size: 0.75rem; margin-top: 10px; opacity: 0.6; }
.egg-result-join { color: #ff6b35; font-weight: 700; font-size: 0.95rem; margin: 12px 0; }

/* ============================================
   REGLEMENT QUIZ + TAMPONS
   ============================================ */
.reg-quiz {
    margin-top: 30px; opacity: 0; transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
.reg-quiz.active { opacity: 1; transform: translateY(0); }
.reg-quiz-box {
    background: linear-gradient(145deg, rgba(42,31,16,0.95), rgba(30,20,10,0.98));
    border: 2px solid rgba(255,193,7,0.3); border-radius: 16px;
    padding: 36px; text-align: center; max-width: 500px; margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative; overflow: hidden;
}
.reg-quiz-icon { font-size: 2.5rem; color: #ffc107; margin-bottom: 12px; }
.reg-quiz-box h3 { font-family: 'Fredoka One', cursive; color: #ffeedd; font-size: 1.2rem; margin-bottom: 16px; }
.reg-quiz-progress { color: #c4a882; font-size: 0.75rem; font-weight: 700; margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.reg-quiz-question { color: #ff6b35; font-size: 1.1rem; font-weight: 700; margin-bottom: 24px; line-height: 1.5; }
.reg-quiz-buttons { display: flex; flex-direction: column; gap: 10px; }
.reg-quiz-btn {
    padding: 14px 20px; border-radius: 12px; border: none; font-weight: 600;
    font-size: 0.88rem; cursor: pointer; transition: all 0.3s;
    text-align: left; line-height: 1.4;
}
.reg-quiz-a { background: rgba(255,107,53,0.12); color: #ffeedd; border: 1px solid rgba(255,107,53,0.2); }
.reg-quiz-b { background: rgba(255,193,7,0.1); color: #ffeedd; border: 1px solid rgba(255,193,7,0.2); }
.reg-quiz-c { background: rgba(255,255,255,0.05); color: #ffeedd; border: 1px solid rgba(255,255,255,0.1); }
.reg-quiz-btn:hover { transform: translateX(6px); border-color: #ff6b35; box-shadow: 0 4px 15px rgba(255,107,53,0.2); }

/* Tampon */
.reg-quiz-stamp { margin-top: 20px; }
.stamp {
    display: inline-block; padding: 16px 40px; border-radius: 8px;
    font-family: 'Fredoka One', cursive; font-size: 2rem; letter-spacing: 4px;
    transform: rotate(-12deg) scale(0);
    animation: stamp-slam 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
.stamp-approved {
    border: 4px solid #4caf50; color: #4caf50;
    box-shadow: 0 0 30px rgba(76,175,80,0.3);
}
.stamp-failed {
    border: 4px solid #e63946; color: #e63946;
    box-shadow: 0 0 30px rgba(230,57,70,0.3);
}
@keyframes stamp-slam {
    0% { transform: rotate(-12deg) scale(3); opacity: 0; }
    60% { transform: rotate(-12deg) scale(0.9); opacity: 1; }
    80% { transform: rotate(-12deg) scale(1.05); }
    100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}

/* ============================================
   BBQ PUZZLE
   ============================================ */
.bbq-puzzle {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.bbq-puzzle.active { opacity: 1; visibility: visible; }
.bbq-puzzle-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); }
.bbq-puzzle-box {
    position: relative; z-index: 2; background: #2a1f10;
    border: 1px solid rgba(255,107,53,0.2); border-radius: 16px;
    padding: 36px; text-align: center; max-width: 420px; width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.bbq-puzzle.active .bbq-puzzle-box { transform: translateY(0); }
.bbq-puzzle-close {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
    border-radius: 50%; border: none; background: rgba(255,255,255,0.1);
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.bbq-puzzle-close:hover { background: #ff6b35; }
.bbq-puzzle-icon { font-size: 2rem; margin-bottom: 10px; }
.bbq-puzzle-box h3 { font-family: 'Fredoka One', cursive; color: #ffeedd; font-size: 1.2rem; margin-bottom: 8px; }
.bbq-puzzle-box p { color: #c4a882; font-size: 0.85rem; margin-bottom: 24px; }
.bbq-puzzle-grid {
    display: flex; gap: 16px; justify-content: center; margin-bottom: 20px;
}
.bbq-puzzle-item {
    width: 64px; height: 64px; border-radius: 14px;
    background: rgba(255,107,53,0.1); border: 2px solid rgba(255,107,53,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #ff6b35; cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s, border-color 0.3s;
}
.bbq-puzzle-item:hover { border-color: #ff6b35; }
.bbq-puzzle-item:active { transform: scale(0.95) !important; }
.bbq-puzzle-item.solved {
    border-color: rgba(76,175,80,0.5); box-shadow: 0 0 15px rgba(76,175,80,0.3);
    background: rgba(76,175,80,0.08); color: #4caf50;
}
.bbq-puzzle-hint { color: #c4a882; font-size: 0.75rem; font-style: italic; margin-bottom: 16px; }
.bbq-puzzle-reset {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    color: #c4a882; padding: 8px 20px; border-radius: 50px; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; transition: all 0.3s;
}
.bbq-puzzle-reset:hover { background: rgba(255,107,53,0.1); border-color: #ff6b35; color: #ff6b35; }

@media (max-width: 480px) {
    .bbq-puzzle-item { width: 56px; height: 56px; font-size: 1.3rem; }
    .bbq-puzzle-grid { gap: 10px; }
}

/* Logo spin pour easter egg */
@keyframes egg-logo-spin { to { transform: rotate(360deg); } }

/* Moon glow animation */
@keyframes moon-glow {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 0.8; transform: scale(1.05); }
}

/* Screen shake animation */
@keyframes screen-shake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-8px, 4px); }
    20% { transform: translate(6px, -6px); }
    30% { transform: translate(-4px, 2px); }
    40% { transform: translate(4px, -4px); }
    50% { transform: translate(-6px, 6px); }
    60% { transform: translate(8px, -2px); }
    70% { transform: translate(-2px, 4px); }
    80% { transform: translate(6px, -6px); }
    90% { transform: translate(-4px, 2px); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .egg-hunt-btn { top: 70px; left: 12px; width: 42px; height: 42px; font-size: 1rem; }
    .egg-modal-box { max-width: 95vw; max-height: 90vh; }
    .egg-modal-header { flex-direction: row; gap: 14px; padding: 20px 18px 16px; }
    .egg-modal-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .egg-modal-header h2 { font-size: 1rem; }
    .egg-modal-body { grid-template-columns: 1fr; }
    .egg-modal-col-left { border-right: none; border-bottom: 1px solid rgba(255,107,53,0.08); padding: 16px 18px; }
    .egg-modal-col-right { padding: 16px 18px; }
    .egg-popup-box { padding: 28px 20px; }
    .egg-result-code { font-size: 1.5rem; letter-spacing: 2px; }
}
