/*
    CompressConvert - Styles CSS
    Copyright (c) 2025 Léo Segalini - Développeur Full Stack
    Email: leo.segalini@outlook.com
    
    Tous droits réservés. Ce code est protégé par le droit d'auteur.
    Toute reproduction, distribution ou modification sans autorisation
    expresse de l'auteur est strictement interdite.
    
    Licence: Propriétaire - Usage personnel et commercial autorisé
    sous réserve de respecter les conditions d'utilisation.
*/

/* Variables CSS pour la cohérence du design - Version minimaliste */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #ffffff;
    --surface-color: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: 100vh;
}

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Zone de dépôt */
.upload-section {
    margin-bottom: 2rem;
}

.drop-zone {
    background: var(--background-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
    color: var(--primary-color);
}

.drop-zone h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.browse-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.supported-formats {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.format-tag {
    background: var(--surface-color);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Images uploadées */
.uploaded-images-section {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.uploaded-images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.uploaded-images-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.refresh-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.refresh-btn:hover {
    background: var(--text-secondary);
}

.uploaded-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.uploaded-image-item {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.uploaded-image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.uploaded-image-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.uploaded-image-remove:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.uploaded-image-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.uploaded-image-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.uploaded-image-size {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--border-color);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Options de format */
.format-options {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.processing-options {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.processing-options .control-group + .control-group {
    margin-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
}

.options-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.format-choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.format-choice:hover {
    background: var(--background-color);
    border-color: var(--border-hover);
}

.format-choice input[type="radio"] {
    display: none;
}

.format-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.format-choice input[type="radio"]:checked + .format-radio {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.format-choice input[type="radio"]:checked + .format-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.format-choice input[type="radio"]:checked ~ .format-info .format-name {
    color: var(--primary-color);
    font-weight: 600;
}

.format-info {
    flex: 1;
}

.format-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.format-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quality-value {
    float: right;
    color: var(--primary-color);
    font-weight: 600;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.number-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.number-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

.process-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.process-btn:hover {
    background: var(--primary-hover);
}

.btn-icon {
    font-size: 1.25rem;
}

/* Prévisualisation */
.preview-section {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.preview-item {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-filename {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.preview-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.preview-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-image {
    text-align: center;
}

.preview-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

.preview-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Téléchargement */
.download-section {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.download-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.download-zip-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.download-zip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-zip-btn:hover::before {
    left: 100%;
}

.download-zip-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.download-zip-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.download-all-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-all-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.download-item {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.download-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
}

.download-filename {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.875rem;
}

.download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.download-btn:hover {
    background: var(--primary-hover);
}

/* Statistiques */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Indicateur de chargement */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--surface-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-text {
    font-weight: 500;
    color: var(--text-primary);
}


/* Options de compression - utilise les styles existants */
.compression-options {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Section de traitement - utilise les styles existants */
.processing-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.progress-container {
    position: relative;
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.processing-info {
    margin-top: 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Section des résultats - utilise les styles existants */
.results-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.result-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


.preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--surface-color);
    transition: all 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.preview-filename {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
}

.preview-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.result-size {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.compression-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 5px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.compression-ratio {
    color: var(--success-color);
}

.result-download {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-download:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Actions d'upload - utilise les styles existants */
.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Information de qualité */
.quality-info {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    text-align: center;
}

.quality-info p {
    color: white;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .title {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .header-content {
        padding: 1.25rem;
    }
    
    .drop-zone {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .drop-zone h3 {
        font-size: 1.125rem;
    }
    
    .uploaded-images-section,
    .preview-section,
    .download-section {
        padding: 1.25rem;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .uploaded-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .uploaded-images-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .uploaded-images-controls {
        justify-content: center;
    }
    
    .format-choices {
        gap: 0.5rem;
    }
    
    .format-choice {
        padding: 0.75rem;
    }
    
    .preview-images {
        grid-template-columns: 1fr;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .download-thumbnail {
        height: 100px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .download-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .download-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .source-preview-container {
        flex-direction: column;
        text-align: center;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem 0.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    .drop-zone {
        padding: 1.25rem 0.75rem;
    }
    
    .upload-icon {
        font-size: 1.75rem;
    }
    
    .supported-formats {
        justify-content: center;
    }
    
    .format-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .uploaded-images-section,
    .preview-section,
    .download-section {
        padding: 1rem;
    }
    
    .uploaded-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .format-options {
        padding: 1rem;
    }
    
    .format-choice {
        padding: 0.5rem;
    }
    
    .process-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Navigation */
.nav {
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--surface-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--surface-color);
}

/* Page Icon Generator */
.source-section {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.source-preview-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.source-preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.source-preview-info {
    flex: 1;
}

.source-filename {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.source-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.generation-section {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.icon-item {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.icon-preview {
    margin-bottom: 1rem;
}

.icon-preview-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.icon-info {
    margin-bottom: 1rem;
}

.icon-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.icon-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.icon-download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.icon-download-btn:hover {
    background: var(--primary-hover);
}

.icon-zip-section {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Animations et transitions */
.preview-item,
.download-item,
.stat-card,
.icon-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-item:hover,
.download-item:hover,
.stat-card:hover,
.icon-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* États de focus pour l'accessibilité */
.process-btn:focus,
.download-btn:focus,
.download-all-btn:focus,
.number-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Styles pour les états de désactivation */
.process-btn:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
}

.process-btn:disabled:hover {
    background: var(--secondary-color);
    transform: none;
    box-shadow: var(--shadow-md);
}

/* ===== BOUTON RETOUR ===== */
.back-to-home-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface-color);
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.back-to-home-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-to-home-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-role {
    color: var(--text-secondary);
    font-weight: 400;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .back-to-home-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .footer {
        padding: 1.5rem 0;
        margin-top: 3rem;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .back-to-home-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        margin-top: 0.8rem;
    }
    
    .footer {
        padding: 1rem 0;
        margin-top: 2rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
    
    .footer-copyright {
        font-size: 0.7rem;
    }
    
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    
    .compression-stats {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .upload-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .download-thumbnail {
        height: 80px;
    }
    
    .uploaded-image-thumbnail {
        height: 100px;
    }
    
    .preview-image {
        height: 100px;
    }
}
