/* Variables et reset */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #4a90e2;
    --accent-hover: #357abd;
    --success: #27ae60;
    --error: #e74c3c;
    --warning: #f39c12;
    --border: #333;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Recherche */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.password-section {
    margin-bottom: 30px;
}

.password-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.password-section input {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.password-section input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: 12px 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-group input[type="radio"]:checked + label {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.search-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.search-btn:hover {
    background: var(--accent-hover);
}

.search-btn:disabled {
    background: var(--bg-card);
    cursor: not-allowed;
}

/* Status message */
.status-message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
    display: block;
}

.status-message.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
    display: block;
}

.status-message.info {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: block;
}

/* Résultats */
.results-section, .quality-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
    margin-top: 30px;
}

.results-section h3, .quality-section h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.results-list, .quality-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item, .quality-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item:hover, .quality-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.result-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.result-item .year {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.quality-item .info {
    flex: 1;
}

.quality-item .quality {
    font-weight: 600;
    color: var(--accent);
}

.quality-item .size {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.secondary-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.secondary-btn:hover {
    background: var(--accent);
    color: white;
}

.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.spinner.small {
    width: 16px;
    height: 16px;
}

.spinner.active {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Aide */
.help-container {
    max-width: 800px;
    margin: 0 auto;
}

.help-container h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.help-section {
    margin-bottom: 40px;
}

.help-section h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
}

.tips-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.tips-section h3 {
    margin-bottom: 20px;
    color: var(--accent);
}

.tips-section ul {
    list-style: none;
    padding-left: 0;
}

.tips-section li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 25px;
}

.tips-section li:before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 5px;
}

.tips-section li:last-child {
    border-bottom: none;
}

.version-info {
    text-align: center;
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Utilitaires */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .search-container h2 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .type-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .results-section, .quality-section {
        padding: 20px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-number {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .search-container h2 {
        font-size: 1.8rem;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .password-section input,
    .input-group input {
        padding: 12px;
    }
}