/* Variables CSS */
:root {
    --primary-color: #211680;
    --secondary-color: #e71a38;
    --accent-color: #5d58a0;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-gray: #e9ecef;
    --text-dark: #333333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* 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: var(--text-dark);
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: var(--border-radius);
    color: var(--white);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.header-logo {
    height: 80px;
    width: auto;
}

.header-text {
    text-align: left;
    flex: 1;
    min-width: 300px;
}

.header-text h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
    opacity: 0.95;
}

.header-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.congress-theme {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.congress-theme h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--secondary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.congress-theme p {
    font-size: 1rem;
    opacity: 0.9;
    font-style: italic;
    line-height: 1.3;
}

/* Section upload */
.upload-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--white);
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 22, 128, 0.1);
}

/* Zone de drop */
.upload-zone {
    border: 3px dashed var(--accent-color);
    border-radius: var(--border-radius);
    padding: 60px 20px;
    text-align: center;
    background: var(--light-gray);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 25px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(33, 22, 128, 0.05);
    transform: translateY(-2px);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.upload-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.btn-select {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.btn-select:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* File d'attente */
.upload-queue {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--warning-color);
}

.upload-queue h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-list {
    margin-bottom: 20px;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-item-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-waiting {
    background: var(--warning-color);
    color: var(--white);
}

.status-uploading {
    background: var(--primary-color);
    color: var(--white);
}

.status-completed {
    background: var(--success-color);
    color: var(--white);
}

.status-error {
    background: var(--error-color);
    color: var(--white);
}

/* Barre de progression */
.queue-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 40px;
}

/* Bouton upload */
.btn-upload {
    width: 100%;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upload:hover:not(:disabled) {
    background: #c41530;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-upload:disabled {
    background: var(--border-gray);
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.message.info {
    background: rgba(33, 22, 128, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Galerie */
.gallery-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background: var(--white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 15px;
}

.gallery-item-event {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gallery-item-date {
    color: #666;
    font-size: 14px;
}

.btn-load-more {
    display: block;
    margin: 0 auto;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Fichiers sélectionnés */
.selected-files-list {
    margin-top: 20px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.selected-files-list h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.btn-remove-file {
    background: var(--error-color);
    color: var(--white);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: #c82333;
}

.btn-clear-all {
    background: var(--border-gray);
    color: var(--text-dark);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-all:hover {
    background: var(--error-color);
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
    
    .upload-section,
    .gallery-section {
        padding: 20px;
    }
    
    .upload-zone {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .queue-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .queue-progress {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-header h1 {
        font-size: 1.4rem;
    }
        
    /* Header responsive */
    .header-content {
        flex-direction: column;
        text-align: center;
    }
        
    .header-text {
        text-align: center;
        min-width: auto;
    }
        
    .header-text h1 {
        font-size: 1.4rem;
    }
        
    .header-text h2 {
        font-size: 1.8rem;
    }
        
    .congress-theme h3 {
        font-size: 1.3rem;
    }  
    .upload-zone {
        padding: 30px 10px;
    }
}
