/* Styles spécifiques pour les contraintes */
.alphabet-nav {
    margin: 2rem 0;
    text-align: center;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 0.5rem;
    max-width: 800px;
    margin: 1rem auto;
}

.alphabet-link {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #666;
    border: 2px solid #333;
    background: linear-gradient(45deg, #000, #222);
    transition: all 0.3s ease;
    font-weight: bold;
}

.alphabet-link:hover {
    color: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
    transform: scale(1.1);
}

.alphabet-link.active {
    color: #ff00ff;
    border-color: #ff00ff;
    box-shadow: 0 0 5px #ff00ff;
}

.contraintes-content {
    margin-top: 2rem;
}

.letter-section {
    margin: 2rem 0;
    padding: 1rem;
    border-left: 4px solid #00ffff;
    background: rgba(0, 255, 255, 0.05);
}

.section-title {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ffff;
}

.term-entry {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 0, 255, 0.05);
    border-radius: 5px;
}

.term-title {
    margin: 0 0 0.5rem 0;
}

.term-link {
    color: #ff00ff;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
}

.term-link:hover {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.term-preview {
    color: #999;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.empty-section {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Styles du modal - CORRECTION */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex !important;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #ff00ff;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { transform: scale(0.8) translateY(-50px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #00ffff;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 0px #000;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    color: #333;
    line-height: 1.6;
}

.modal-body p {
    margin: 0;
    white-space: pre-line;
}

@media (max-width: 600px) {
    .alphabet-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}