/**
 * Styles principaux pour Galacthulhu
 * Service de transfert de fichiers intergalactiques
 *
 * Palette de couleurs :
 * - Vert Cthulhu (corps) : #58A36C
 * - Rouge Yeux : #E74C3C
 * - Vert clair (Hover, accents) : #A5D6A7
 * - Bleu nuit de fond (background principal) : #0B2B36
 * - Noir adouci (contours) : #1C1C1C
 * - Blanc cassé (textes secondaires) : #F1F1F1
 */

/* === RESET ET BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0B2B36;
    color: #F1F1F1;
    line-height: 1.6;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-image: url('../images/stars-bg.svg');
    background-repeat: repeat;
    background-attachment: fixed;
}

a {
    color: #A5D6A7;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #58A36C;
}

ul {
    list-style: none;
}

/* === STRUCTURE PRINCIPALE === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

.main-content {
    flex: 1;
    padding: 0;
}

/* === EN-TÊTE === */
.site-header {
    background-color: rgba(11, 43, 54, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    color: #F1F1F1;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 2.5rem;
    margin-right: 0.75rem;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: #F1F1F1;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.main-nav a:hover {
    background-color: rgba(165, 214, 167, 0.1);
    color: #A5D6A7;
}

.main-nav i {
    margin-right: 0.5rem;
}

/* === PIED DE PAGE === */
.site-footer {
    background-color: rgba(11, 43, 54, 0.95);
    border-top: 1px solid rgba(165, 214, 167, 0.2);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-logo img {
    height: 2rem;
    margin-right: 0.5rem;
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-text p {
    color: #A5D6A7;
    font-size: 0.875rem;
}

/* === PAGE DE CONNEXION === */
.login-container {
    background-color: rgba(28, 28, 28, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #A5D6A7;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(165, 214, 167, 0.3);
    border-radius: 8px;
    background-color: rgba(11, 43, 54, 0.5);
    color: #F1F1F1;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #58A36C;
    box-shadow: 0 0 0 2px rgba(88, 163, 108, 0.2);
}

.captcha-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-login {
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #A5D6A7;
    transform: scale(1.05);
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #E74C3C;
}

.alert-success {
    background-color: rgba(88, 163, 108, 0.2);
    border: 1px solid rgba(88, 163, 108, 0.5);
    color: #A5D6A7;
}

/* === PAGE D'ENVOI === */
.upload-container {
    background-color: rgba(28, 28, 28, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 800px;
    margin-top: 0.5rem;
    margin: 2rem auto;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.upload-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.upload-header h1 {
    color: #A5D6A7;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.upload-area {
    border: 3px dashed rgba(165, 214, 167, 0.5);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(11, 43, 54, 0.5);
}

.upload-area:hover, .upload-area.active {
    border-color: #A5D6A7;
    background-color: rgba(88, 163, 108, 0.1);
}

.upload-icon {
    font-size: 2.5rem;
    color: #A5D6A7;
    margin-bottom: 1.5rem;
}

.upload-text p {
    margin-bottom: 0.3rem;
}

.btn-select {
    display: inline-block;
    background-color: #58A36C;
    color: #0B2B36;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select:hover {
    background-color: #A5D6A7;
    transform: scale(1.05);
}

.upload-limits {
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.upload-limits p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.upload-limits i {
    color: #A5D6A7;
    margin-right: 0.5rem;
}

.file-list {
    margin-bottom: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-info i {
    color: #A5D6A7;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.file-name {
    font-weight: 500;
    margin-right: 1rem;
    word-break: break-word;
}

.file-size {
    color: #A5D6A7;
    font-size: 0.9rem;
    margin-left: auto;
    margin-right: 1rem;
}

.file-remove {
    background-color: transparent;
    border: none;
    color: #E74C3C;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.file-remove:hover {
    color: #F1F1F1;
}

.upload-progress {
    margin-bottom: 2rem;
}

.progress {
    height: 0.75rem;
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.progress-bar {
    height: 100%;
    background-color: #58A36C;
    transition: width 0.3s ease;
}

#progressText {
    text-align: center;
    font-size: 0.9rem;
    color: #A5D6A7;
}

.buttons-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btn-upload {
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover:not(:disabled) {
    background-color: #A5D6A7;
    transform: scale(1.05);
}

.btn-upload:disabled {
    background-color: rgba(88, 163, 108, 0.5);
    cursor: not-allowed;
}

.upload-result {
    text-align: center;
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.upload-result h3 {
    color: #A5D6A7;
    margin-bottom: 1.5rem;
}

.share-link {
    display: flex;
    margin-bottom: 1.5rem;
}

.share-link input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(165, 214, 167, 0.3);
    border-radius: 8px 0 0 8px;
    background-color: rgba(11, 43, 54, 0.8);
    color: #F1F1F1;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-copy {
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background-color: #A5D6A7;
}

.btn-new {
    background-color: transparent;
    border: 2px solid #58A36C;
    color: #A5D6A7;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-new:hover {
    background-color: rgba(88, 163, 108, 0.1);
    color: #F1F1F1;
}

/* === PAGE DE TÉLÉCHARGEMENT === */
.download-container {
    background-color: rgba(28, 28, 28, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.download-header {
    text-align: center;
    margin-bottom: 2rem;
}

.download-header h1 {
    color: #A5D6A7;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.download-info {
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.download-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.download-info i {
    color: #A5D6A7;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
}

.file-list {
    margin-bottom: 2rem;
}

.file-list h3 {
    color: #A5D6A7;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.file-list ul {
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(165, 214, 167, 0.2);
    overflow: hidden;
}

.file-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(165, 214, 167, 0.1);
}

.file-list li:last-child {
    border-bottom: none;
}

.download-buttons {
    display: flex;
    justify-content: center;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download i {
    margin-right: 0.75rem;
}

.btn-download:hover {
    background-color: #A5D6A7;
    transform: scale(1.05);
}

/* === PAGE D'ERREUR === */
.error-container {
    background-color: rgba(28, 28, 28, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto;
    border: 1px solid rgba(231, 76, 60, 0.3);
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    color: #E74C3C;
    margin-bottom: 1.5rem;
}

.error-content h1 {
    color: #E74C3C;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.error-help {
    margin-bottom: 2rem;
    color: #A5D6A7;
}

.error-illustration {
    margin: 2rem 0;
}

.error-img {
    max-width: 200px;
}

.btn-home {
    display: inline-block;
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background-color: #A5D6A7;
    transform: scale(1.05);
}

/* === INTERFACE D'ADMINISTRATION === */
.admin-container {
    background-color: rgba(28, 28, 28, 0.7);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #A5D6A7;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.admin-section {
    margin-bottom: 3rem;
}

.admin-section h2 {
    color: #A5D6A7;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(165, 214, 167, 0.3);
    padding-bottom: 0.5rem;
}

.no-data {
    text-align: center;
    padding: 2rem;
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: rgba(11, 43, 54, 0.7);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(165, 214, 167, 0.2);
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(165, 214, 167, 0.1);
}

.admin-table th {
    background-color: rgba(88, 163, 108, 0.2);
    font-weight: 700;
    color: #A5D6A7;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: rgba(88, 163, 108, 0.1);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-view,
.btn-delete {
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view {
    color: #A5D6A7;
}

.btn-view:hover {
    background-color: rgba(165, 214, 167, 0.1);
}

.btn-delete {
    color: #E74C3C;
}

.btn-delete:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

.delete-form {
    display: inline;
}

/* Styles des logs spécifiques */
.log-upload { background-color: rgba(88, 163, 108, 0.1); }
.log-download, .log-download_all { background-color: rgba(52, 152, 219, 0.1); }
.log-manual_delete, .log-auto_delete { background-color: rgba(231, 76, 60, 0.1); }
.log-login, .log-logout { background-color: rgba(241, 196, 15, 0.1); }
.log-login_failed { background-color: rgba(231, 76, 60, 0.2); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 0.5rem;
    }
    
    .share-link {
        flex-direction: column;
    }
    
    .share-link input {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .btn-copy {
        border-radius: 8px;
        padding: 0.75rem;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-size {
        margin-left: 2rem;
        margin-top: 0.25rem;
    }
}
.limits-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.limits-text {
    flex: 1;
}

.limits-logo {
    flex: 0 0 auto;
    margin-left: 20px;
}

.logo-right {
    max-width: 150px;
    height: auto;
}

/* Adaptation pour les appareils mobiles */
@media (max-width: 768px) {
    .limits-content {
        flex-direction: column;
    }
    
    .limits-logo {
        margin-left: 0;
        margin-top: 15px;
    }
}
/* Styles pour le modal Cthulhu */
.cthulhu-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 43, 54, 0.9);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: rgba(28, 28, 28, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modal-appear 0.3s ease-out;
    border: 2px solid #58A36C;
}

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

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    color: #A5D6A7;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.cthulhu-text {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #E74C3C;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
    line-height: 1.8;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #A5D6A7;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #E74C3C;
    transform: scale(1.2);
}

.modal-footer {
    margin-top: 1.5rem;
}

.btn-close-modal {
    background-color: #58A36C;
    color: #0B2B36;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background-color: #A5D6A7;
    transform: scale(1.05);
}