/* style.css - Version personnalisée pour le système d'upload */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --header-height: 60px;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    width: auto;
    margin-right: 15px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: calc(var(--header-height) + 20px) auto 0;
    padding: 20px;
}

.language-selector {
    text-align: right;
    margin-bottom: 20px;
}

.language-selector a {
    text-decoration: none;
    color: var(--secondary-color);
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.language-selector a:hover {
    background-color: #e9e9e9;
}

.tabs {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background-color: #f1f1f1;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #e9e9e9;
}

.tab-button.active {
    background-color: white;
    border-bottom: 3px solid var(--primary-color);
    font-weight: bold;
}

.tab {
    display: none;
    padding: 20px;
}

.tab.active {
    display: block;
}

/* Login Form Styles */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-page-logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}

.form-group.hidden {
    opacity: 0;
    transform: translateY(-10px);
    margin-bottom: 0;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.form-actions button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.form-actions button:hover {
    background-color: var(--secondary-color);
}

.form-help-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Upload Form Styles */
.upload-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Files Table Styles */
#files-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#files-table th {
    background-color: #f2f2f2;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

#files-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

#files-table tr:hover {
    background-color: #f9f9f9;
}

/* Button Styles */
.tag-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.download-btn {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.download-btn:hover {
    background-color: #c8e6c9;
    transform: translateY(-1px);
}

/* Message Styles */
.success, .error {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--error-color);
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#current-user {
    font-weight: 500;
    color: white;
}

#logout-button {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
}

#logout-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tab {
        padding: 15px;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .tab-button {
        padding: 10px;
        font-size: 14px;
    }
    
    #files-table th, #files-table td {
        padding: 8px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .header-logo {
        height: 32px; /* Légèrement plus petit sur les écrans mobiles */
    }
    
    .login-page-logo {
        max-width: 100px; /* Légèrement plus petit sur les écrans mobiles */
    }
}

@media (max-width: 576px) {
    .header-title {
        font-size: 1rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .form-actions {
        justify-content: center;
    }
    
    .language-selector {
        text-align: center;
    }
    
    .header-logo {
        height: 28px; /* Encore plus petit sur les très petits écrans */
    }
}

/* À ajouter dans style.css */

/* Styles pour les boutons de partage */
.share-btn {
    background-color: #e3f2fd;
    color: #1565c0;
    margin-left: 5px;
}

.share-btn:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
}

/* Styles pour le bouton de suppression */
.delete-btn {
    background-color: #ffebee;
    color: #c62828;
    margin-left: 5px;
}

.delete-btn:hover {
    background-color: #ffcdd2;
    transform: translateY(-1px);
}

/* Styles pour la modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.modal.show {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.hide {
    background-color: rgba(0, 0, 0, 0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #e0e0e0;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal.show .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal.hide .modal-content {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-top: -10px;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
}

/* Styles pour le résultat du partage */
.share-url-container {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

#share-url {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f5f5f5;
}

.share-details {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
}

.share-details p {
    margin: 5px 0;
}

.admin-btn {
    background-color: #6c757d;
        color: white;
	}
	
	.admin-btn:hover {
	    background-color: #5a6268;
	    }
	    
	    .admin-link {
	        margin-top: 20px;
		    text-align: center;
		    }
		    

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* Utility classes for smooth transitions */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.fade-out {
    opacity: 1;
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.slide-in {
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.3s ease forwards;
}

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

/* Smooth height transitions for collapsible elements */
.collapsible {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Smooth transitions for form elements */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Hidden form group animation */
.form-group {
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    overflow: hidden;
}

.form-group.hidden {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Modal show/hide animations */
.modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal.hide {
    opacity: 0;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal.hide .modal-content {
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
}

.modal-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
}


/* Toggle Switch Styles */
.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
}

.toggle-switch label {
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-wrapper input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Hover effect */
.toggle-wrapper:hover .toggle-slider {
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Focus effect */
input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}


/* Ensure proper spacing between form groups and toggle switches */
.form-group + .toggle-switch {
    margin-top: 20px;
}

.toggle-switch + .form-actions {
    margin-top: 25px;
}

/* Make labels clickable for better UX */
.toggle-switch label {
    padding: 5px 0;
}

/* Disabled state for toggle switches */
.toggle-wrapper input:disabled + .toggle-slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.toggle-wrapper input:disabled + .toggle-slider:before {
    background-color: #f5f5f5;
}


/* Form actions button spacing */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 25px;
}

.form-actions button {
    min-width: 120px;
}

/* Ensure toggle switches have proper spacing */
.toggle-switch:first-child {
    margin-top: 0;
}

/* Style the horizontal separator */
hr {
    margin: 25px 0 \!important;
    border: none \!important;
    border-top: 1px solid #e0e0e0 \!important;
}
