/* Styles personnalisés pour le système de tutoriel Shepherd.js */

/* Thème principal pour les popups Shepherd */
.shepherd-element {
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.shepherd-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.shepherd-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.shepherd-cancel-icon {
    color: white;
    opacity: 0.8;
    font-size: 20px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.shepherd-cancel-icon:hover {
    opacity: 1;
}

.shepherd-text {
    padding: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.shepherd-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Styles pour les boutons */
.shepherd-button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.shepherd-button-primary {
    background-color: #007bff;
    color: white;
}

.shepherd-button-primary:hover {
    background-color: #0056b3;
    color: white;
}

.shepherd-button-secondary {
    background-color: #6c757d;
    color: white;
}

.shepherd-button-secondary:hover {
    background-color: #545b62;
    color: white;
}

/* Indicateur de progression */
.tutorial-progress {
    font-size: 12px;
    color: #6c757d;
    margin-right: auto;
}

/* Highlight pour les éléments ciblés */
.shepherd-target-highlight {
    animation: pulse-highlight 2s infinite;
    border: 2px solid #007bff !important;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
}

.tutorial-highlight {
    position: relative;
    z-index: 9998 !important;
    animation: tutorial-pulse 2s infinite;
    border: 3px solid #007bff !important;
    border-radius: 6px !important;
    box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.3), 
                0 0 20px rgba(0, 123, 255, 0.4) !important;
    background-color: rgba(0, 123, 255, 0.05) !important;
    transition: all 0.3s ease !important;
}

.tutorial-highlight::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid #007bff;
    border-radius: 10px;
    animation: tutorial-glow 2s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulse-highlight {
    0% {
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 123, 255, 0.15);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
    }
}

@keyframes tutorial-pulse {
    0% {
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.3), 
                    0 0 20px rgba(0, 123, 255, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0.2), 
                    0 0 30px rgba(0, 123, 255, 0.6);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.3), 
                    0 0 20px rgba(0, 123, 255, 0.4);
        transform: scale(1);
    }
}

@keyframes tutorial-glow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Overlay sombre */
.shepherd-modal-overlay-container {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Bouton d'aide dans la navbar */
.tutorial-help-btn {
    position: relative;
    margin-left: 10px;
}

.tutorial-help-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
}

/* Menu déroulant des tutoriels */
.tutorial-dropdown {
    min-width: 250px;
}

.tutorial-dropdown .dropdown-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
}

.tutorial-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.tutorial-dropdown .dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.tutorial-dropdown .dropdown-item.completed {
    background-color: #d4edda;
    color: #155724;
}

.tutorial-dropdown .dropdown-item.in-progress {
    background-color: #fff3cd;
    color: #856404;
}

/* Responsive design */
@media (max-width: 768px) {
    .shepherd-element {
        max-width: 90vw;
        margin: 10px;
    }
    
    .shepherd-text {
        padding: 15px;
        font-size: 13px;
    }
    
    .shepherd-footer {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .tutorial-progress {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Animation d'entrée */
.shepherd-element {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les éléments de démonstration */
.tutorial-demo-data {
    background-color: #e3f2fd;
    border: 1px dashed #2196f3;
    border-radius: 4px;
    padding: 2px 6px;
    font-style: italic;
}

/* Indicateur de tutoriel actif */
.tutorial-active-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tutorial-active-indicator i {
    margin-right: 5px;
}

/* Modal des tutoriels */
.tutorial-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.tutorial-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Contenu de la modal */
.tutorial-menu {
    padding: 0;
}

.tutorial-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.tutorial-header h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

.overall-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    opacity: 0.9;
}

/* Liste des tutoriels */
.tutorial-list {
    padding: 20px;
}

.tutorial-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tutorial-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.tutorial-item.completed {
    border-color: #28a745;
    background-color: #f8fff9;
}

.tutorial-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.tutorial-icon {
    font-size: 32px;
    margin-right: 20px;
    min-width: 50px;
    text-align: center;
}

.tutorial-content {
    flex: 1;
}

.tutorial-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tutorial-content p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.tutorial-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.duration {
    font-size: 12px;
    color: #6c757d;
}

.completed-badge {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.progress-badge {
    background-color: #ffc107;
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.locked-badge {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Actions des tutoriels */
.tutorial-actions {
    margin-left: 20px;
}

.btn-start {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-start:hover {
    background-color: #0056b3;
}

.btn-locked {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer de la modal */
.tutorial-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-footer .btn-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-reset {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-reset:hover {
    background-color: #c82333;
}

.btn-close {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-close:hover {
    background-color: #545b62;
}

/* Responsive pour la modal */
@media (max-width: 768px) {
    .tutorial-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .tutorial-header {
        padding: 20px;
    }
    
    .tutorial-header h3 {
        font-size: 20px;
    }
    
    .tutorial-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .tutorial-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .tutorial-actions {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .tutorial-footer {
        flex-direction: column;
        gap: 10px;
    }
}
