/* Styles pour ma3loma24.com Image Converter */

:root {
    --primary: #4a6cf7;
    --primary-dark: #3a5ce5;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.hero {
    text-align: center;
    color: white;
    padding: 40px 0;
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Converter Card */
.converter-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .converter-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

/* Upload Area */
.upload-section {
    border-right: 2px solid var(--border);
    padding-right: 40px;
}

.upload-area {
    border: 3px dashed var(--primary);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-dark);
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: var(--success);
    background: #f0fff4;
}

.upload-icon {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.file-info {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 5px 0;
}

/* Options */
.options-section {
    padding-left: 40px;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resize-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.size-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.size-inputs input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-convert {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* File List */
.file-list {
    margin-top: 20px;
}

.file-item {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--secondary);
    font-size: 0.9rem;
}

.remove-file {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Guide Section */
.guide {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

.guide h2 {
    margin-bottom: 40px;
    color: var(--dark);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

.step {
    padding: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* FAQ */
.faq {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
}

.faq h2 {
    margin-bottom: 30px;
    color: var(--dark);
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.alert-error {
    background: #fee;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: #efe;
    border: 1px solid var(--success);
    color: var(--success);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: white;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    opacity: 0.8;
    font-size: 0.9rem;
}
/* Messages */
.message {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* File preview */
.file-preview {
    text-align: center;
    padding: 20px;
}

.file-preview i {
    font-size: 50px;
    color: #4a6cf7;
    margin-bottom: 15px;
}

.file-preview h4 {
    margin: 10px 0;
    word-break: break-all;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

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

/* Loading */
#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Highlight pour drag & drop */
.highlight {
    border-color: #28a745 !important;
    background: #f0fff4 !important;
}