/* 
   File         : statistics.css
   Description  : General styles with responsive layout
*/


.stat-card { 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    padding: 20px; 
    margin-bottom: 30px; 
}

.stat-summary { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 15px; 
    margin: 20px 0; 
}
.summary-item { 
    text-align: center; 
    background: #f8f9fa; 
    padding: 15px; 
    border-radius: 6px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
.summary-value { 
    font-size: 22px; 
    font-weight: bold; 
    color: #3F71AE; 
}
.summary-label { 
    font-size: 12px; 
    color: #6c757d; 
    margin-top: 5px; 
}
.stat-description { 
    color: #495057; 
    font-size: 14px; 
    line-height: 1.5; 
    margin: 15px 0; 
}
.chart-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-top: 15px; 
}
.chart-container { 
    min-height: 300px; 
    height: 400px; 
    margin-top: 15px; 
}
.type-stats { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 8px; 
}
.type-row { 
    display: flex; 
    align-items: center; 
    margin-bottom: 5px; 
}
.type-label { 
    width: 80px; 
    font-weight: 500; 
}
.type-bar-container { 
    flex-grow: 1; 
    background-color: #e9ecef; 
    height: 10px; 
    border-radius: 5px; 
    margin: 0 10px; 
    overflow: hidden; 
}
.type-bar { 
    background: linear-gradient(90deg, #3F71AE, #5a8bc4); 
    height: 100%; 
    border-radius: 5px; 
}
.type-count { 
    width: 100px; 
    text-align: right; 
    font-size: 13px; 
    color: #6c757d; 
}

/* Table styles - unified with tables.css */
.table-responsive { 
    overflow-x: auto; 
    margin: 20px 0; 
}

.organism-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 14px; 
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.organism-table th { 
    background: #3F71AE; 
    color: white; 
    padding: 12px; 
    text-align: left; 
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.organism-table td { 
    padding: 12px; 
    border-bottom: 1px solid #e2e8f0; 
}

.organism-table tr:nth-child(even) { 
    background-color: #f8f9fa; 
}

.organism-table tr:nth-child(odd) { 
    background-color: #ffffff; 
}

.organism-table tr:hover { 
    background-color: #f7fafc; 
}

.organism-table a {
    color: #3F71AE;
    text-decoration: none;
    transition: color 0.2s ease;
}

.organism-table a:hover {
    color: #2d5a8a;
    text-decoration: underline;
}
.organism-chart { 
    margin-top: 30px; 
}
.news-section { 
    margin-top: 30px; 
}
.news-item { 
    margin-bottom: 20px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #eee; 
}
.news-date { 
    font-size: 12px; 
    color: #6c757d; 
}


/* Interactive elements styles */
#unique-molecules-trigger, #molecule-types-link, #total-organisms-trigger {
    cursor: pointer;
    position: relative;
}

#unique-molecules-trigger:hover, #total-organisms-trigger:hover {
    background-color: #eaf2fd;
}

#molecule-types-link {
    color: #3F71AE;
    text-decoration: underline;
}

.toggle-icon {
    font-size: 10px;
    margin-left: 3px;
    color: #3F71AE;
}

/* Animation for expandable sections */
.molecule-distribution, .organism-details {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

/* Masquer par défaut la distribution et faciliter la transition */
#molecule-distribution,
#organism-details {
    display: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}