/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e4e6ea;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #64b5f6;
}

/* Contenu principal */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Messages flash */
.flash-messages {
    margin-bottom: 2rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.flash-success {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.flash-error {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ===================== CARTE DE STOCKAGE ===================== */
.storage-card {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.storage-header h3 {
    color: #64b5f6;
    font-size: 1.1rem;
}

.storage-warning {
    font-size: 0.85rem;
    color: #ffa726;
    background: rgba(255, 167, 38, 0.15);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 167, 38, 0.3);
}

.storage-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.storage-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.storage-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 50%, #ffc107 75%, #ff5722 100%);
    background-size: 300% 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.storage-percent {
    font-size: 0.9rem;
    color: #b0bec5;
    white-space: nowrap;
}

.storage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(20, 20, 35, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e4e6ea;
}

.stat-label {
    font-size: 0.75rem;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== BANNIÈRE D'EXPIRATION ===================== */
.expiration-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.15) 0%, rgba(255, 87, 34, 0.15) 100%);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.expiration-icon {
    font-size: 1.5rem;
}

.expiration-text {
    color: #ffa726;
    font-size: 0.95rem;
}

.expiration-text strong {
    color: #ff7043;
}

/* ===================== ONGLETS ===================== */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px 12px 0 0;
    background: rgba(30, 30, 50, 0.5);
    color: #b0bec5;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.tab-btn:hover {
    background: rgba(30, 30, 50, 0.8);
    color: #64b5f6;
}

.tab-btn.active {
    background: rgba(30, 30, 50, 0.9);
    color: #64b5f6;
    border-color: rgba(100, 181, 246, 0.3);
    box-shadow: 0 -5px 20px rgba(100, 181, 246, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grille d'actions */
.actions-grid {
    margin-bottom: 2rem;
}

/* Cartes d'action */
.action-card {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(100, 181, 246, 0.3);
}

.action-card h2 {
    color: #64b5f6;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #b0bec5;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(20, 20, 35, 0.8);
    color: #e4e6ea;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Courier New', monospace;
}

/* ===================== ZONE DE DROP ===================== */
.drop-zone {
    position: relative;
    border: 2px dashed rgba(100, 181, 246, 0.4);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(20, 20, 35, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: #64b5f6;
    background: rgba(100, 181, 246, 0.05);
}

.drop-zone.drag-over {
    border-color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
}

.drop-zone.has-file {
    border-color: #81c784;
    background: rgba(76, 175, 80, 0.1);
}

.drop-zone.has-file .drop-zone-content {
    display: none;
}

.drop-zone.has-file .file-selected {
    display: flex;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.drop-text {
    font-size: 1.1rem;
    color: #64b5f6;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.drop-hint {
    font-size: 0.9rem;
    color: #78909c;
}

.file-selected {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.file-selected .file-icon {
    font-size: 2rem;
}

.file-selected .file-name {
    font-size: 1.1rem;
    color: #81c784;
    font-weight: 600;
    word-break: break-all;
}

.file-selected .file-size {
    font-size: 0.9rem;
    color: #78909c;
}

.upload-hint {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #78909c;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 181, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6ea;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Page de paste */
.paste-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.paste-header h1 {
    color: #64b5f6;
    margin: 0;
}

.paste-actions {
    display: flex;
    gap: 1rem;
}

.paste-content {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.paste-content pre {
    background: rgba(20, 20, 35, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #64b5f6;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e4e6ea;
}

/* ===================== PAGE FICHIER ===================== */
.file-header .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-header .file-icon {
    font-size: 2.5rem;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.detail-card h3 {
    color: #64b5f6;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.85rem;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    color: #e4e6ea;
    font-weight: 500;
}

.file-extension {
    display: inline-block;
    background: rgba(100, 181, 246, 0.2);
    color: #64b5f6;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Prévisualisation image */
.preview-card {
    border-color: rgba(100, 181, 246, 0.3);
}

.image-preview {
    display: flex;
    justify-content: center;
    background: rgba(20, 20, 35, 0.5);
    border-radius: 8px;
    padding: 1rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Section partage */
.share-section {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.share-section h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.share-link-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.share-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    background: rgba(20, 20, 35, 0.8);
    color: #e4e6ea;
}

.share-input:focus {
    outline: none;
    border-color: #64b5f6;
}

.share-hint {
    font-size: 0.9rem;
    color: #78909c;
}

.share-hint strong {
    color: #81c784;
}

/* Footer */
.footer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 1rem;
    color: #78909c;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .tab-grid {
        grid-template-columns: 1fr;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        border-radius: 8px;
    }

    .paste-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .paste-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .share-link-container {
        flex-direction: column;
    }

    .file-header .file-info {
        flex-direction: column;
        text-align: center;
    }

    .storage-header {
        flex-direction: column;
        text-align: center;
    }

    .storage-bar-container {
        flex-direction: column;
    }

    .expiration-banner {
        flex-direction: column;
        text-align: center;
    }
}