html{
    --bg-color-btn : #F5F5F5;
    --color-text : white;
    --font-text: 'AMUMonumentGrotesk', 'Arial';
    --color-title : #00558b;
}

:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --accent-color: #9966ff;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --text-muted: #718096;
    --primary-gradient: linear-gradient(135deg, #33CCFF 0%, #9966ff 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}


body{
    margin : 0;
    padding: 0;

}

#content{
    font-family: var(--font-text), serif ;
}


.title_h1{
    padding: 2%;
    color: var(--color-title);
    font-weight: bolder;
    font-size: 2vw;
    text-align: center;
    text-transform: uppercase;

}

/* Cards Documents à la une */
.featured-documents {
    background-color: var(--secondary-color);
    border-radius: 15px;
    color: white;
    margin-bottom: 2rem;
}

.featured-document-body{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 2rem;
    flex-direction: row;
}
.featured-document-header{
    display: flex;
    gap: 0.75rem;
    flex: 1;
    align-items: center;
}

.document-meta .badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}


.document-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card-icon.statuts { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-icon.reglement { background: linear-gradient(135deg, #f093fb, #f5576c); }
.card-icon.election { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-icon.delegation { background: linear-gradient(135deg, #43e97b, #38f9d7); }

/* Derniers docs publiés */
.last_published{
    border-right: 4px solid var(--primary-color);
    border-top: 4px solid var(--primary-color);
}
.documents-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;

}

.feed-item {
    background: #fff;
    /*border: 1px solid var(--secondary-color);*/
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feed-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.feed-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.feed-header {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    align-items: center;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feed-info {
    flex: 1;
    min-width: 0;
}

.feed-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.feed-meta .badge {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}


/* Animation d'apparition */
.feed-item {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

.feed-item:nth-child(1) { animation-delay: 0.1s; }
.feed-item:nth-child(2) { animation-delay: 0.2s; }
.feed-item:nth-child(3) { animation-delay: 0.3s; }

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

/* Filtres modernisés */
.filters-container {
    background: white;
    border: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-tab {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.search-tab:hover,
.search-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Navigation par onglets */
.nav-tabs-custom {
    border-bottom: 3px solid var(--border-color);
    margin-bottom: 2rem;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-tabs-custom .nav-link:hover {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.nav-tabs-custom .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: none;
}

/* Sidebar de navigation */
/* Conteneur principal de la sidebar */
.sidebar-nav {
    background: #ebf0f3;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-nav h5 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Styles généraux pour les éléments de navigation */
.sidebar-item {
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 14px;
    position: relative;
}

.sidebar-item:hover {
    background-color: #e9ecef;
    transform: translateX(2px);
}

.sidebar-item.active {
    background-color: #007bff;
    color: white;
    font-weight: 500;
}

.sidebar-item.active:hover {
    background-color: #0056b3;
}


#year-filter {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    font-size: 0.875rem;
}

#year-filter:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}
/* Contenu des éléments avec icônes et texte */
.sidebar-item-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.sidebar-item i {
    font-size: 16px;
    min-width: 20px;
}

.sidebar-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icône d'expansion */
.expand-icon {
    transition: transform 0.3s ease;
    font-size: 12px !important;
    opacity: 0.7;
}

.sidebar-item.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Niveaux hiérarchiques */
.sidebar-item.level-1 {
    font-weight: 600;
    background-color: white;
    border: 1px solid #dee2e6;
}

.sidebar-item.level-1.active {
    background-color: #007bff;
    border-color: #007bff;
}

.sidebar-item.level-2 {
    margin-left: 20px;
    background-color: #ffffff;
    border-left: 3px solid #e9ecef;
    color: #6c757d;
}

.sidebar-item.level-2.active {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
}

.sidebar-item.level-3 {
    margin-left: 40px;
    background-color: #fafafa;
    color: #6c757d;
    font-size: 13px;
}

.sidebar-item.level-3.active {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.sidebar-item.level-4 {
    margin-left: 60px;
    background-color: #f5f5f5;
    color: #757575;
    font-size: 12px;
    padding: 8px 15px;
}

.sidebar-item.level-4.active {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Sous-sections (conteneurs des éléments pliables) */
.sidebar-subsection {
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-subsection.expanded {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Éléments expandables */
.sidebar-item.expandable {
    position: relative;
}

.sidebar-item.expandable:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.sidebar-item.expandable.expanded:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Animation pour l'ouverture des sous-sections */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* États de focus pour l'accessibilité */
.sidebar-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar-nav {
        padding: 15px;
    }

    .sidebar-item {
        padding: 12px;
        font-size: 13px;
    }

    .sidebar-item.level-2 {
        margin-left: 15px;
    }

    .sidebar-item.level-3 {
        margin-left: 30px;
    }

    .sidebar-item.level-4 {
        margin-left: 45px;
    }

    .loading-spinner {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Styles pour les icônes Bootstrap spécifiques */
.bi-house, .bi-file-text, .bi-people, .bi-mortarboard,
.bi-folder, .bi-file-earmark, .bi-dot {
    color: inherit;
}

/* Effet de survol amélioré */
.sidebar-item:not(.active):hover {
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Séparateur visuel entre les instances principales */
.sidebar-item.level-1 + .sidebar-subsection + .sidebar-item.level-1 {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

/* Overlay de chargement simple */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-spinner {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.loading-spinner p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Zone de contenu principal */
.content-area {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Liste des documents */
.document-list {
    display: grid;
    gap: 1rem;
}

.document-item {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    background: white;
}

.document-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.1);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}


.document-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    word-break: break-word;
    max-width: 100%;
}

.document-title h4 {
    margin: 0;
    word-break: break-word;
    line-height: 1.4;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 14px;
    color: var(--text-muted);
    align-items: center;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.document-meta .badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

/* Badge custom */
.badge-custom {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    white-space: nowrap;
}

/* Actions du document */
.document-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.download-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.875rem;
}

.download-btn:hover {
    background: #d69e2e;
    color: white;
    transform: translateY(-2px);
}



/* Groupe de documents */
.document-group {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Document maître */
.master-document {
    background: white;
    border-left: 4px solid var(--primary-color);
    border-bottom: 4px solid var(--primary-color);
}

.master-document .document-header {
    padding: 1.25rem;
}

/* Actions du document */
.document-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Compteur d'annexes */
.annexe-count {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* Bouton toggle annexes */
.toggle-annexes-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.toggle-annexes-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.toggle-annexes-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}


.toggle-annexes-btn.active svg {
    transform: rotate(180deg);
}

/* Conteneur des annexes */
.annexes-container {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.annexes-container.show {
    max-height: 1000px;
    display: block;
}

/* Documents annexes */
.annexe-document {
    background: transparent;
    border-left: 3px solid #6c757d;
    margin: 0;
}

.annexe-document .document-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.annexe-document:last-child .document-header {
    border-bottom: none;
}

/* Titre des annexes */
.annexe-title {
    font-size: 0.95rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-break: break-word;
}

.annexe-title svg {
    color: #6c757d;
    flex-shrink: 0;
}

/* Badge annexe */
.annexe-badge {
    background: #6c757d;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Bouton de téléchargement petit */
.download-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Animation pour les annexes */
.annexes-container {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.annexes-container.show {
    max-height: 1000px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .document-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .toggle-annexes-btn,
    .download-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Breadcrumb */
.breadcrumb-nav {
    background: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    color: var(--text-muted);
}

/* Animation d'apparition */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
svg{
    width: 30px;
}

/* ========================================
   MEDIA QUERIES - RESPONSIVE
   ======================================== */


/* Tablettes et écrans moyens (≤ 992px) */
@media (max-width: 992px) {
    .document-item {
        padding: 1.25rem;
    }

    .document-title {
        font-size: 17px;
    }

    .document-meta {
        font-size: 13px;
    }
}

/* Tablettes (≤ 768px) */
@media (max-width: 768px) {

    .sidebar-nav {
        position: relative;
        margin-bottom: 1rem;
    }

    .search-tabs {
        justify-content: center;
    }
    .document-item {
        padding: 1rem;
    }

    .document-header {
        flex-direction: column;
        align-items: stretch;
    }

    .document-title {
        font-size: 16px;
        margin-bottom: 0.75rem;
    }

    .document-title h4 {
        font-size: 1.1rem;
    }

    .document-meta {
        font-size: 0.8125rem;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .document-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .toggle-annexes-btn,
    .download-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    /* Annexes responsive */
    .annexe-document .document-header {
        padding: 0.875rem 1rem;
    }

    .master-document .document-header {
        padding: 1rem;
    }
}

/* Mobiles (≤ 576px) */
@media (max-width: 576px) {
    .document-item {
        padding: 0.875rem;
    }

    .document-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        font-size: 15px;
    }

    .document-title h4 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .annexe-count {
        font-size: 0.8125rem;
        margin-left: 0;
    }

    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        font-size: 0.75rem;
        width: 100%;
    }

    .document-meta span {
        width: 100%;
    }

    .badge-custom {
        display: inline-block;
        margin-top: 0.25rem;
        font-size: 11px;
    }

    .document-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .toggle-annexes-btn,
    .download-btn {
        width: 100%;
        padding: 0.625rem 1rem;
        justify-content: center;
    }

    .download-btn-sm {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Annexes */
    .annexe-document {
        margin-left: 0.5rem;
        border-left-width: 2px;
    }

    .annexe-document .document-header {
        padding: 0.75rem;
    }

    .annexe-title {
        font-size: 0.875rem;
    }

    .annexe-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.4rem;
    }

    .master-document .document-header {
        padding: 0.875rem;
    }

    /* Groupe de documents */
    .document-group {
        margin-bottom: 1rem;
    }

    .feed-content {
        flex-direction: column;
    }

    .featured-document-body{
        flex-direction: column;
    }

}

/* Très petits mobiles (≤ 400px) */
@media (max-width: 400px) {
    .document-item {
        padding: 0.75rem;
    }

    .document-title h4 {
        font-size: 0.9375rem;
    }

    .document-meta {
        font-size: 0.6875rem;
    }

    .document-meta span {
        gap: 0.2rem;
    }

    .download-btn,
    .toggle-annexes-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }

    .badge-custom {
        font-size: 10px;
        padding: 3px 8px;
    }

    .annexe-count {
        font-size: 0.75rem;
    }

    /* Réduire la taille des icônes sur très petits écrans */
    .document-meta svg,
    .download-btn svg,
    .toggle-annexes-btn svg,
    .annexe-title svg {
        width: 14px;
        height: 14px;
    }

    .feed-content {
        flex-direction: column;
    }

    .featured-document-body{
        flex-direction: column;
    }
}

/* Amélioration de l'accessibilité et des interactions tactiles */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter les zones de toucher pour mobile */
    .toggle-annexes-btn,
    .download-btn {
        min-height: 44px;
        padding: 0.625rem 1rem;
    }

    .document-item:hover {
        transform: none;
    }
}

/* Optimisation pour l'impression */
@media print {
    .document-actions {
        display: none;
    }

    .document-item {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .annexes-container {
        display: block !important;
        max-height: none !important;
    }
}

.footer_amu{
    background-color: #00558b;
}
