/**
 * Ergoview - Feuille de style complémentaire à Tailwind
 *
 * Contient uniquement les styles qui ne peuvent pas être
 * facilement reproduits avec Tailwind CSS
 */

/* ============================================
   MODAL POUR AFFICHAGE IMAGE EN GRAND
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 1rem;
    background-color: #f5f5f5;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.modal-image-container img.full-size-preview {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: #374151;
    z-index: 1010;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: white;
    transform: scale(1.1);
}

/* ============================================
   BOUNDING BOXES (détection d'objets)
   ============================================ */

.image-container {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    overflow: hidden;
    border-radius: 0.75rem;
}

.image-container img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bounding-box {
    position: absolute;
    border: 2px solid;
    border-radius: 2px;
    box-sizing: border-box;
    pointer-events: none;
}

.box-label {
    position: absolute;
    top: -18px;
    left: 0;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    border-radius: 3px 3px 0 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

/* ============================================
   CONTENU MARKDOWN GÉNÉRÉ
   ============================================ */

.markdown-content {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: #6366f1;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.markdown-content h1 {
    font-size: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.4rem;
}

.markdown-content h3 {
    font-size: 1.1rem;
}

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

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content ol li {
    list-style-type: decimal;
}

.markdown-content strong {
    color: #1e293b;
    font-weight: 700;
}

.markdown-content a {
    color: #6366f1;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.markdown-content th {
    background-color: #f1f5f9;
    font-weight: 600;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-in {
    animation: fadeIn 0.3s ease-out;
}
