/* === PAGE CONTAINER === */
.page-container {
    min-height: 100vh;
    background: var(--bg-light);
}

.page-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 2rem;
    box-shadow: 0 2px 4px var(--shadow);
    margin-bottom: 2rem;
}

.page-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    background: var(--primary);
    color: white;
}

.page-title-block {
    flex: 1;
}

.page-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* === PANNEAU DE CONTRÔLES === */
.controls-panel {
    max-width: 1200px;
    margin: 0 auto 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px var(--shadow);
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.75rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary);
}

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

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-options label {
    font-size: 0.95rem;
    color: var(--text-medium);
    font-weight: 500;
}

.sort-options select {
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-options select:focus {
    outline: none;
    border-color: var(--primary);
}

/* === GRILLE DES POTIONS === */
.potions-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 2rem;
}

.potion-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.potion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
    border-color: var(--primary);
}

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

.potion-icon {
    font-size: 2.5rem;
}

.favorite-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.3;
}

.favorite-btn:hover,
.favorite-btn.active {
    opacity: 1;
    transform: scale(1.1);
}

.potion-name {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.potion-latin {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.potion-type {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.potion-description {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.potion-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.875rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

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

/* === PAS DE RÉSULTATS === */
.no-results {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
}

.no-results p:first-child {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.no-results .hint {
    font-size: 1rem;
    color: var(--text-medium);
}

/* === PAGE FAVORIS === */
.favorites-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.action-btn:hover {
    background: #b91c1c;
}

.empty-favorites {
    max-width: 700px;
    margin: 4rem auto;
    text-align: center;
    padding: 4rem 3rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-favorites h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-favorites p {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.explore-btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 600;
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .potions-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .controls-panel {
        margin: 0 1rem 2rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .potion-card {
        padding: 1.25rem;
    }
    
    .potion-name {
        font-size: 1.1rem;
    }
}
