/* Système de hints contextuels */
.contextual-hint {
    position: fixed;
    width: 350px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(40, 40, 40, 0.98));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.contextual-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bouton fermer */
.hint-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #FFE5B4;
    font-size: 1.5em;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.hint-close:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: rotate(90deg);
}

/* Contenu */
.hint-content h4 {
    color: #FFD700;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.hint-content p {
    color: #E0E0E0;
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Badges */
.hint-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hint-badge {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Flèche indicatrice */
.hint-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Flèche selon position */
.hint-bottom .hint-arrow {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 12px 12px 12px;
    border-color: transparent transparent rgba(255, 215, 0, 0.4) transparent;
}

.hint-top .hint-arrow {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 12px 12px 0 12px;
    border-color: rgba(255, 215, 0, 0.4) transparent transparent transparent;
}

.hint-right .hint-arrow {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 12px 12px 0;
    border-color: transparent rgba(255, 215, 0, 0.4) transparent transparent;
}

.hint-left .hint-arrow {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 0 12px 12px;
    border-color: transparent transparent transparent rgba(255, 215, 0, 0.4);
}

/* Animation pulse pour attirer l'attention */
@keyframes pulse-border {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.4);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.8);
        box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    }
}

.contextual-hint.visible {
    animation: pulse-border 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .contextual-hint:not(.positioned) {
        width: calc(100vw - 40px);
        left: 20px;
    }
}

/* Overlay tutoriel */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    pointer-events: none;
}

/* Highlight de la cible */
.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.6), 
                0 0 20px rgba(255, 215, 0, 0.4) !important;
    border-radius: 8px;
    pointer-events: auto;
}

/* Hint tutoriel */
.tutorial-hint {
    z-index: 10002 !important;
}

/* Barre de progression */
.tutorial-progress {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.tutorial-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tutorial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s ease;
}

.tutorial-step-counter {
    text-align: center;
    font-size: 0.85em;
    color: #FFD700;
    font-weight: 600;
}

/* Navigation tutoriel */
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.tutorial-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tutorial-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.tutorial-next {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
}

.tutorial-next:hover {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Message de fin */
.tutorial-completion {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-completion.visible {
    opacity: 1;
}

.completion-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(40, 40, 40, 0.98));
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    min-width: 300px;
}

.completion-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.completion-content h3 {
    color: #FFD700;
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.completion-content p {
    color: #E0E0E0;
    margin: 0 0 20px 0;
}

.completion-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
}

.completion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.hint-card {
    position: fixed;  /* ✅ Pas absolute */
    z-index: 10000;
}