* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0.5rem 0;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    margin-right: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

header h1 a:hover {
    opacity: 1;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.generator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.generator-card h2 {
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab {
    background: none;
    border: none;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    background: #f8f9fa;
    color: #333;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.tab-content {
    display: none;
    margin-bottom: 2rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.8rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.options-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.options-section h3 {
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.qr-result {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    margin: 2rem 0;
}

.qr-result.hidden {
    display: none;
}

.qr-result h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.qr-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.qr-container canvas {
    display: block;
    border-radius: 8px;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: white;
    color: #00b894;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #00b894;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #00b894;
}

.qr-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: left;
    backdrop-filter: blur(10px);
}

.qr-info p {
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.tips-section {
    margin-top: 3rem;
}

.tips-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.1);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tip-card h4 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.tip-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .generator-card {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        justify-content: center;
    }
    
    .tab {
        flex: 1;
        text-align: center;
        min-width: 80px;
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .generator-card {
        padding: 1rem;
    }
    
    .tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.5rem;
    }
    
    .qr-container {
        padding: 1rem;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .generator-card {
        background: #2c3e50;
        color: white;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #34495e;
        border-color: #4a5568;
        color: white;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #667eea;
    }
    
    .options-section {
        background: #34495e;
    }
    
    .tip-card {
        background: #34495e;
        color: white;
    }
}
