/* Styles Django - Administration et Composants Modernes */

/* Page de Paramétrage (paramsEdit.php) */
#django-config-page { 
    width: 100% !important; 
    max-width: 1200px !important; 
    margin: 20px auto !important; 
    position: static !important; 
}
.form-dj-reset { 
    background: #f9f9f9 !important; 
    border: 1px solid #ddd !important; 
    width: 100% !important; 
    position: static !important; 
    margin: 0 !important; 
    padding: 20px !important; 
    box-sizing: border-box !important; 
}
.header-django { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.tabs-django { 
    display: flex; 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    border-bottom: 2px solid #D2B48C; 
    flex-wrap: wrap; 
}
.tab-dj { 
    padding: 10px 20px; 
    cursor: pointer; 
    border: 1px solid transparent; 
    border-bottom: none; 
    margin-bottom: -2px; 
    font-weight: bold; 
    color: #8B4513; 
}
.tab-dj.active { 
    background: #fff; 
    border-color: #D2B48C; 
    border-top: 3px solid #8B4513; 
    color: #2b1d1a; 
}
.content-django { 
    background: #fff; 
    border: 1px solid #D2B48C; 
    border-top: none; 
    padding: 20px; 
    min-height: 400px; 
}
.pane-dj { display: none; }
.pane-dj.active { display: block !important; }
.section-dj { 
    margin-bottom: 20px; 
    padding: 15px; 
    border: 1px solid #eee; 
    border-radius: 4px; 
}
.section-dj-title { 
    font-weight: bold; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #eee; 
    color: #8B4513; 
}
.form-group-django { margin-bottom: 15px; }
.label-django { 
    display: block !important; 
    width: auto !important; 
    float: none !important; 
    margin-bottom: 5px !important; 
    font-weight: bold !important; 
    color: #333 !important; 
}
.input-django { 
    display: block !important; 
    width: 100% !important; 
    padding: 8px !important; 
    border: 1px solid #ccc !important; 
    border-radius: 4px !important; 
    box-sizing: border-box !important; 
    background: #fff !important; 
    color: #333 !important; 
}
.input-group-django { position: relative; display: flex; }
.btn-toggle-pwd { 
    position: absolute; 
    right: 5px; 
    top: 5px; 
    border: none; 
    background: transparent; 
    cursor: pointer; 
}
.btn-dj { 
    padding: 8px 15px; 
    border-radius: 4px; 
    border: 1px solid #ccc; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-block; 
    margin-bottom: 5px; 
}
.btn-dj-primary { background: #8B4513; color: #fff; }
.btn-dj-info { background: #D2B48C; color: #2b1d1a; }
.footer-save-dj { 
    margin-top: 20px; 
    padding: 20px; 
    background: #F5F5DC; 
    border: 1px solid #D2B48C; 
    border-radius: 8px; 
}
.spin { animation: spin 2s infinite linear; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(359deg); } }

/* Filtres de Médias (listeMedias.php) */
.filter-section { margin-bottom: 25px; }
.filter-bar { 
    background: #f8f9fa; 
    padding: 25px; 
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 10px;
}
.filter-btn { 
    margin: 5px; 
    border-radius: 20px; 
    transition: all 0.2s;
    font-weight: bold;
    cursor: pointer;
}
.filter-btn.inactive {
    opacity: 0.3;
    filter: grayscale(100%);
    border-style: dashed !important;
    background-color: #eee !important;
    color: #999 !important;
    border-color: #ccc !important;
}
.filter-btn:hover {
    transform: scale(1.05);
    opacity: 1;
    filter: none;
}
.pagination-container { margin-top: 40px; margin-bottom: 40px; }
.btn-apply {
    margin-top: 20px;
    padding: 10px 40px;
    font-size: 1.2em;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.toggle-filters-btn {
    background-color: #2b1d1a;
    color: #D2B48C;
    border: 1px solid #D2B48C;
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: bold;
    transition: all 0.3s;
}
.toggle-filters-btn:hover {
    background-color: #D2B48C;
    color: #2b1d1a;
}

/* Grille de médias Flexbox */
.media-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.media-grid > div[class*="col-"] {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}
.media-link-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Utilitaires logs et texte */
.textarea-footer-dj { 
    display: block !important; 
    width: 100% !important; 
    height: 350px !important; 
    padding: 15px !important; 
    font-family: monospace !important; 
    font-size: 14px !important; 
    background: #2b1d1a !important; 
    color: #f5f5dc !important; 
    border: 1px solid #1a1210 !important; 
    border-radius: 8px !important; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important; 
    box-sizing: border-box !important; 
}
.well-log-dj { 
    background: #fff !important; 
    min-height: 500px !important; 
    max-height: 800px !important; 
    overflow: auto !important; 
    padding: 15px !important; 
    border: 1px solid #ddd !important; 
    border-radius: 4px !important; 
}
.render-html-dj { background: white; padding: 10px; }

/* Responsive */
@media (max-width: 768px) {
    .header-django { flex-direction: column; align-items: stretch; text-align: center; }
    .header-django h1 { margin-bottom: 15px; font-size: 24px; }
    .btn-dj { width: 100%; text-align: left; }
    .tabs-django { justify-content: space-around; }
    .tab-dj { flex-grow: 1; text-align: center; padding: 10px 5px; font-size: 12px; }
}
