/* static/css/main.css - Styles principaux */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    padding-top: 0;
    background-color: #f5f5f5;
    color: #333;
}

/* En-tête fixe */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    background-color: #f5f5f5;
    z-index: 1000;
    padding: 25px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fixed-header .search-box {
    margin-bottom: 1px;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
}

.main-content {
    margin-top: 170px;
    padding: 0 20px;
}

.fixed-header h1 {
    margin-top: 0;
}

/* Titre et administration */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-button {
    padding: 5px 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-button:hover {
    background-color: #2980b9;
}

.admin-badge {
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Navigation de chemin */
.path-navigation {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Recherche */
.search-box {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-input {
    flex: 1;
    min-width: 0;      /* clé pour flex sur mobile */
}


.search-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.search-button:hover {
    background-color: #27ae60;
}

.search-clear-btn {
    flex-shrink: 0;
}

.search-clear-btn:hover {
    background-color: #ccc;
    color: #333;
}

.search-results {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

/* Conteneur principal */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.loading .container {
    opacity: 0.6;
}

/* Vignettes */
.item {
    width: calc(20% - 16px);
    height: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 20px;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.item-header {
    height: 150px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.item-header img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-header img[data-src] {
    opacity: 0;
}

.item-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: bold;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-parent {
    font-size: 11px;
    color: #6c757d;
    margin-top: 3px;
    font-style: italic;
}

/* Descriptions */
.item-description-container {
    position: relative;
    margin: 5px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-description {
    font-size: 13px;
    color: #555;
    overflow: hidden;
    transition: max-height 0.3s;
    line-height: 1.4;
}

.short-description {
    max-height: 58px;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.enlarge-button {
    position: absolute;
    background: none;
    border: none;
    color: #3498db;
    font-size: 10px;
    cursor: pointer;
    margin-top: 5px;
    display: block;
    right: 10px;
    align-items: center;
    padding: 0;
}

.enlarge-button:hover {
    text-decoration: underline;
}

.enlarge-icon {
    margin-right: 5px;
    font-size: 14px;
}

/* Badges */
.file-type-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    z-index: 11;
}

.file-order-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 3px 8px;
    background-color: #27ae60;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.type-image { background-color: #27ae60; }
.type-video { background-color: #e74c3c; }
.type-audio { background-color: #9b59b6; }
.type-document { background-color: #3498db; }
.type-unknown { background-color: #7f8c8d; }

/* Boutons flottants */
.floating-button {
    position: absolute;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 9px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.floating-button:hover {
    transform: scale(1.1);
}

/* Boutons flottants */
.floating-buttonAP {
    position: absolute;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 9px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    left: 40px;
}

.floating-buttonAP:hover {
    transform: scale(1.1);
}

.open-buttonAP {
    bottom: 10px;
    left: 60px;
    background-color: rgba(52, 152, 219, 0.8);
}

.open-button {
    bottom: 10px;
    left: 10px;
    background-color: rgba(52, 152, 219, 0.8);
}

.open-button:hover {
    background-color: rgba(52, 152, 219, 1);
}

.edit-button {
    top: 30px;
    right: 10px;
    background-color: rgba(231, 76, 60, 0.8);
}

.edit-button:hover {
    background-color: rgba(231, 76, 60, 1);
}

/* Menu de téléchargement */
.download-menu-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
}

.download-button {
    bottom: 10px;
    right: 10px;
    background-color: rgba(46, 204, 113, 0.8);
    display: flex;
    align-items: center;
    gap: 3px;
}

.download-button:hover {
    background-color: rgba(46, 204, 113, 1);
}

.download-count {
    font-size: 10px;
}

.download-menu {
    bottom: 35px;
    right: 0;
    top: auto;
    max-width: 200px;
    position: absolute;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 220px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.download-menu-header {
    padding: 8px 12px;
    font-size: 12px;
    color: #777;
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.download-menu-items {
    max-height: 200px;
    overflow-y: auto;
}

.download-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.download-menu-item:hover {
    background-color: #f5f5f5;
}

/* Icônes */
.folder-icon, .file-icon {
    font-size: 50px;
    color: #2196f3;
}

.file-icon {
    color: #757575;
}

.file-icon-pdf { color: #e74c3c; }
.file-icon-audio { color: #9b59b6; }
.file-icon-video { color: #e67e22; }
.file-icon-image { color: #27ae60; }
.file-icon-doc { color: #3498db; }

/* Conteneurs média */
.audio-player, .video-player {
    width: 100%;
    height: 150px;
    background-color: #000;
}

.placeholder-icon {
    font-size: 50px;
    color: #9e9e9e;
}

.video-container, .audio-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder, .audio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: background-color 0.3s;
}

.video-placeholder:hover, .audio-placeholder:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.play-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 20px;
    transition: transform 0.3s, background-color 0.3s;
}

.video-container:hover .play-button, .audio-container:hover .play-button {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.9);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.video-container:hover .video-thumbnail {
    opacity: 0.6;
}

.video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.play-button {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-container:hover .play-button {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.9);
} 

/* Directories */
.directory {
    background-color: #e3f2fd;
}

.directory .item-header {
    background-color: #bbdefb;
}

/* Navigation */
.back-button {
    display: inline-block;
    margin-bottom: 20px;
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
}

.back-button:hover {
    background-color: #2980b9;
}

.no-items {
    width: 100%;
    text-align: center;
    font-style: italic;
    color: #7f8c8d;
    margin-top: 50px;
}

/* Messages flash */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Animation de chargement */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loader global */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.page-loader.visible {
    opacity: 1;
    pointer-events: all;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Filtres */
.nl2br {
    white-space: pre-line;
}

/* Modals de base */
.login-modal, .edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    max-width: 90%;
}

.modal-title {
    margin-top: 0;
    color: #2c3e50;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-form input, .modal-form textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal-form button {
    padding: 8px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-form button:hover {
    background-color: #2980b9;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* Modal d'édition */
.edit-modal-content {
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    color: #666;
}

.tab-button:hover {
    background-color: #f5f5f5;
    color: #333;
}

.tab-button.active {
    border-bottom-color: #3498db;
    color: #3498db;
    font-weight: bold;
}

.tab-content {
    min-height: 250px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.description-format-help {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    font-style: italic;
}

.attachments-section {
    margin-bottom: 25px;
}

.attachments-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.action-button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: #2980b9;
}

/* Attachments */
.attachment-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 15px;
}

.no-attachments {
    padding: 10px;
    color: #777;
    font-style: italic;
    text-align: center;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-item:hover {
    background-color: #f9f9f9;
}

.attachment-name {
    flex-grow: 1;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-actions {
    display: flex;
    gap: 5px;
}

.attachment-download,
.attachment-delete {
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.attachment-download {
    color: #3498db;
}

.attachment-download:hover {
    background-color: #e1f0fa;
}

.attachment-delete {
    color: #e74c3c;
}

.attachment-delete:hover {
    background-color: #fde3e3;
}

/* Upload */
.upload-form {
    margin-top: 15px;
}

.upload-input-container {
    margin-bottom: 15px;
}

.upload-input-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.attachment-drop-area {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.attachment-drop-area:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.attachment-drop-area.drag-over {
    border-color: #2ecc71;
    background-color: #eafaf1;
}

.attachment-drop-message {
    color: #777;
    margin-bottom: 5px;
}

.attachment-file-list {
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 13px;
    color: #555;
}

.attachment-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.attachment-file-item:last-child {
    border-bottom: none;
}        

.attachment-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.attachment-file-remove {
    cursor: pointer;
    color: #e74c3c;
    font-size: 16px;
}

.attachment-file-remove:hover {
    color: #c0392b;
}

/* Modal de description */
.description-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    align-items: center;
    justify-content: center;
}

.description-modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    padding: 25px;
    position: relative;
}

.description-text {
    max-height: calc(80vh - 130px);
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
}

.description-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.description-close:hover {
    color: #333;
}

/* Lecteur audio global */
.global-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    display: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.global-audio-player.active {
    transform: translateY(0);
    display: block;
}

.global-player-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.now-playing {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-label {
    font-weight: bold;
    margin-right: 10px;
}

.player-controls {
    display: flex;
    gap: 15px;
}

.player-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* Répertoires protégés */
.directory.protected {
    border: 2px solid #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.directory.protected:hover {
    border-color: #e67e22;
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

.directory.protected.no-access {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Icône de cadenas */
.lock-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-color: #f39c12;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.directory.protected.no-access .lock-icon {
    background-color: #e74c3c;
}

/* Modal de saisie du mot de passe */
.password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    align-items: center;
    justify-content: center;
}

.password-modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 400px;
    max-width: 90%;
    padding: 0;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.password-modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.password-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.password-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.password-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.password-modal-body {
    padding: 30px;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.password-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-form-label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.password-form-input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.password-form-input:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.password-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.password-form-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.password-form-btn-primary {
    background-color: #3498db;
    color: white;
}

.password-form-btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.password-form-btn-primary:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.password-form-btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.password-form-btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

/* Message d'erreur dans le modal */
.password-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.password-error-message.show {
    display: block;
}

/* Message de succès */
.password-success-message {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #363;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.password-success-message.show {
    display: block;
}

/* Indicateur de chargement dans le modal */
.password-loading {
    display: none;
    text-align: center;
    margin: 10px 0;
}

.password-loading.show {
    display: block;
}

.password-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Information sur les tentatives */
.password-attempts-info {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.password-attempts-info.show {
    display: block;
}

/* Badge pour indiquer un répertoire protégé */
.protected-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Styles pour les répertoires sans accès */
.directory.no-access .item-header {
    background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
}

.directory.no-access .item-title {
    color: #7f8c8d;
}

.directory.no-access:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive pour le modal de mot de passe */
@media (max-width: 480px) {
    .password-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .password-modal-header {
        padding: 15px;
    }
    
    .password-modal-title {
        font-size: 16px;
    }
    
    .password-modal-body {
        padding: 20px;
    }
    
    .password-form-actions {
        flex-direction: column;
    }
    
    .password-form-btn {
        width: 100%;
    }
}

/* Animation pour les changements d'état */
.directory {
    transition: all 0.3s ease;
}

.directory.protected {
    transition: all 0.3s ease, border-color 0.2s ease;
}

/* Style pour le dossier en cours de vérification */
.directory.checking-password {
    opacity: 0.6;
    pointer-events: none;
}

.directory.checking-password .lock-icon {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Style pour les messages flash spécifiques à l'accès */
.flash-message.flash-access-denied {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.flash-message.flash-access-granted {
    background-color: #efe;
    color: #363;
    border-left: 4px solid #363;
}