/**
 * Styles personnalisés pour les tours Shepherd.js
 */

/* Override du thème par défaut */
.shepherd-element {
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    font-family: var(--bs-body-font-family);
}

.shepherd-content {
    padding: 0;
    border-radius: 12px;
}

.shepherd-header {
    background: linear-gradient(135deg, var(--bs-primary), #4a5cee);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

.shepherd-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    color: white;
}

.shepherd-cancel-icon {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.shepherd-cancel-icon:hover {
    color: white;
}

.shepherd-text {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--bs-body-color);
}

.shepherd-text p {
    margin-bottom: 0.75rem;
}

.shepherd-text p:last-child {
    margin-bottom: 0;
}

/* Icônes dans le texte */
.shepherd-text i.bi {
    color: var(--bs-primary);
    margin-right: 0.25rem;
}

.shepherd-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Boutons du tour */
.shepherd-button {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.shepherd-button:focus {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

/* Flèche du tooltip */
.shepherd-arrow {
    border-width: 16px;
}

.shepherd-arrow::before {
    background: var(--bs-primary);
}

/* Overlay modal */
.shepherd-modal-overlay-container {
    pointer-events: auto;
}

.shepherd-modal-is-visible .shepherd-modal-overlay-container {
    background: rgba(0, 0, 0, 0.5);
}

/* Élément mis en évidence */
.shepherd-enabled.shepherd-element-attached-top,
.shepherd-enabled.shepherd-element-attached-bottom,
.shepherd-enabled.shepherd-element-attached-left,
.shepherd-enabled.shepherd-element-attached-right {
    animation: shepherd-fadeIn 0.25s ease;
}

@keyframes shepherd-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cible mise en évidence */
.shepherd-target {
    position: relative;
    z-index: 1060;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.4),
        0 0 0 8px rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 4px;
    transition: box-shadow 0.3s ease;
}

/* Indicateur de progression */
.shepherd-progress {
    padding: 0.5rem 1.25rem;
    background: var(--bs-light);
    font-size: 0.8rem;
    color: var(--bs-secondary);
    text-align: center;
    border-top: 1px solid var(--bs-border-color);
}

/* Toast de suggestion */
#tourSuggestionToast {
    min-width: 300px;
}

#tourSuggestionToast .toast-header {
    background: var(--bs-warning-bg-subtle);
}

/* Modal de bienvenue */
#welcomeTourModal .modal-body i.display-1 {
    font-size: 4rem;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .shepherd-element {
        background: var(--bs-dark);
        border: 1px solid var(--bs-border-color);
    }

    .shepherd-header {
        background: linear-gradient(135deg, #4a5cee, #6366f1);
    }

    .shepherd-text {
        color: var(--bs-light);
    }

    .shepherd-footer {
        background: var(--bs-dark);
        border-color: var(--bs-border-color);
    }

    .shepherd-progress {
        background: rgba(255, 255, 255, 0.05);
    }

    .shepherd-target {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5),
            0 0 0 8px rgba(99, 102, 241, 0.25);
    }
}

/* Support explicite via classe .dark-mode */
body.dark-mode .shepherd-element {
    background: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
}

body.dark-mode .shepherd-text {
    color: var(--bs-light);
}

body.dark-mode .shepherd-footer {
    background: var(--bs-dark);
    border-color: var(--bs-border-color);
}

body.dark-mode .shepherd-progress {
    background: rgba(255, 255, 255, 0.05);
}