/* Styles communs pour les panneaux d'aide
 * Ce fichier centralise les styles pour tous les panneaux d'aide
 * à travers l'application
 */

.help-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 380px;
    max-width: 90%;
    display: none;
    background-color: var(--help-panel-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.help-panel.active,
.help-panel.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: helpPanelFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes helpPanelFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--help-panel-header-bg);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.help-panel-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        var(--primary-color) 20%, 
        var(--primary-color) 80%, 
        transparent
    );
    opacity: 0.4;
}

.help-panel-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    display: flex;
    align-items: center;
}

.help-panel-header h3::before {
    content: '\f059';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 0.9em;
    color: var(--primary-color);
    opacity: 0.8;
}

.help-panel-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
}

.help-panel-close:hover {
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.help-panel-content {
    padding: 22px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.help-panel-content::-webkit-scrollbar {
    width: 6px;
}

.help-panel-content::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
    opacity: 0.6;
}

.help-panel-content::-webkit-scrollbar-track {
    background-color: var(--border-color);
    border-radius: 3px;
}

.help-panel-content h4 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 8px;
}

.help-panel-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    opacity: 0.5;
    border-radius: 2px;
}

.help-panel-content p,
.help-panel-content ul,
.help-panel-content ol {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.help-panel-content ul,
.help-panel-content ol {
    padding-left: 22px;
}

.help-panel-content li {
    margin-bottom: 10px;
    position: relative;
}

.help-panel-content ul li::marker {
    color: var(--primary-color);
}

.help-panel-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
    padding-bottom: 1px;
    transition: all 0.2s;
}

.help-panel-content a:hover {
    color: var(--primary-hover);
    border-bottom: 1px solid var(--primary-hover);
}

.help-panel-content .shortcuts-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 15px;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 15px;
    border-radius: 8px;
}

.help-panel-content .key {
    display: inline-block;
    background-color: var(--key-bg, #f5f5f5);
    border: 1px solid var(--key-border, #ddd);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 0.85rem;
    font-family: monospace;
    box-shadow: 0 2px 0 var(--key-shadow, #ccc);
    margin: 0 2px;
}

/* Media queries pour la réactivité */
@media (max-width: 768px) {
    .help-panel {
        top: 50px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: 100%;
        max-height: 80vh;
    }
    
    .help-panel-content {
        max-height: 60vh;
        padding: 18px;
    }
    
    .help-panel-header {
        padding: 14px 18px;
    }
}

/* Styles pour le mode sombre */
[data-theme="dark"] .help-panel {
    background-color: var(--help-panel-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .help-panel-header {
    background-color: var(--help-panel-header-bg);
}

[data-theme="dark"] .help-panel-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .help-panel-content h4 {
    color: var(--primary-color);
}

[data-theme="dark"] .help-panel-content .key {
    background-color: var(--dark-key-bg, #333);
    border-color: var(--dark-key-border, #444);
    box-shadow: 0 2px 0 var(--dark-key-shadow, #222);
}

[data-theme="dark"] .help-panel-content .shortcuts-list {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Bouton d'aide universel */
.help-button {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.help-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--primary-color);
    opacity: 0.12;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.help-button:hover {
    color: var(--primary-color);
}

.help-button:hover::before {
    width: 100%;
    height: 100%;
}

.help-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color-light);
}

[data-theme="dark"] .help-button:hover::before {
    background-color: var(--primary-color);
    opacity: 0.2;
}

/* Animation du point d'interrogation sur survol */
.help-button i {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.help-button:hover i {
    transform: scale(1.15);
}

/* Styles pour les sections extensibles */
.help-panel-content details {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.help-panel-content summary {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    outline: none;
    transition: background-color 0.2s;
}

.help-panel-content summary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.help-panel-content summary:focus {
    box-shadow: 0 0 0 2px var(--primary-color-light);
}

.help-panel-content summary::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    transition: transform 0.3s;
}

.help-panel-content details[open] summary::after {
    transform: rotate(180deg);
}

.help-panel-content .details-content {
    padding: 15px;
}

/* Styles pour les alertes et conseils */
.help-tip, 
.help-warning {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.help-tip {
    background-color: rgba(var(--primary-color-rgb), 0.08);
    border-left: 3px solid var(--primary-color);
}

.help-warning {
    background-color: rgba(var(--warning-color), 0.08);
    border-left: 3px solid var(--warning-color);
}

.help-tip i, 
.help-warning i {
    margin-top: 2px;
    font-size: 1.1rem;
}

.help-tip i {
    color: var(--primary-color);
}

.help-warning i {
    color: var(--warning-color);
}

.help-tip p, 
.help-warning p {
    margin: 0;
    flex: 1;
}

/* Styles pour le mode sombre */
[data-theme="dark"] .help-panel-content summary {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .help-panel-content summary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .help-tip {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

[data-theme="dark"] .help-warning {
    background-color: rgba(var(--warning-color), 0.1);
} 