/* ========================================
   MODALE CERTIFICATS HALAKHIQUES
   ======================================== */

/* Overlay sombre semi-transparent */
.certificates-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.9); /* #1a1a2e avec opacité */
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.certificates-overlay.active {
    display: flex;
    opacity: 1;
}

/* Conteneur de la modale */
.certificates-modal {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #0d1f26 100%);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 175, 55, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin: auto;
}

.certificates-overlay.active .certificates-modal {
    transform: scale(1) translateY(0);
}

/* Bouton de fermeture X */
.certificates-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 1;
    font-weight: 300;
}

.certificates-close:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
    color: #f4c86f;
}

.certificates-close:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* Contenu de la modale */
.certificates-content {
    color: #ecf0f1;
}

.certificates-title {
    font-family: var(--font-heading, 'Crimson Text', Georgia, serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 2rem;
    line-height: 1.2;
    text-align: center;
}

/* Certificat */
.certificate {
    margin-bottom: 3rem;
}

.certificate:last-child {
    margin-bottom: 0;
}

.certificate-subtitle {
    font-family: var(--font-heading, 'Crimson Text', Georgia, serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.certificate-content {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(236, 240, 241, 0.9);
    margin-bottom: 1.5rem;
}

.certificate-content p {
    margin-bottom: 1rem;
}

.certificate-content p:last-child {
    margin-bottom: 0;
}

/* Liste de procédure */
.certificate-procedure {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.certificate-procedure li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.certificate-procedure li:last-child {
    margin-bottom: 0;
}

/* Liste halakhot */
.certificate-halakhot {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.certificate-halakhot li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.certificate-halakhot li:last-child {
    margin-bottom: 0;
}

/* Avertissement */
.certificate-warning {
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid #d4af37;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(236, 240, 241, 0.95);
}

.certificate-warning::before {
    content: "⚠️ ";
    margin-right: 0.5rem;
}

/* Séparateur entre les certificats */
.certificate-separator {
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 3rem 0;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .certificates-modal {
        padding: 2rem 1.5rem;
        max-width: 95%;
        max-height: 95vh;
    }
    
    .certificates-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .certificate-subtitle {
        font-size: 1.25rem;
    }
    
    .certificate-content {
        font-size: 0.95rem;
    }
    
    .certificates-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .certificates-modal {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .certificates-title {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
    
    .certificate-subtitle {
        font-size: 1.1rem;
    }
    
    .certificate-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .certificate {
        margin-bottom: 2rem;
    }
    
    .certificate-separator {
        margin: 2rem 0;
    }
}

/* Scrollbar personnalisée pour la modale */
.certificates-modal::-webkit-scrollbar {
    width: 8px;
}

.certificates-modal::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 4px;
}

.certificates-modal::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

.certificates-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

