/* =======================================================================
   1. STYLES DE BASE DE LA MODALE D'AIDE
   ======================================================================= */
.help-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    -webkit-animation: fadeIn 0.3s;
    animation: fadeIn 0.3s;
}

/* =======================================================================
   2. EN-TÊTE DE LA MODALE
   ======================================================================= */
.help-modal-header {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    position: relative;
    text-align: center;
}

.help-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #1d1d1f;
}

.help-close-modal-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    color: #8e8e93;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.help-close-modal-btn:hover,
.help-close-modal-btn:focus {
    color: #1d1d1f;
    text-decoration: none;
}


/* =======================================================================
   3. CORPS DE LA MODALE
   ======================================================================= */
.help-modal-body {
    padding: 5px;
    max-height: 80vh;
    overflow-y: auto;
}

.help-modal-content {
    background-color: #F5F5F7;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #1d1d1f;
}

.help-modal-body .help-section {
    margin-bottom: 20px;
    padding-top: 60px; /* Espace pour l'ancre */
    margin-top: -60px; /* Compenser l'espace */
}

.help-modal-content .help-section:last-child {
    border-bottom: none;
}

.help-modal-content h4 {
    font-size: 1.3em;
    color: #007AFF;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-modal-content .help-step-number {
    background-color: #007AFF;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
}

.help-modal-content ul {
    list-style-type: none;
    padding-left: 20px;
}

.help-modal-content li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    line-height: 1.6;
}

.help-modal-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #34C759;
    font-weight: bold;
}

.help-modal-content .help-subsection {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 3px solid #007AFF;
    margin-bottom: 20px;
}

.help-modal-content .help-badge-mode,
.help-modal-content .help-badge-feature,
.help-modal-content .help-badge-icon,
.help-modal-content .help-badge-tab,
.help-modal-content .help-badge-file {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    margin-right: 5px;
}

.help-modal-content .help-badge-mode { background-color: #e0f7ff; color: #007bff; }
.help-modal-content .help-badge-feature { background-color: #e8f5e9; color: #4caf50; }
.help-modal-content .help-badge-icon { background-color: #f3e5f5; color: #9c27b0; }
.help-modal-content .help-badge-tab { background-color: #fff3e0; color: #ff9800; }
.help-modal-content .help-badge-file { background-color: #ede7f6; color: #673ab7; }

.help-modal-content button,
.help-modal-content .btn-help-example,
.help-modal-content .btn-help-example-albert,
.help-modal-content .btn-help-example-copy,
.help-modal-content .btn-help-example-generate {
    padding: 5px 12px; /* Taille réduite */
    border-radius: 8px;
    font-size: 0.9em;
    cursor: default !important; /* Empêcher le curseur de main */
    box-shadow: none !important; /* Supprimer l'ombre */
    transform: none !important; /* Annuler la transformation */
    transition: none !important; /* Annuler les transitions */
}

/* Styles spécifiques pour chaque bouton pour conserver les couleurs */
.help-modal-content #generateBtn { background-color: #007AFF; color: white; border: none; }
.help-modal-content .action-btn.albert-btn { background-color: #3b82f6; color: white; }
.help-modal-content .copy-btn { background-color: #e9e9ed; color: #1C1C1E; border: none; }
.help-modal-content .download-btn { background-color: #007AFF; color: white; border: none; }

/* Annuler les effets de survol spécifiquement */
.help-modal-content #generateBtn:hover,
.help-modal-content .action-btn.albert-btn:hover,
.help-modal-content .copy-btn:hover,
.help-modal-content .download-btn:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* Rétablir la couleur de fond au survol pour correspondre à la couleur de base */
.help-modal-content #generateBtn:hover { background-color: #007AFF; }
.help-modal-content .action-btn.albert-btn:hover { background-color: #3b82f6; }
.help-modal-content .copy-btn:hover { background-color: #e9e9ed; }
.help-modal-content .download-btn:hover { background-color: #007AFF; }


/* =======================================================================
   4. NOUVELLE BARRE DE NAVIGATION
   ======================================================================= */
.help-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px;
    background-color: #e9e9ed;
    border-radius: 8px;
    margin-bottom: 20px;
    top: -25px; /* Pour coller en haut de la modale */
    z-index: 10;
}

.help-nav-link {
    text-decoration: none;
    color: #007AFF;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-nav-link:hover {
    background-color: #dcdce1;
}

/* =======================================================================
   5. NOUVEAU GUIDE D'IMPORTATION
   ======================================================================= */
.import-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.import-details {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.import-details summary {
    padding: 15px;
    cursor: pointer;
    background-color: #f9f9f9;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-details summary:hover {
    background-color: #f1f1f1;
}

.import-details .import-content {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.import-details[open] summary {
    background-color: #e9e9ed;
}