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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: #f5f5dc;
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: #718096;
    font-size: 1.1rem;
}

.step {
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-1px);
}

.step h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 3px solid #dc3545;
    padding-bottom: 10px;
}

.upload-area {
    position: relative;
    margin-bottom: 20px;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.upload-label:hover {
    border-color: #dc3545;
    background: #edf2f7;
    transform: scale(1.005);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-hint {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 5px;
}

.btn-primary, .btn-success, .btn-download {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover, .btn-success:hover, .btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-download {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
    font-size: 1.2rem;
    padding: 18px 35px;
}

.btn-download:hover {
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.question-item {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.question-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.question-header {
    margin-bottom: 20px;
}

.question-header h3 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.question-title {
    background: #dc3545;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
}

.answers-section h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.answer-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.answer-card:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.answer-card.selected {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.2);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.answer-letter {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.answer-controls {
    display: flex;
    align-items: center;
}

.answer-controls input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    position: relative;
    cursor: pointer;
}

.checkmark {
    display: inline-block;
    width: 25px;
    height: 25px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.answer-controls input[type="checkbox"]:checked + .checkbox-label .checkmark {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-color: #48bb78;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.answer-controls input[type="checkbox"]:checked + .checkbox-label .checkmark:after {
    display: block;
}

.answer-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.5;
    border-left: 4px solid #e2e8f0;
    transition: all 0.2s ease;
}

.answer-card:hover .answer-text {
    border-left-color: #dc3545;
}

.answer-card.selected .answer-text {
    border-left-color: #48bb78;
    background: rgba(255, 255, 255, 0.8);
}

.feedback-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-section label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

.feedback-section input {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.feedback-section input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.general-feedback-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.general-feedback-section label {
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
}

.general-feedback-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.general-feedback-section textarea:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.general-feedback-section textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.download-info {
    text-align: center;
    padding: 30px;
    background: #f0fff4;
    border: 2px solid #c6f6d5;
    border-radius: 12px;
}

.download-info p {
    font-size: 1.2rem;
    color: #22543d;
    margin-bottom: 20px;
    font-weight: 500;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.status-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.status-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

.status-info {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    color: #4a5568;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .step {
        padding: 20px;
    }
    
    .step h2 {
        font-size: 1.5rem;
    }
    
    .upload-label {
        padding: 25px;
    }
    
    .question-item {
        padding: 20px;
    }
    
    .answers-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .answer-card {
        padding: 15px;
    }
    
    .answer-header {
        margin-bottom: 12px;
    }
    
    .answer-letter {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .checkmark {
        width: 22px;
        height: 22px;
    }
    
    .checkmark:after {
        left: 7px;
        top: 3px;
        width: 5px;
        height: 9px;
    }
}

@media (max-width: 480px) {
    .answers-grid {
        gap: 10px;
    }
    
    .answer-card {
        padding: 12px;
    }
    
    .answer-text {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .general-feedback-section textarea {
        min-height: 70px;
    }
}

/* Styles pour les fonctionnalités d'images */
.image-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.image-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.image-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #dc3545;
}

.image-checkbox-container label {
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
}

.image-upload-area {
    margin-top: 10px;
}

.image-upload-box {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.image-upload-box:hover {
    border-color: #dc3545;
    background: #f8f9fa;
}

.image-paste-area {
    padding: 20px;
    cursor: pointer;
}

.image-paste-area:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.image-paste-area p {
    margin: 0 0 10px 0;
    color: #718096;
    font-size: 0.95rem;
}

.image-paste-area button {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.image-paste-area button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.image-preview {
    margin-top: 15px;
}

.image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.image-preview-container img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.image-info small {
    color: #718096;
    font-size: 0.85rem;
}

.remove-image-btn {
    background: #e53e3e;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #c53030;
    transform: scale(1.1);
}

.answer-image-section {
    margin-top: 10px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #edf2f7;
}

.answer-image-section .image-checkbox-container {
    margin-bottom: 8px;
}

.answer-image-section .image-checkbox-container label {
    font-size: 0.85rem;
}

.answer-image-section .image-upload-box {
    padding: 15px;
}

.answer-image-section .image-paste-area {
    padding: 15px;
}

.answer-image-section .image-paste-area p {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.answer-image-section .image-paste-area button {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.answer-image-section .image-preview-container img {
    max-width: 150px;
    max-height: 100px;
}

/* Responsive pour les images */
@media (max-width: 768px) {
    .image-upload-box {
        padding: 15px;
    }
    
    .image-paste-area {
        padding: 15px;
    }
    
    .image-preview-container img {
        max-width: 150px;
        max-height: 100px;
    }
    
    .answer-image-section .image-preview-container img {
        max-width: 120px;
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .image-section {
        padding: 12px;
    }
    
    .image-upload-box {
        padding: 12px;
    }
    
    .image-paste-area {
        padding: 12px;
    }
    
    .image-preview-container img {
        max-width: 120px;
        max-height: 80px;
    }
    
    .answer-image-section .image-preview-container img {
        max-width: 100px;
        max-height: 60px;
    }
}