/**
 * Les Caractères - Styles des notes
 * Notes print et notes hand
 */

/* ========================================
   ANCRES DE NOTES DANS LE TEXTE
   ======================================== */

.note-ref {
    display: inline;
    position: relative;
    cursor: help;
}

.note-ref-print {
    color: #c0392b;
    font-size: 0.75em;
    vertical-align: super;
    font-weight: bold;
    margin: 0 0.1em;
}

.note-ref-hand {
    /* Les notes hand n'ont pas de signe visible dans le texte */
    display: inline;
    width: 0;
    height: 0;
}

/* ========================================
   CONTENEUR DE NOTES (caché dans le DOM)
   ======================================== */

.paragraph-notes {
    display: none; /* Caché, les notes seront déplacées dans .notes-area */
}

/* ========================================
   ZONE NOTES (colonne de droite)
   ======================================== */

.notes-area {
    position: relative;
    min-height: 400px;
}

.notes-group {
    position: absolute;
    left: 0;
    right: 0;
    margin-bottom: 1.5rem;
    transition: top 0.2s ease-out;
}

/* ========================================
   STYLES DES NOTES
   ======================================== */

.note {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Notes print (toujours visibles) */
.note-print {
    background: #fff8f0;
    border-left: 3px solid #c0392b;
}

.note-sign {
    display: inline-block;
    color: #c0392b;
    font-weight: bold;
    margin-right: 0.4rem;
    font-size: 0.9em;
}

.note-text {
    color: #333;
}

/* Notes hand (conditionnelles) */
.note-hand {
    background: #f0f8ff;
    border-left: 3px solid #3498db;
    font-family: 'Courier New', monospace;
    font-style: italic;
    display: none; /* Masquées par défaut */
}

/* Affichage des notes hand quand la checkbox est cochée */
body.show-hand-notes .note-hand {
    display: block;
}

/* ========================================
   MODE ANALYTIQUE - DROPDOWN NOTES HAND
   ======================================== */

.note-hand-current {
    /* Affichage normal de la note courante */
}

.note-hand-dropdown {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #3498db;
}

.note-hand-selector {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #3498db;
    border-radius: 3px;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

/* Mode analytique : afficher le dropdown */
.paragraph.active ~ .notes-group .note-hand-dropdown {
    display: block !important;
}

/* ========================================
   VARIANTES DANS LES NOTES
   ======================================== */

.note .variant {
    /* Les variantes dans les notes héritent des styles de variants.css */
    /* mais pas de highlight particulier */
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .notes-area {
        display: none; /* Sur tablette/mobile, masquer la colonne notes */
    }
    
    /* Alternative : afficher les notes en bas de page ou en modal */
}

/* ========================================
   UTILITAIRES
   ======================================== */

/* Indicateur visuel pour paragraphes avec notes */
.paragraph[data-has-notes="true"]::before {
    /* On pourrait ajouter un indicateur visuel si souhaité */
}

/* Animation d'apparition des notes */
.notes-group {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Highlight au survol de l'ancre */
.note-highlighted {
    background: #fff3cd !important;
    border-left-width: 5px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}