body {
    overflow-x: scroll;
}
.ui.inverted.bottom.attached.tab.segment {
    width: 99%;
    margin: auto;
    border-radius: 5px;
    border-color: transparent;
}

.dropdown_pa {
    height: 30px;
    padding: 14px;
    margin: auto;
    font-size: .9rem;
    font-weight: bold;
}

.item.dropdown_pa {
    margin: 0 !important;
    height: 30px !important;
    padding: 8px 16px !important;
    font-size: 16px !important;
    text-align: left;
}

.label_item {
    color: white !important;
}

.traitement {
    text-align: center !important;
    margin: auto !important;
    padding: 5px !important;
}

.trash {
    margin: 0 !important;
}

.groupes {
    width: 1.12rem;
    height: 1.12rem;
}

.dataTables_filter {
    color: #FFFFFF !important;
}

.dataTables_scrollBody {
    background-color: white !important;
}

.ui.link.list:hover{
    color: black;
    font-weight: bold;
    font-size: 1em;
}

.django-ckeditor-widget {
    width: 100%;
}

#cke_id_email_body {
    width: 100% !important;
}

#cke_id_legal_notice {
    width: 100% !important;
}

#cke_id_footer {
    width: 100% !important;
}

#cke_id_message {
    width: 100% !important;
}

.scrollToTop {
    width: 30px;
    height: 40px;
    /*background:lightgrey;*/
    border-radius: 5px;
    border: solid 1px lightgrey;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    right: 10px;
    bottom: 20px;
    cursor: pointer;
}

/* static/css/photo-table.css */
.photo-thumbnail {
    zoom: 17%;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0;
    padding: 0;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
    border-color: #2185d0;
    box-shadow: 0 4px 12px rgba(33, 133, 208, 0.3);
}

.photo-thumbnail.small {
    width: 50px;
    height: 50px;
}

.modal-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.image-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.face-indicator {
    display: inline-block;
    padding: 5px 10px;
    background: #2185d0;
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
}

/**
 * CSS pour le Widget de Graphique Mensuel
 * Version: FINAL
 * Compatible avec: Semantic UI
 */

/* ================================ */
/* CONTENEUR PRINCIPAL DU WIDGET   */
/* ================================ */

.monthly-chart-container {
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ================================ */
/* ZONE DU GRAPHIQUE               */
/* ================================ */

.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    padding: 1rem 0;
}

.chart-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ================================ */
/* STATISTIQUES                     */
/* ================================ */

.ui.mini.statistics {
    margin-top: 1rem !important;
    padding-top: 1rem;
    border-top: 1px solid rgba(34, 36, 38, 0.1);
}

.ui.mini.statistics .statistic > .value {
    font-size: 1.2rem !important;
    font-weight: 600;
    color: #2c3e50;
}

.ui.mini.statistics .statistic > .label {
    font-size: 0.8rem !important;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Couleurs pour les statistiques */
.ui.mini.statistics .statistic.green > .value {
    color: #27ae60 !important;
}

.ui.mini.statistics .statistic.red > .value {
    color: #e74c3c !important;
}

/* ================================ */
/* CONTRÔLES ET BOUTONS             */
/* ================================ */

.ui.secondary.menu {
    border-bottom: 1px solid rgba(34, 36, 38, 0.1);
    margin-bottom: 1rem;
}

.ui.buttons .ui.button {
    transition: all 0.3s ease;
    border-radius: 4px;
}

.ui.buttons .ui.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ui.buttons .ui.button.active {
    background-color: #3498db !important;
    color: white !important;
}

.ui.icon.button {
    padding: 0.8rem !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ui.icon.button:hover {
    background-color: #ecf0f1;
    transform: rotate(180deg);
}

/* ================================ */
/* LOADER ET MESSAGES D'ERREUR     */
/* ================================ */

.chart-loader {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-radius: 8px;
}

.chart-loader.active {
    display: flex !important;
}

.chart-loader .ui.loader {
    color: #3498db;
}

.ui.negative.message {
    margin: 0 0 1rem 0;
    border-radius: 6px;
    animation: slideInDown 0.3s ease-out;
}

.ui.negative.message .close.icon {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.ui.negative.message .close.icon:hover {
    opacity: 1;
}

/* ================================ */
/* RESPONSIVE DESIGN                */
/* ================================ */

@media (max-width: 768px) {
    .monthly-chart-container {
        margin: 0.5rem 0;
        border-radius: 4px;
    }

    .chart-container {
        min-height: 250px !important;
        padding: 0.5rem 0;
    }

    .ui.mini.statistics {
        flex-direction: column !important;
        margin-top: 0.5rem !important;
    }

    .ui.mini.statistics .statistic {
        margin: 0.25rem 0 !important;
        text-align: center !important;
    }

    .ui.secondary.menu {
        flex-direction: column;
        align-items: stretch;
    }

    .ui.secondary.menu .item {
        justify-content: center;
        margin: 0.25rem 0;
    }

    .ui.buttons {
        width: 100%;
        justify-content: center;
    }

    .ui.buttons .ui.button {
        flex: 1;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        min-height: 200px !important;
    }

    .ui.mini.statistics .statistic > .value {
        font-size: 1rem !important;
    }

    .ui.mini.statistics .statistic > .label {
        font-size: 0.7rem !important;
    }

    .monthly-chart-container .ui.header {
        font-size: 1.2rem !important;
    }

    .monthly-chart-container .ui.header .sub.header {
        font-size: 0.9rem !important;
    }
}

/* ================================ */
/* ANIMATIONS                       */
/* ================================ */

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.monthly-chart-container {
    animation: fadeIn 0.5s ease-in;
}

/* ================================ */
/* AMÉLIORATION DE L'INTERFACE      */
/* ================================ */

/* Header du widget */
.monthly-chart-container .ui.header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.monthly-chart-container .ui.header .icon {
    color: #3498db;
}

.next-update-info {
    font-weight: normal !important;
    opacity: 0.8;
}

/* Amélioration des tooltips Chart.js */
.chartjs-tooltip {
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Focus et accessibilité */
.ui.button:focus,
.ui.icon.button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* ================================ */
/* THÈME SOMBRE (optionnel)         */
/* ================================ */

@media (prefers-color-scheme: dark) {
    .monthly-chart-container {
        background-color: #2c3e50;
        color: #ecf0f1;
    }

    .ui.mini.statistics .statistic > .value {
        color: #ecf0f1;
    }

    .ui.mini.statistics .statistic > .label {
        color: #bdc3c7;
    }

    .chart-container {
        background-color: #34495e;
        border-radius: 6px;
    }

    .ui.secondary.menu {
        background-color: #34495e;
        border-color: #485a6b;
    }

    .chart-loader {
        background-color: rgba(44, 62, 80, 0.95) !important;
    }
}

/* ================================ */
/* PRINT STYLES                     */
/* ================================ */

@media print {
    .monthly-chart-container {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .ui.secondary.menu,
    .ui.button,
    .chart-loader {
        display: none !important;
    }

    .chart-container {
        min-height: 400px !important;
    }

    .ui.mini.statistics {
        border-top: 2px solid #000;
        margin-top: 1rem;
        padding-top: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .photo-thumbnail {
        zoom: 3%;
    }

    .ui.table {
        font-size: 0.9em;
    }

    #monthlyChartWidget .ui.statistics {
        flex-direction: column;
    }

    #monthlyChartWidget .chart-container {
        height: 250px;
    }
}
